refactor(cli): rename plan lifecycle-list and lifecycle-apply to match specification #881

Closed
opened 2026-03-13 22:59:40 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: refactor(cli): rename plan lifecycle-list and lifecycle-apply to match specification
  • Branch: feature/m3-plan-cmd-names

Background and Context

The specification defines agents plan list and agents plan apply as the canonical command names. The current implementation uses agents plan lifecycle-list and agents plan lifecycle-apply to avoid name clashes with legacy (pre-V3) plan commands that use the same names.

The legacy commands (plan list for V2 plans and plan apply for V2 apply) should be removed and the spec-aligned names restored. This is a naming alignment task to bring the CLI into conformance with the specification.

Expected Behavior

  • agents plan list maps to the V3 plan listing (currently lifecycle-list)
  • agents plan apply maps to the V3 plan apply (currently lifecycle-apply)
  • Legacy V2 plan list and plan apply commands are removed or aliased

Acceptance Criteria

  • agents plan list displays V3 plans (with --phase, --state, --project, --action filters)
  • agents plan apply triggers V3 apply phase
  • lifecycle-list and lifecycle-apply names are removed or deprecated
  • Legacy V2 plan commands are removed or moved to a plan legacy subgroup
  • All documentation and help text updated

Subtasks

  • Rename lifecycle_list_command to list_command in plan CLI module
  • Rename lifecycle_apply_command to apply_command in plan CLI module
  • Remove or deprecate legacy plan list and plan apply
  • Update CLI help text and command registration
  • Tests (Behave): Update existing plan command tests for new names
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata - **Commit Message**: `refactor(cli): rename plan lifecycle-list and lifecycle-apply to match specification` - **Branch**: `feature/m3-plan-cmd-names` ## Background and Context The specification defines `agents plan list` and `agents plan apply` as the canonical command names. The current implementation uses `agents plan lifecycle-list` and `agents plan lifecycle-apply` to avoid name clashes with legacy (pre-V3) plan commands that use the same names. The legacy commands (`plan list` for V2 plans and `plan apply` for V2 apply) should be removed and the spec-aligned names restored. This is a naming alignment task to bring the CLI into conformance with the specification. ## Expected Behavior - `agents plan list` maps to the V3 plan listing (currently `lifecycle-list`) - `agents plan apply` maps to the V3 plan apply (currently `lifecycle-apply`) - Legacy V2 `plan list` and `plan apply` commands are removed or aliased ## Acceptance Criteria - [ ] `agents plan list` displays V3 plans (with --phase, --state, --project, --action filters) - [ ] `agents plan apply` triggers V3 apply phase - [ ] `lifecycle-list` and `lifecycle-apply` names are removed or deprecated - [ ] Legacy V2 plan commands are removed or moved to a `plan legacy` subgroup - [ ] All documentation and help text updated ## Subtasks - [ ] Rename `lifecycle_list_command` to `list_command` in plan CLI module - [ ] Rename `lifecycle_apply_command` to `apply_command` in plan CLI module - [ ] Remove or deprecate legacy `plan list` and `plan apply` - [ ] Update CLI help text and command registration - [ ] Tests (Behave): Update existing plan command tests for new names - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
freemo added this to the v3.3.0 milestone 2026-03-13 23:00:01 +00:00
freemo self-assigned this 2026-03-29 02:30:29 +00:00
Author
Owner

Implementation Notes

PR: #1188
Branch: feature/m3-plan-cmd-names
Commit: 32ba63a2

