Goal
Make packages/cli/src/index.ts a CLI bootstrap plus command wiring surface, not a container for command implementation.
Current Problem
The command router exists, but index.ts still contains many command handlers and support functions. This keeps CLI behavior harder to scan, review, and extend.
Target Shape
index.ts owns bootstrap, shared setup, and exports only minimal CLI entry points.
- Command implementations live under focused modules, likely
packages/cli/src/commands/.
- Existing helper modules (
recipe-*, agent-sandbox, runtime-command-wrappers, output) remain the lower-level building blocks.
Candidate Slices
commands/recipe.ts
commands/recipe-run.ts
commands/schema.ts
commands/run.ts
commands/boot.ts
commands/list.ts or equivalent for discovery/registry output
Acceptance Criteria
index.ts is materially smaller and readable as CLI bootstrap/orchestration.
- Command behavior, option parsing, JSON output, and help/unknown-command behavior remain unchanged.
- Build and focused CLI command/recipe smokes pass.
AI assistance
- AI assistance: Yes
- Tool(s): OpenCode (openai/gpt-5.5)
- Used for: Drafting this tracker from the current architecture cleanup state.
Goal
Make
packages/cli/src/index.tsa CLI bootstrap plus command wiring surface, not a container for command implementation.Current Problem
The command router exists, but
index.tsstill contains many command handlers and support functions. This keeps CLI behavior harder to scan, review, and extend.Target Shape
index.tsowns bootstrap, shared setup, and exports only minimal CLI entry points.packages/cli/src/commands/.recipe-*,agent-sandbox,runtime-command-wrappers,output) remain the lower-level building blocks.Candidate Slices
commands/recipe.tscommands/recipe-run.tscommands/schema.tscommands/run.tscommands/boot.tscommands/list.tsor equivalent for discovery/registry outputAcceptance Criteria
index.tsis materially smaller and readable as CLI bootstrap/orchestration.AI assistance