Summary
Rework the top-level CLI command surface so commands are grouped more
logically. Keep the hot-path verbs flat, move the long tail under noun groups
(alongside the existing registry group), add cosmetic --help panels, and
provide backward-compatible deprecated aliases so existing invocations keep
working.
Current state
Top-level is a flat list that mixes hot-path verbs with rare admin/lifecycle
commands, all in one undifferentiated --help block:
run, validate, show, resume, checkpoints, replay, stop,
gate-respond, update + the registry group.
Proposal (Option C — hybrid)
Flat (unchanged invocation): run, resume, validate, show, stop,
replay, update
Noun groups:
registry → list / add / remove / set-default / update / show
(existing)
gate → respond (+ room for future gate list) — new group
checkpoint → list (+ room for future clean / show) — new group
Deprecated aliases (kept working, print a one-line stderr deprecation
warning, forward to the shared implementation):
gate-respond → gate respond
checkpoints → checkpoint list
Help panels via Typer's rich_help_panel= (supported in 0.21):
- Author & Inspect:
validate, show
- Run & Recover:
run, resume, stop, replay
- Interact:
gate
- State:
checkpoint
- Environment:
registry, update
Backward compatibility
- No breaking change on merge —
checkpoints and gate-respond remain valid,
emitting a deprecation notice and forwarding to the new commands.
- Soft removal target: next major.
replay stays flat for now (could later fold into a log/debug group).
Implementation sketch
- Extract the
checkpoints (cli/app.py:997) and gate-respond
(cli/app.py:1274) command bodies into importable shared functions — no
behavior change.
- Add
cli/checkpoint.py (checkpoint_app) and cli/gate.py (gate_app)
modeled on cli/registry.py; register via app.add_typer(...).
- Keep the old commands registered as thin deprecated aliases that warn +
forward to the shared functions.
- Add
rich_help_panel= to top-level commands and groups.
Tests
- New group commands
checkpoint list / gate respond.
- Alias deprecation warning is emitted and output matches the new command
(forwarding parity).
- Audit existing
checkpoints / gate-respond tests — repoint to new paths or
keep as alias coverage.
Docs
docs/cli-reference.md — retitle checkpoints→checkpoint list,
gate-respond→gate respond; document the aliases.
AGENTS.md — update the cli/ bullet list + "Common Commands".
CHANGELOG.md — Deprecated (aliases) + Added (groups).
Summary
Rework the top-level CLI command surface so commands are grouped more
logically. Keep the hot-path verbs flat, move the long tail under noun groups
(alongside the existing
registrygroup), add cosmetic--helppanels, andprovide backward-compatible deprecated aliases so existing invocations keep
working.
Current state
Top-level is a flat list that mixes hot-path verbs with rare admin/lifecycle
commands, all in one undifferentiated
--helpblock:run,validate,show,resume,checkpoints,replay,stop,gate-respond,update+ theregistrygroup.Proposal (Option C — hybrid)
Flat (unchanged invocation):
run,resume,validate,show,stop,replay,updateNoun groups:
registry→list/add/remove/set-default/update/show(existing)
gate→respond(+ room for futuregate list) — new groupcheckpoint→list(+ room for futureclean/show) — new groupDeprecated aliases (kept working, print a one-line stderr deprecation
warning, forward to the shared implementation):
gate-respond→gate respondcheckpoints→checkpoint listHelp panels via Typer's
rich_help_panel=(supported in 0.21):validate,showrun,resume,stop,replaygatecheckpointregistry,updateBackward compatibility
checkpointsandgate-respondremain valid,emitting a deprecation notice and forwarding to the new commands.
replaystays flat for now (could later fold into alog/debuggroup).Implementation sketch
checkpoints(cli/app.py:997) andgate-respond(
cli/app.py:1274) command bodies into importable shared functions — nobehavior change.
cli/checkpoint.py(checkpoint_app) andcli/gate.py(gate_app)modeled on
cli/registry.py; register viaapp.add_typer(...).forward to the shared functions.
rich_help_panel=to top-level commands and groups.Tests
checkpoint list/gate respond.(forwarding parity).
checkpoints/gate-respondtests — repoint to new paths orkeep as alias coverage.
Docs
docs/cli-reference.md— retitlecheckpoints→checkpoint list,gate-respond→gate respond; document the aliases.AGENTS.md— update thecli/bullet list + "Common Commands".CHANGELOG.md— Deprecated (aliases) + Added (groups).