What changed

  1. Renamed CLI commands in plan.py:

    • @app.command("lifecycle-list")@app.command("list")
    • @app.command("lifecycle-apply")@app.command("apply")
  2. Removed legacy V2 CLI commands:

    • Legacy @app.command("list") def list_plans(...) (was the old V2 plan listing)
    • Legacy @app.command() def apply(...) (was the dual-purpose legacy/v3 apply)
    • These were removed to resolve naming conflicts with the renamed v3 commands
  3. Updated shortcut in main.py: Top-level agents apply now delegates to lifecycle_apply_plan with proper plan_id and --yes forwarding

  4. Bug fix: Added null check in lifecycle_apply_plan for plan-not-found (previously only existed in the removed _lifecycle_apply_with_id)

  5. Dynamic title: lifecycle_apply_plan now shows "Plan Applied" when terminal, "Plan Applying" otherwise

  6. 63 files changed across:

    • Source: plan.py, main.py
    • BDD tests: 20+ .feature files, 15+ step files
    • Robot tests: 10+ .robot files, 10+ helper .py files
    • Benchmarks: 6 benchmark files

Nox results

  • lint: PASSED
  • format: PASSED
  • typecheck: 0 errors
  • unit_tests: 494/495 features passed, 12708/12709 scenarios (1 pre-existing failure)
  • coverage_report: 97% overall
  • integration_tests: 1811/1819 passed (pre-existing failures only)
## Implementation Notes **PR**: #1188 **Branch**: `feature/m3-plan-cmd-names` **Commit**: `32ba63a2` ### What changed 1. **Renamed CLI commands in `plan.py`**: - `@app.command("lifecycle-list")` → `@app.command("list")` - `@app.command("lifecycle-apply")` → `@app.command("apply")` 2. **Removed legacy V2 CLI commands**: - Legacy `@app.command("list") def list_plans(...)` (was the old V2 plan listing) - Legacy `@app.command() def apply(...)` (was the dual-purpose legacy/v3 apply) - These were removed to resolve naming conflicts with the renamed v3 commands 3. **Updated shortcut in `main.py`**: Top-level `agents apply` now delegates to `lifecycle_apply_plan` with proper `plan_id` and `--yes` forwarding 4. **Bug fix**: Added null check in `lifecycle_apply_plan` for plan-not-found (previously only existed in the removed `_lifecycle_apply_with_id`) 5. **Dynamic title**: `lifecycle_apply_plan` now shows "Plan Applied" when terminal, "Plan Applying" otherwise 6. **63 files changed** across: - Source: `plan.py`, `main.py` - BDD tests: 20+ `.feature` files, 15+ step files - Robot tests: 10+ `.robot` files, 10+ helper `.py` files - Benchmarks: 6 benchmark files ### Nox results - `lint`: PASSED - `format`: PASSED - `typecheck`: 0 errors - `unit_tests`: 494/495 features passed, 12708/12709 scenarios (1 pre-existing failure) - `coverage_report`: 97% overall - `integration_tests`: 1811/1819 passed (pre-existing failures only)
Author
Owner

PR #1188 reviewed, approved, and merged (squash).

The CLI commands have been renamed to match the specification:

  • agents plan lifecycle-listagents plan list
  • agents plan lifecycle-applyagents plan apply
  • Legacy V2 plan list and plan apply commands removed
  • All tests, docs, and benchmarks updated across 71 files
PR #1188 reviewed, approved, and merged (squash). The CLI commands have been renamed to match the specification: - `agents plan lifecycle-list` → `agents plan list` ✅ - `agents plan lifecycle-apply` → `agents plan apply` ✅ - Legacy V2 `plan list` and `plan apply` commands removed ✅ - All tests, docs, and benchmarks updated across 71 files ✅
Author
Owner

PR #1188 reviewed, approved, and merged.

The PR renames plan lifecycle-listplan list and plan lifecycle-applyplan apply to align with the specification's canonical command names. Legacy V2 plan commands have been removed. All 71 files (source, tests, docs, benchmarks) updated consistently.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #1188 reviewed, approved, and merged. The PR renames `plan lifecycle-list` → `plan list` and `plan lifecycle-apply` → `plan apply` to align with the specification's canonical command names. Legacy V2 plan commands have been removed. All 71 files (source, tests, docs, benchmarks) updated consistently. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
cleveragents/cleveragents-core#881
No description provided.