UAT: agents plan tree rich output missing spec-required panels and node format #3153

Open
opened 2026-04-05 06:59:55 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: bugfix/plan-tree-rich-output-spec-compliance
  • Commit Message: fix(cli): add spec-required panels and node format to plan tree rich output
  • Milestone: v3.2.0
  • Parent Epic: #357

Bug Report

Feature Area: plan tree and plan explain CLI Commands (v3.2.0)

What was tested

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

  • Lines 3646–3773: tree_decisions_cmd command and its rich output rendering (lines 3726–3773)
  • Lines 3570–3643: build_decision_tree helper function

Spec Reference

docs/specification.md lines 14319–14543 (agents plan tree command specification)
docs/reference/plan_cli.md lines 262–297

Expected behavior (from spec)

The agents plan tree rich output must render:

  1. A "Decision Tree" panel with hierarchical tree where each node is formatted as:

    • [decision_type] in brackets (e.g., [prompt_definition], [strategy_choice])
    • The decision summary/question text
    • Confidence score shown inline for applicable nodes: (confidence: 0.82)
    • Superseded decisions shown dimmed/annotated when --show-superseded is used
  2. A "Tree Summary" panel containing:

    • Nodes count
    • Depth
    • Child Plans count
    • Invariants count
    • Superseded count (with "hidden" note when not shown)
  3. A "Child Plans" panel with columns: ID, Phase, State

  4. A "Decision IDs (for correction)" panel listing decision IDs by role (Root, Invariant N, Strategy, etc.)

  5. A success message: ✓ OK Decision tree rendered

Actual behavior (from code analysis)

The current implementation (tree_decisions_cmd, lines 3726–3773) renders only a basic RichTree with:

  • Node format: [bold]{decision_id[:8]}[/bold] ({decision_type}) Q: {question[:40]} — uses parentheses () not brackets [], and does NOT show confidence score
  • No "Tree Summary" panel — completely absent
  • No "Child Plans" panel — completely absent
  • No "Decision IDs (for correction)" panel — completely absent
  • No success message✓ OK Decision tree rendered is never printed

Code location

src/cleveragents/cli/commands/plan.py:

  • Lines 3726–3773: Rich output rendering in tree_decisions_cmd
  • Line 3749: Node label format: f"[bold]{root_d.decision_id[:8]}[/bold] ({root_d.decision_type}) Q: {root_d.question[:40]}" — missing [brackets] format and confidence

Steps to reproduce

  1. Create a plan with decisions recorded
  2. Run: agents plan tree <PLAN_ID>
  3. Observe: Only a basic tree with wrong node format, no summary/child plans/decision IDs panels

Impact

This directly blocks the v3.2.0 milestone acceptance criterion:

agents plan tree renders the decision tree correctly

Subtasks

  • Fix node label format to use [decision_type] brackets and include confidence score
  • Add "Tree Summary" panel (Nodes, Depth, Child Plans, Invariants, Superseded)
  • Add "Child Plans" panel with ID/Phase/State columns
  • Add "Decision IDs (for correction)" panel
  • Add ✓ OK Decision tree rendered success message
  • Add Behave unit tests for the new panel rendering
  • Verify nox passes

Definition of Done

  • All panels render as specified in docs/specification.md lines 14333–14378
  • Node format uses [decision_type] brackets with confidence score
  • Success message is printed
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `bugfix/plan-tree-rich-output-spec-compliance` - **Commit Message**: `fix(cli): add spec-required panels and node format to plan tree rich output` - **Milestone**: v3.2.0 - **Parent Epic**: #357 ## Bug Report **Feature Area**: plan tree and plan explain CLI Commands (v3.2.0) ### What was tested Code analysis of `src/cleveragents/cli/commands/plan.py`: - Lines 3646–3773: `tree_decisions_cmd` command and its rich output rendering (lines 3726–3773) - Lines 3570–3643: `build_decision_tree` helper function ### Spec Reference `docs/specification.md` lines 14319–14543 (`agents plan tree` command specification) `docs/reference/plan_cli.md` lines 262–297 ### Expected behavior (from spec) The `agents plan tree` rich output must render: 1. **A "Decision Tree" panel** with hierarchical tree where each node is formatted as: - `[decision_type]` in brackets (e.g., `[prompt_definition]`, `[strategy_choice]`) - The decision summary/question text - Confidence score shown inline for applicable nodes: `(confidence: 0.82)` - Superseded decisions shown dimmed/annotated when `--show-superseded` is used 2. **A "Tree Summary" panel** containing: - Nodes count - Depth - Child Plans count - Invariants count - Superseded count (with "hidden" note when not shown) 3. **A "Child Plans" panel** with columns: ID, Phase, State 4. **A "Decision IDs (for correction)" panel** listing decision IDs by role (Root, Invariant N, Strategy, etc.) 5. **A success message**: `✓ OK Decision tree rendered` ### Actual behavior (from code analysis) The current implementation (`tree_decisions_cmd`, lines 3726–3773) renders only a basic `RichTree` with: - Node format: `[bold]{decision_id[:8]}[/bold] ({decision_type}) Q: {question[:40]}` — uses parentheses `()` not brackets `[]`, and does NOT show confidence score - **No "Tree Summary" panel** — completely absent - **No "Child Plans" panel** — completely absent - **No "Decision IDs (for correction)" panel** — completely absent - **No success message** — `✓ OK Decision tree rendered` is never printed ### Code location `src/cleveragents/cli/commands/plan.py`: - Lines 3726–3773: Rich output rendering in `tree_decisions_cmd` - Line 3749: Node label format: `f"[bold]{root_d.decision_id[:8]}[/bold] ({root_d.decision_type}) Q: {root_d.question[:40]}"` — missing `[brackets]` format and confidence ### Steps to reproduce 1. Create a plan with decisions recorded 2. Run: `agents plan tree <PLAN_ID>` 3. Observe: Only a basic tree with wrong node format, no summary/child plans/decision IDs panels ### Impact This directly blocks the v3.2.0 milestone acceptance criterion: > `agents plan tree` renders the decision tree correctly ## Subtasks - [ ] Fix node label format to use `[decision_type]` brackets and include confidence score - [ ] Add "Tree Summary" panel (Nodes, Depth, Child Plans, Invariants, Superseded) - [ ] Add "Child Plans" panel with ID/Phase/State columns - [ ] Add "Decision IDs (for correction)" panel - [ ] Add `✓ OK Decision tree rendered` success message - [ ] Add Behave unit tests for the new panel rendering - [ ] Verify `nox` passes ## Definition of Done - [ ] All panels render as specified in `docs/specification.md` lines 14333–14378 - [ ] Node format uses `[decision_type]` brackets with confidence score - [ ] Success message is printed - [ ] 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:00:55 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:50:26 +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#3153
No description provided.