UAT: agents plan correct --mode=append rich output missing spec-required structured panels #3216

Open
opened 2026-04-05 07:54:48 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: bugfix/plan-correct-append-rich-output-spec-compliance
  • Commit Message: fix(cli): render spec-required Correction, Append Detail, and Queued panels for plan correct append mode
  • Milestone: v3.2.0
  • Parent Epic: #357

Bug Report

Feature Area: agents plan correct CLI Command — append mode rich output (v3.2.0)

What was tested

Code analysis of src/cleveragents/cli/commands/plan.py:

  • Lines 3124–3131: else branch of the correction output handler (append mode output path)

Spec Reference

docs/specification.md lines 15082–15138 (agents plan correct --mode=append output specification)

Expected behavior (from spec)

When agents plan correct --mode=append is executed, the rich output must render three structured panels in sequence:

  1. Correction panel — showing Mode, Impact summary ("adds to existing subtree, no rollback"), New Decision ID, Appended After (original decision ID), and Attempt number
  2. Append Detail panel — showing that the original decision is preserved, existing artifacts are kept, and additional work is appended as a new child plan
  3. Queued panel — showing the number of new child plans queued and ETA

Spec output example (lines 15082–15138):

╭─ Correction ─────────────────────────────────────╮
│ Mode: append                                     │
│ Impact: adds to existing subtree, no rollback    │
│ New Decision: 01HXM9C3Z5T2Q8K2E9H7K3W2M8         │
│ Appended After: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9       │
│ Attempt: 2                                       │
╰──────────────────────────────────────────────────╯

╭─ Append Detail ─────────────────────────────────────────────────╮
│ Original decision preserved: yes                                │
│ Existing artifacts kept: yes                                    │
│ Additional work: appended as new child plan                     │
│ The original 5 artifacts remain; a new child plan will add      │
│ rate-limiting code on top of the existing auth changes.         │
╰─────────────────────────────────────────────────────────────────╯

╭─ Queued ──────────╮
│ New child: 1      │
│ ETA: 2m           │
╰───────────────────╯

✓ OK Append correction queued

Actual behavior (from code analysis)

The current implementation (src/cleveragents/cli/commands/plan.py, lines 3124–3131) only outputs a bare text line with no structured panel layout:

else:
    console.print(
        f"[green]✓[/green] Correction applied: {result.correction_id}"
    )
    if result.reverted_decisions:
        console.print(f"  Reverted: {', '.join(result.reverted_decisions)}")
    if result.new_decisions:
        console.print(f"  New decisions: {', '.join(result.new_decisions)}")

Specific deviations from the spec:

  • No Correction panel rendered (Mode, Impact, New Decision, Appended After, Attempt fields missing)
  • No Append Detail panel rendered (preservation status, artifact retention, child plan description missing)
  • No Queued panel rendered (new child count and ETA missing)
  • Wrong success message: outputs "✓ Correction applied: {id}" instead of spec-required "✓ OK Append correction queued"

Steps to Reproduce

  1. Create a plan with at least one decision
  2. Run: agents plan correct --mode=append --guidance "Add rate limiting" <DECISION_ID>
  3. Observe: Only a single line of text is output — no structured panels

Impact

This is a critical spec violation for v3.2.0. The structured panel output is part of the user-facing contract for the correction feature and is required for milestone acceptance criteria.

