cleanup before v0.2.0 release cut.#5
Merged
Merged
Conversation
- Add config constants: FileContextRC, EnvCtxDir, EnvCtxTokenBudget, ParserPeekLines, Claude API block types and roles - Add RWMutex to rc package for thread-safe rcOverrideDir access - Use t.Setenv in tests instead of os.Setenv/Unsetenv - Extract ReindexFile helper to eliminate decision/learnings duplication - ScanDirectory now delegates to ScanDirectoryWithErrors - Use iota for task match indices - Add EntryPlural map for entry type pluralization - Add comprehensive tests for config and task packages - Add proper documentation following project conventions Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
- Update claude package to use config constants for hook scripts - Move DefaultPermissions from claude/perm.go to config package - Rename internal/templates to internal/tpl - Update all imports for templates→tpl rename - Add tests for bootstrap, decision, journal, learnings, recall, serve - Use config constants in marker.go and token.go Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
- Replace useless cat with input redirection in release.sh and tag.sh - Use find instead of ls for file listing in release.sh Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
- Add AGENT_PLAYBOOK.md with bootstrap instructions - Add LEARNINGS.md with example entries - Add PROMPT.md for Ralph Loop workflow - Add specs/ directory with oauth2.md example - Update existing context files with richer examples Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
- Update installation examples from v0.1.2 to v0.2.0 - Document `ctx completion` command with shell-specific examples - Add `--all-projects` flag to recall list/show/export docs Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
CoderMungan
pushed a commit
to CoderMungan/ctx
that referenced
this pull request
Jun 19, 2026
Spec for Phase CLI-FIX ActiveMemory#5: make `ctx system <unknown>` emit a verbatim-relay box to stdout and exit non-zero instead of dumping ~51 lines of help at exit 0 (which a UserPromptSubmit hook reads as success and injects every prompt). Settled with the user: fire the event-log + webhook relay leg (nudge.Relay), gated on a real session ID read TTY-safely from stdin; scoped to ctx system only, parent.Cmd untouched. Runtime complement to the build-time wiring guard (specs/hooks-wiring-guard.md). Spec: specs/system-unknown-subcommand-relay.md Signed-off-by: Jose Alekhinne <jose@ctx.ist>
CoderMungan
pushed a commit
to CoderMungan/ctx
that referenced
this pull request
Jun 19, 2026
Lift the unknown-subcommand handler out of the system-scoped internal/cli/system/core/unknown into a neutral, parameterized internal/cli/unknown package, and opt `ctx hook` in alongside `ctx system`. Why hook needs it: the ActiveMemory#5 relay was scoped to `ctx system` for the every-prompt amplification (a hooks.json-wired group whose help-dump- at-exit-0 is read as success). But the relay's other value is making CLI drift LOUD. `ctx hook` is consumed by name from skills and loop scripts (ctx hook notify|event|message|pause|resume); if a verb drifts out of the binary, the caller silently gets help + exit 0 — the agent misreads or ignores it, and for `ctx hook notify` the human is never notified. An unknown `ctx hook <verb>` now emits a verbatim relay box (CLI-drift framing), best-effort fires the session-gated relay leg, and exits non-zero. A bare `ctx hook` still prints help and exits 0. Changes: - internal/cli/unknown: Config + HandlerFor(cfg); SystemConfig and HookConfig opt-ins. handle() is the former system handler, parameterized. relay seam preserved for tests. - system.Cmd / hook.Cmd both set c.RunE = unknown.HandlerFor(...). - hook.Cmd carries AnnotationSkipInit: it is user-facing (not Hidden) and previously rode RootCmd's no-RunE PreRunE exemption; adding a RunE would newly demand an initialized context/git. The annotation exempts only the group-level invocation; real subcommands keep their preconditions. Bootstrap regression test covers this. - hook.Hook relay label + hook-unknown.* text keys/yaml (CLI-drift copy). - Tests moved to internal/cli/unknown; added hook routing, copy, and no-context-exemption coverage. Did NOT fold into parent.Cmd (would widen every group's dependency surface). A build-time guard scanning skills/loops for `ctx hook <verb>` is noted out of scope. Spec: specs/unknown-subcommand-relay-generalization.md Signed-off-by: Jose Alekhinne <jose@ctx.ist>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.