[ENHANCEMENT] Make plan_id optional when --correction is provided in agents plan diff #10221

Open
opened 2026-04-17 07:55:07 +00:00 by hurui200320 · 1 comment
Member

Metadata

  • Commit Message: feat(cli): make plan_id optional when --correction is provided in plan diff
  • Branch: feature/m4-plan-diff-optional-plan-id

Background and Context

The specification defines agents plan diff (--correction <CORRECTION_ATTEMPT_ID>|<PLAN_ID>) with explicit documentation that <PLAN_ID> is "mutually exclusive with --correction." The spec examples show agents plan diff --correction <CORRECTION_ATTEMPT_ID> without a plan_id argument.

The current implementation (PR #9221, ticket #9085) makes plan_id a mandatory positional argument even when --correction is provided, meaning agents plan diff --correction <ID> (the spec's syntax) fails with a missing argument error.

The ticket's own acceptance criteria uses the two-argument form (agents plan diff --correction <CORRECTION_ATTEMPT_ID> <PLAN_ID>), so the implementation matches the ticket. This is a spec/ticket inconsistency that predates PR #9221.

Acceptance Criteria

  • plan_id is optional when --correction is provided
  • When --correction is provided without plan_id, resolve the plan from the correction attempt's plan_id field
  • When both --correction and plan_id are provided, validate that the correction attempt belongs to the specified plan (existing behavior)
  • All existing BDD and Robot tests updated
  • Coverage >= 97%

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.
  • 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.

Created by: PR #9221 review cycle 2 — tracks spec/ticket inconsistency (M1).

## Metadata - **Commit Message**: `feat(cli): make plan_id optional when --correction is provided in plan diff` - **Branch**: `feature/m4-plan-diff-optional-plan-id` ## Background and Context The specification defines `agents plan diff (--correction <CORRECTION_ATTEMPT_ID>|<PLAN_ID>)` with explicit documentation that `<PLAN_ID>` is "mutually exclusive with `--correction`." The spec examples show `agents plan diff --correction <CORRECTION_ATTEMPT_ID>` without a `plan_id` argument. The current implementation (PR #9221, ticket #9085) makes `plan_id` a **mandatory positional argument** even when `--correction` is provided, meaning `agents plan diff --correction <ID>` (the spec's syntax) fails with a missing argument error. The ticket's own acceptance criteria uses the two-argument form (`agents plan diff --correction <CORRECTION_ATTEMPT_ID> <PLAN_ID>`), so the implementation matches the ticket. This is a spec/ticket inconsistency that predates PR #9221. ## Acceptance Criteria - [ ] `plan_id` is optional when `--correction` is provided - [ ] When `--correction` is provided without `plan_id`, resolve the plan from the correction attempt's `plan_id` field - [ ] When both `--correction` and `plan_id` are provided, validate that the correction attempt belongs to the specified plan (existing behavior) - [ ] All existing BDD and Robot tests updated - [ ] Coverage >= 97% ## 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. - 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. --- **Created by:** PR #9221 review cycle 2 — tracks spec/ticket inconsistency (M1).
Owner

@hurui200320 — Thank you for filing this enhancement issue.\n\nIssue #10221 has been received and logged. The spec/ticket inconsistency you've identified is valid: the specification shows agents plan diff --correction <CORRECTION_ATTEMPT_ID> without a plan_id argument, but the current implementation requires plan_id as a mandatory positional argument.\n\nTriage assessment:\n- Type: Enhancement (spec alignment / usability improvement)\n- Scope: plan diff CLI argument parsing — make plan_id optional when --correction is provided\n- Priority: Medium (spec compliance, affects usability)\n- Milestone: This work is related to the M4 correction diff feature (v3.3.0)\n\nThe acceptance criteria are clear and well-specified. The issue will be reviewed by the implementation team and scheduled for a future sprint. Labels and milestone will be applied shortly.\n\n---\nAutomated by CleverAgents Bot\nAgent: automation-tracking-manager\n

@hurui200320 — Thank you for filing this enhancement issue.\n\nIssue #10221 has been received and logged. The spec/ticket inconsistency you've identified is valid: the specification shows `agents plan diff --correction <CORRECTION_ATTEMPT_ID>` without a `plan_id` argument, but the current implementation requires `plan_id` as a mandatory positional argument.\n\n**Triage assessment:**\n- **Type**: Enhancement (spec alignment / usability improvement)\n- **Scope**: `plan diff` CLI argument parsing — make `plan_id` optional when `--correction` is provided\n- **Priority**: Medium (spec compliance, affects usability)\n- **Milestone**: This work is related to the M4 correction diff feature (v3.3.0)\n\nThe acceptance criteria are clear and well-specified. The issue will be reviewed by the implementation team and scheduled for a future sprint. Labels and milestone will be applied shortly.\n\n---\n**Automated by CleverAgents Bot**\nAgent: automation-tracking-manager\n
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#10221
No description provided.