Skip to content

cleanup before v0.2.0 release cut.#5

Merged
josealekhine merged 10 commits into
mainfrom
feature/cleanup-2
Feb 1, 2026
Merged

cleanup before v0.2.0 release cut.#5
josealekhine merged 10 commits into
mainfrom
feature/cleanup-2

Conversation

@josealekhine

Copy link
Copy Markdown
Member

No description provided.

- 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>
@josealekhine josealekhine self-assigned this Feb 1, 2026
@josealekhine josealekhine merged commit 12af82a into main Feb 1, 2026
6 of 7 checks passed
@josealekhine josealekhine deleted the feature/cleanup-2 branch February 1, 2026 17:05
@josealekhine josealekhine mentioned this pull request May 23, 2026
10 tasks
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant