UAT: agents plan tree missing spec-required "Child Plans" and "Decision IDs (for correction)" panels — and missing success message #2748

Open
opened 2026-04-04 15:34:09 +00:00 by freemo · 0 comments
Owner

Bug Report

What Was Tested

agents plan tree rich output format in src/cleveragents/cli/commands/plan.py, tree_decisions_cmd() function.

Expected Behavior (from spec)

Per docs/specification.md §agents plan tree, the rich output must include four distinct sections after the decision tree:

  1. Tree Summary panel (partially tracked in #2546):
╭─ Tree Summary ─────────────╮
│ Nodes: 9                   │
│ Depth: 3                   │
│ Child Plans: 2+            │
│ Invariants: 2              │
│ Superseded: 0 (hidden)     │
╰────────────────────────────╯
  1. Child Plans panel (NOT yet tracked):
╭─ Child Plans ──────────────────────────────────────╮
│ ID          Phase    State                         │
│ ──────────  ───────  ─────────                     │
│ 01HXM9F1A   execute  processing                    │
│ 01HXM9F2B   execute  queued                        │
╰────────────────────────────────────────────────────╯
  1. Decision IDs (for correction) panel (NOT yet tracked):
╭─ Decision IDs (for correction) ──────────────────╮
│ Root: 01HXM9A0B1Q2W3R5G8Z0P4Q1X8                 │
│ Invariant 1: 01HXM9A0C1R3X4S6G9Z1P5Q2Y9          │
│ Strategy: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9             │
│ ...                                               │
╰──────────────────────────────────────────────────╯
  1. Success message (NOT yet tracked):
✓ OK Decision tree rendered

Actual Behavior

The current implementation in tree_decisions_cmd() (lines 3645–3772) renders only the Rich tree widget and then stops:

console.print(rich_tree)
# Function ends here — no Child Plans panel, no Decision IDs panel, no success message

The "Child Plans" panel is entirely absent. The "Decision IDs (for correction)" panel is entirely absent. The ✓ OK Decision tree rendered success message is absent.

For JSON/YAML output, the function returns tree_data from build_decision_tree() but does NOT include the child_plans array, decision_ids dict, or summary dict required by the spec's JSON schema:

{
  "command": "plan tree",
  "status": "ok",
  "data": {
    "plan_id": "...",
    "tree": { ... },
    "summary": { "nodes": 9, "depth": 3, "child_plans": "2+", "invariants": 2, "superseded": 0 },
    "child_plans": [
      { "id": "01HXM9F1A", "phase": "execute", "state": "processing" },
      { "id": "01HXM9F2B", "phase": "execute", "state": "queued" }
    ],
    "decision_ids": { "root": "...", "invariant_1": "...", ... }
  }
}

Missing Elements

  1. "Child Plans" panel — entirely missing from rich output; child plan IDs from subplan_spawn decisions are never displayed
  2. "Decision IDs (for correction)" panel — entirely missing; users cannot see decision IDs needed for agents plan correct
  3. ✓ OK Decision tree rendered success message — missing
  4. JSON/YAML child_plans field — missing from structured output
  5. JSON/YAML decision_ids field — missing from structured output

Code Location

src/cleveragents/cli/commands/plan.pytree_decisions_cmd() function, lines 3645–3772.

The Decision domain model at src/cleveragents/domain/models/core/decision.py already has downstream_plan_ids (line 351) which contains child plan ULIDs spawned from subplan_spawn decisions — this data is available but never displayed.

Steps to Reproduce

agents plan tree <PLAN_ID>

Observe: only the decision tree is shown; no Child Plans panel, no Decision IDs panel, no success message.

Impact

  • Users cannot see which child plans were spawned from a plan's decision tree
  • Users cannot easily find decision IDs needed for agents plan correct <DECISION_ID>
  • The output is significantly incomplete compared to the spec
  • #2546: Tracks the missing "Tree Summary" panel (separate issue)
  • This issue tracks the missing "Child Plans" panel, "Decision IDs" panel, and success message

Metadata

  • Branch: fix/plan-tree-missing-panels
  • Commit Message: fix(cli): add Child Plans, Decision IDs panels and success message to agents plan tree output
  • Milestone: v3.3.0
  • Parent Epic: #358

Subtasks

  • Add "Child Plans" Rich panel showing child plan IDs, phases, and states from subplan_spawn decisions
  • Add "Decision IDs (for correction)" Rich panel listing key decision IDs by type
  • Add ✓ OK Decision tree rendered success message
  • Add child_plans array to JSON/YAML output
  • Add decision_ids dict to JSON/YAML output

Definition of Done

  • Rich output includes all four spec-required sections after the decision tree
  • Child Plans panel shows actual child plan IDs from subplan_spawn decisions with their current phase/state
  • Decision IDs panel lists key decisions by type for use with agents plan correct
  • JSON/YAML output includes child_plans and decision_ids fields
  • All nox stages pass
  • Coverage >= 97%

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

## Bug Report ### What Was Tested `agents plan tree` rich output format in `src/cleveragents/cli/commands/plan.py`, `tree_decisions_cmd()` function. ### Expected Behavior (from spec) Per `docs/specification.md` §`agents plan tree`, the rich output must include **four** distinct sections after the decision tree: 1. **Tree Summary panel** (partially tracked in #2546): ``` ╭─ Tree Summary ─────────────╮ │ Nodes: 9 │ │ Depth: 3 │ │ Child Plans: 2+ │ │ Invariants: 2 │ │ Superseded: 0 (hidden) │ ╰────────────────────────────╯ ``` 2. **Child Plans panel** (NOT yet tracked): ``` ╭─ Child Plans ──────────────────────────────────────╮ │ ID Phase State │ │ ────────── ─────── ───────── │ │ 01HXM9F1A execute processing │ │ 01HXM9F2B execute queued │ ╰────────────────────────────────────────────────────╯ ``` 3. **Decision IDs (for correction) panel** (NOT yet tracked): ``` ╭─ Decision IDs (for correction) ──────────────────╮ │ Root: 01HXM9A0B1Q2W3R5G8Z0P4Q1X8 │ │ Invariant 1: 01HXM9A0C1R3X4S6G9Z1P5Q2Y9 │ │ Strategy: 01HXM9A1C2Q7W3R5G8Z0P4Q1X9 │ │ ... │ ╰──────────────────────────────────────────────────╯ ``` 4. **Success message** (NOT yet tracked): ``` ✓ OK Decision tree rendered ``` ### Actual Behavior The current implementation in `tree_decisions_cmd()` (lines 3645–3772) renders only the Rich tree widget and then **stops**: ```python console.print(rich_tree) # Function ends here — no Child Plans panel, no Decision IDs panel, no success message ``` The "Child Plans" panel is entirely absent. The "Decision IDs (for correction)" panel is entirely absent. The `✓ OK Decision tree rendered` success message is absent. For JSON/YAML output, the function returns `tree_data` from `build_decision_tree()` but does NOT include the `child_plans` array, `decision_ids` dict, or `summary` dict required by the spec's JSON schema: ```json { "command": "plan tree", "status": "ok", "data": { "plan_id": "...", "tree": { ... }, "summary": { "nodes": 9, "depth": 3, "child_plans": "2+", "invariants": 2, "superseded": 0 }, "child_plans": [ { "id": "01HXM9F1A", "phase": "execute", "state": "processing" }, { "id": "01HXM9F2B", "phase": "execute", "state": "queued" } ], "decision_ids": { "root": "...", "invariant_1": "...", ... } } } ``` ### Missing Elements 1. **"Child Plans" panel** — entirely missing from rich output; child plan IDs from `subplan_spawn` decisions are never displayed 2. **"Decision IDs (for correction)" panel** — entirely missing; users cannot see decision IDs needed for `agents plan correct` 3. **`✓ OK Decision tree rendered`** success message — missing 4. **JSON/YAML `child_plans` field** — missing from structured output 5. **JSON/YAML `decision_ids` field** — missing from structured output ### Code Location `src/cleveragents/cli/commands/plan.py` — `tree_decisions_cmd()` function, lines 3645–3772. The `Decision` domain model at `src/cleveragents/domain/models/core/decision.py` already has `downstream_plan_ids` (line 351) which contains child plan ULIDs spawned from `subplan_spawn` decisions — this data is available but never displayed. ### Steps to Reproduce ```bash agents plan tree <PLAN_ID> ``` Observe: only the decision tree is shown; no Child Plans panel, no Decision IDs panel, no success message. ### Impact - Users cannot see which child plans were spawned from a plan's decision tree - Users cannot easily find decision IDs needed for `agents plan correct <DECISION_ID>` - The output is significantly incomplete compared to the spec ### Note on Related Issues - #2546: Tracks the missing "Tree Summary" panel (separate issue) - This issue tracks the missing "Child Plans" panel, "Decision IDs" panel, and success message ## Metadata - **Branch**: `fix/plan-tree-missing-panels` - **Commit Message**: `fix(cli): add Child Plans, Decision IDs panels and success message to agents plan tree output` - **Milestone**: v3.3.0 - **Parent Epic**: #358 ## Subtasks - [ ] Add "Child Plans" Rich panel showing child plan IDs, phases, and states from `subplan_spawn` decisions - [ ] Add "Decision IDs (for correction)" Rich panel listing key decision IDs by type - [ ] Add `✓ OK Decision tree rendered` success message - [ ] Add `child_plans` array to JSON/YAML output - [ ] Add `decision_ids` dict to JSON/YAML output ## Definition of Done - [ ] Rich output includes all four spec-required sections after the decision tree - [ ] Child Plans panel shows actual child plan IDs from `subplan_spawn` decisions with their current phase/state - [ ] Decision IDs panel lists key decisions by type for use with `agents plan correct` - [ ] JSON/YAML output includes `child_plans` and `decision_ids` fields - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.3.0 milestone 2026-04-04 15:34:24 +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.

Dependencies

No dependencies set.

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