Skip to content

Rework CLI command surface: hybrid grouping + deprecated aliases #275

Description

@jrob5756

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:

  • registrylist / add / remove / set-default / update / show
    (existing)
  • gaterespond (+ room for future gate list) — new group
  • checkpointlist (+ room for future clean / show) — new group

Deprecated aliases (kept working, print a one-line stderr deprecation
warning, forward to the shared implementation):

  • gate-respondgate respond
  • checkpointscheckpoint 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

  1. Extract the checkpoints (cli/app.py:997) and gate-respond
    (cli/app.py:1274) command bodies into importable shared functions — no
    behavior change.
  2. Add cli/checkpoint.py (checkpoint_app) and cli/gate.py (gate_app)
    modeled on cli/registry.py; register via app.add_typer(...).
  3. Keep the old commands registered as thin deprecated aliases that warn +
    forward to the shared functions.
  4. 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 checkpointscheckpoint list,
    gate-respondgate respond; document the aliases.
  • AGENTS.md — update the cli/ bullet list + "Common Commands".
  • CHANGELOG.mdDeprecated (aliases) + Added (groups).

Metadata

Metadata

Assignees

Labels

area:cliCLI commands and entry pointsenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions