| name | ccctx-work |
| description | Implement focused features, bug fixes, tests, refactors, and documentation changes in the ccctx Go CLI. Use when asked to work on this repository's codebase, especially command behavior, profile management, Claude Code or pi credential persistence, exec isolation, tests, or release-quality docs. |
ccctx Work
Implement the requested change end to end with focused edits and tests.
Context To Read
README.md for user-visible behavior.
docs/architecture.md for storage, credential, and exec design.
internal/ccctx/app.go for application logic.
internal/ccctx/app_test.go for behavior-test patterns.
cmd/ccctx/main.go only when process startup or exit behavior changes.
Implementation Workflow
- Reproduce or understand the requested behavior from code and tests.
- Keep command parsing small: validate CLI arguments in
*Command methods, then delegate to behavior methods.
- Add or update behavior tests in
internal/ccctx/app_test.go using testApp.
- Use temporary directories and fake credential stores in tests; never touch real Claude Code or pi auth state.
- Preserve file permissions for profile data and credentials.
- Update docs when user-visible commands, environment variables, storage behavior, or install paths change.
- Run
gofmt on changed Go files.
- Run
go test ./..., go vet ./..., and go build -o bin/ccctx ./cmd/ccctx.
Codebase Rules
- Prefer standard library code.
- Keep errors lowercase and actionable.
- Avoid logging or printing Claude Code or pi credential contents.
- Keep CLI output stable unless changing it is the point of the task.
- Preserve cross-platform behavior: Unix locking belongs in
lock_unix.go; fallback locking belongs in lock_other.go.
- Keep
exec isolated from the user's real active Claude config and persist refreshed state only after command completion.
Final Response
Summarize the concrete change, list verification commands, and call out skipped checks or residual risk.