Subtasks

  • Identify the append-mode output branch in src/cleveragents/cli/commands/plan.py (lines 3124–3131)
  • Implement Correction panel rendering: Mode, Impact, New Decision ID, Appended After, Attempt
  • Implement Append Detail panel rendering: original decision preserved, existing artifacts kept, additional work description
  • Implement Queued panel rendering: new child count, ETA
  • Replace success message "✓ Correction applied: {id}" with "✓ OK Append correction queued"
  • Tests (Behave): Add/update BDD scenarios for plan correct --mode=append rich output
  • Tests (Robot): Add integration test for append correction panel rendering
  • 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.
  • The three spec-required panels (Correction, Append Detail, Queued) are rendered exactly as described in docs/specification.md lines 15082–15138.
  • The success message reads ✓ OK Append correction queued (not Correction applied).
  • 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.
  • All nox stages pass.
  • Coverage ≥ 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `bugfix/plan-correct-append-rich-output-spec-compliance` - **Commit Message**: `fix(cli): render spec-required Correction, Append Detail, and Queued panels for plan correct append mode` - **Milestone**: v3.2.0 - **Parent Epic**: #357 ## Bug Report **Feature Area**: `agents plan correct` CLI Command — append mode rich output (v3.2.0) ### What was tested Code analysis of `src/cleveragents/cli/commands/plan.py`: - Lines 3124–3131: `else` branch of the correction output handler (append mode output path) ### Spec Reference `docs/specification.md` lines 15082–15138 (`agents plan correct --mode=append` output specification) ### Expected behavior (from spec) When `agents plan correct --mode=append` is executed, the rich output must render **three structured panels** in sequence: 1. **Correction panel** — showing Mode, Impact summary ("adds to existing subtree, no rollback"), New Decision ID, Appended After (original decision ID), and Attempt number 2. **Append Detail panel** — showing that the original decision is preserved, existing artifacts are kept, and additional work is appended as a new child plan 3. **Queued panel** — showing the number of new child plans queued and ETA Spec output example (lines 15082–15138): ``` ╭─ Correction ─────────────────────────────────────╮ │ Mode: append │ │ Impact: adds to existing subtree, no rollback │ │ New Decision: 01HXM9C3Z5T2Q8K2E9H7K3W2M8 │ │ Appended After: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9 │ │ Attempt: 2 │ ╰──────────────────────────────────────────────────╯ ╭─ Append Detail ─────────────────────────────────────────────────╮ │ Original decision preserved: yes │ │ Existing artifacts kept: yes │ │ Additional work: appended as new child plan │ │ The original 5 artifacts remain; a new child plan will add │ │ rate-limiting code on top of the existing auth changes. │ ╰─────────────────────────────────────────────────────────────────╯ ╭─ Queued ──────────╮ │ New child: 1 │ │ ETA: 2m │ ╰───────────────────╯ ✓ OK Append correction queued ``` ### Actual behavior (from code analysis) The current implementation (`src/cleveragents/cli/commands/plan.py`, lines 3124–3131) only outputs a bare text line with no structured panel layout: ```python else: console.print( f"[green]✓[/green] Correction applied: {result.correction_id}" ) if result.reverted_decisions: console.print(f" Reverted: {', '.join(result.reverted_decisions)}") if result.new_decisions: console.print(f" New decisions: {', '.join(result.new_decisions)}") ``` Specific deviations from the spec: - **No Correction panel** rendered (Mode, Impact, New Decision, Appended After, Attempt fields missing) - **No Append Detail panel** rendered (preservation status, artifact retention, child plan description missing) - **No Queued panel** rendered (new child count and ETA missing) - **Wrong success message**: outputs `"✓ Correction applied: {id}"` instead of spec-required `"✓ OK Append correction queued"` ### Steps to Reproduce 1. Create a plan with at least one decision 2. Run: `agents plan correct --mode=append --guidance "Add rate limiting" <DECISION_ID>` 3. Observe: Only a single line of text is output — no structured panels ### Impact This is a critical spec violation for v3.2.0. The structured panel output is part of the user-facing contract for the correction feature and is required for milestone acceptance criteria. ## Subtasks - [ ] Identify the append-mode output branch in `src/cleveragents/cli/commands/plan.py` (lines 3124–3131) - [ ] Implement **Correction panel** rendering: Mode, Impact, New Decision ID, Appended After, Attempt - [ ] Implement **Append Detail panel** rendering: original decision preserved, existing artifacts kept, additional work description - [ ] Implement **Queued panel** rendering: new child count, ETA - [ ] Replace success message `"✓ Correction applied: {id}"` with `"✓ OK Append correction queued"` - [ ] Tests (Behave): Add/update BDD scenarios for `plan correct --mode=append` rich output - [ ] Tests (Robot): Add integration test for append correction panel rendering - [ ] 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. - The three spec-required panels (Correction, Append Detail, Queued) are rendered exactly as described in `docs/specification.md` lines 15082–15138. - The success message reads `✓ OK Append correction queued` (not `Correction applied`). - 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. - All nox stages pass. - Coverage ≥ 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-05 07:58:05 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:50:21 +00:00
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#3216
No description provided.