feat(cli): implement agents plan correct CLI command with --mode and --dry-run flags #9737

Open
opened 2026-04-15 07:46:57 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit message: feat(cli): implement agents plan correct CLI command with --mode and --dry-run flags
  • Branch name: feat/v3.3.0-cli-plan-correct-command

Background and Context

Epic #4959 (Correction Engine) requires a CLI command agents plan correct that exposes the correction engine to users. The command must support --mode revert, --mode append, and --dry-run flags.

This issue is part of the v3.3.0 milestone (M4: Corrections + Subplans + Checkpoints) and blocks Epic #4959.

Expected Behavior

The agents plan correct CLI command accepts a plan ID and decision ID, along with --mode (revert/append), --guidance (for append mode), and --dry-run flags. It validates that the plan and decision exist before calling CorrectionService, displays the correction result (success/failure, decisions invalidated, new attempt number), and provides complete --help documentation.

Acceptance Criteria

  • agents plan correct <plan-id> <decision-id> --mode revert triggers revert correction
  • agents plan correct <plan-id> <decision-id> --mode append --guidance "..." triggers append correction
  • agents plan correct <plan-id> <decision-id> --mode revert --dry-run shows dry-run report without modifying state
  • CLI output shows correction result (success/failure, decisions invalidated, new attempt number)
  • CLI validates that plan-id and decision-id exist before calling CorrectionService
  • --help documentation is complete and accurate
  • BDD/Gherkin tests cover all CLI flag combinations
  • Unit tests achieve >= 97% coverage

Subtasks

  • Implement agents plan correct CLI command with Click/Typer
  • Implement --mode flag (revert/append)
  • Implement --guidance flag for append mode
  • Implement --dry-run flag
  • Implement input validation (plan-id, decision-id existence)
  • Implement rich CLI output for correction results
  • Write BDD/Gherkin feature file for CLI correction commands
  • Write unit tests for CLI command
  • Verify nox passes with coverage >= 97%

Definition of Done

  1. agents plan correct CLI command is implemented with all flags
  2. All flag combinations work correctly
  3. Input validation prevents invalid corrections
  4. BDD tests pass and coverage >= 97%
  5. Code reviewed and merged to main branch
  • Parent Epic: #4959 (EPIC: Correction Engine — Revert & Append Modes)
  • Parent Legendary: #4942 (LEGENDARY: Decision Intelligence)
  • Blocks: #4959
  • Depends on: Issues 1 and 2 (CorrectionService implementation)

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit message**: `feat(cli): implement agents plan correct CLI command with --mode and --dry-run flags` - **Branch name**: `feat/v3.3.0-cli-plan-correct-command` ## Background and Context Epic #4959 (Correction Engine) requires a CLI command `agents plan correct` that exposes the correction engine to users. The command must support `--mode revert`, `--mode append`, and `--dry-run` flags. This issue is part of the v3.3.0 milestone (M4: Corrections + Subplans + Checkpoints) and blocks Epic #4959. ## Expected Behavior The `agents plan correct` CLI command accepts a plan ID and decision ID, along with `--mode` (revert/append), `--guidance` (for append mode), and `--dry-run` flags. It validates that the plan and decision exist before calling `CorrectionService`, displays the correction result (success/failure, decisions invalidated, new attempt number), and provides complete `--help` documentation. ## Acceptance Criteria - [ ] `agents plan correct <plan-id> <decision-id> --mode revert` triggers revert correction - [ ] `agents plan correct <plan-id> <decision-id> --mode append --guidance "..."` triggers append correction - [ ] `agents plan correct <plan-id> <decision-id> --mode revert --dry-run` shows dry-run report without modifying state - [ ] CLI output shows correction result (success/failure, decisions invalidated, new attempt number) - [ ] CLI validates that `plan-id` and `decision-id` exist before calling `CorrectionService` - [ ] `--help` documentation is complete and accurate - [ ] BDD/Gherkin tests cover all CLI flag combinations - [ ] Unit tests achieve >= 97% coverage ## Subtasks - [ ] Implement `agents plan correct` CLI command with Click/Typer - [ ] Implement `--mode` flag (revert/append) - [ ] Implement `--guidance` flag for append mode - [ ] Implement `--dry-run` flag - [ ] Implement input validation (plan-id, decision-id existence) - [ ] Implement rich CLI output for correction results - [ ] Write BDD/Gherkin feature file for CLI correction commands - [ ] Write unit tests for CLI command - [ ] Verify `nox` passes with coverage >= 97% ## Definition of Done 1. `agents plan correct` CLI command is implemented with all flags 2. All flag combinations work correctly 3. Input validation prevents invalid corrections 4. BDD tests pass and coverage >= 97% 5. Code reviewed and merged to main branch ## Links - **Parent Epic**: #4959 (EPIC: Correction Engine — Revert & Append Modes) - **Parent Legendary**: #4942 (LEGENDARY: Decision Intelligence) - **Blocks**: #4959 - **Depends on**: Issues 1 and 2 (CorrectionService implementation) --- **Automated by CleverAgents Bot** Agent: new-issue-creator
Author
Owner

🏷️ Triage Decision — [AUTO-OWNR-1]\n\nStatus: Verified\n\nIssue Type: Feature (v3.3.0) \nMoSCoW: Must Have — Core CLI command for plan correction \nPriority: High\n\nRationale: The agents plan correct CLI command is a core acceptance criterion for v3.3.0 (Corrections + Subplans + Checkpoints). Without this command, the correction flow cannot be tested or used. This is a Must Have for milestone completion.\n\nLabels to apply: State/Verified, MoSCoW/Must have, Priority/High\n\n---\nAutomated by CleverAgents Bot\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor

## 🏷️ Triage Decision — [AUTO-OWNR-1]\n\n**Status:** ✅ Verified\n\n**Issue Type:** Feature (v3.3.0) \n**MoSCoW:** Must Have — Core CLI command for plan correction \n**Priority:** High\n\n**Rationale:** The `agents plan correct` CLI command is a core acceptance criterion for v3.3.0 (Corrections + Subplans + Checkpoints). Without this command, the correction flow cannot be tested or used. This is a Must Have for milestone completion.\n\n**Labels to apply:** State/Verified, MoSCoW/Must have, Priority/High\n\n---\n**Automated by CleverAgents Bot**\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor
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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9737
No description provided.