Objective
Reduce control_plane/cli.py into focused command modules so CLI maintenance does not require editing a 14k-line source file.
Finish Line
Common CLI changes land in focused modules without editing 14k-line cli.py implementation blocks
Current Status
State: control_plane/cli.py is the largest Launchplane source file at roughly 14.4k lines on main; this is related cleanup but broader than #307's current service/work-graph and operator UI refactor scope.
Next action: After #307's active service/UI cleanup sprint lands, inspect CLI command groups and extract one low-risk command family at a time.
Blocked by: Keep focus on #307 until the work graph/service and operator UI hotspots are below the active-change threshold.
Last verified: 2026-05-07 line-count check on origin/main showed control_plane/cli.py at 14,452 lines.
Scope
- Identify command families that can move into dedicated modules without changing CLI behavior.
- Keep Click command names, options, output, and exit behavior stable.
- Preserve existing API/service boundaries; do not use CLI extraction to reintroduce local live-target mutation paths.
- Add or update targeted CLI tests when extracting command behavior.
- Leave broad CLI redesign, UX changes, and command removal out of initial cleanup slices.
Acceptance Criteria
- At least one coherent CLI command family is extracted from
control_plane/cli.py into a focused module.
- Existing CLI tests and relevant targeted tests pass.
- New command modules have clear import direction and no circular runtime dependencies.
- Future CLI work can add or change commands in focused modules without editing the giant file for implementation details.
Relationships
Validation
- Targeted CLI tests for moved command groups.
- Full relevant repo quality gate from
.github/github-repo-workflow.json before merge.
- Manual command smoke for any moved operator-facing command if tests do not cover output shape.
Decisions
Open Questions
- Which command family is lowest risk for the first extraction: reporting/read-only commands, product config commands, or Every Code commands?
- Should the command registry remain in
control_plane/cli.py or move to a package-level CLI module after the first slices prove the pattern?
Objective
Reduce
control_plane/cli.pyinto focused command modules so CLI maintenance does not require editing a 14k-line source file.Finish Line
Common CLI changes land in focused modules without editing 14k-line cli.py implementation blocks
Current Status
State:
control_plane/cli.pyis the largest Launchplane source file at roughly 14.4k lines onmain; this is related cleanup but broader than #307's current service/work-graph and operator UI refactor scope.Next action: After #307's active service/UI cleanup sprint lands, inspect CLI command groups and extract one low-risk command family at a time.
Blocked by: Keep focus on #307 until the work graph/service and operator UI hotspots are below the active-change threshold.
Last verified: 2026-05-07 line-count check on
origin/mainshowedcontrol_plane/cli.pyat 14,452 lines.Scope
Acceptance Criteria
control_plane/cli.pyinto a focused module.Relationships
Validation
.github/github-repo-workflow.jsonbefore merge.Decisions
Open Questions
control_plane/cli.pyor move to a package-level CLI module after the first slices prove the pattern?