UAT: agents plan tree node labels show truncated decision_id prefix instead of spec-required [type] "question" format #5975

Open
opened 2026-04-09 12:48:46 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Decision Tree Rendering
Command: agents plan tree <PLAN_ID>
Milestone: v3.2.0
Severity: Non-critical (Priority/Backlog)


What Was Tested

Code analysis of the rich tree node label rendering in src/cleveragents/cli/commands/plan.py (lines 4096–4119) against the specification at docs/specification.md §agents plan tree rich example (lines 14341–14349).


Expected Behavior (from spec §14341–14349)

Tree node labels should follow the format:

[type] "question/description text"

With additional details for specific types:

  • strategy_choice nodes: [strategy_choice] "description" (confidence: 0.82)
  • subplan_spawn nodes: [subplan_spawn] "description" → Plan: 01HXM9F1A

Spec example:

├─ [prompt_definition] "Increase test coverage to 85%"
├─ [invariant_enforced] "Prioritize financial transaction and user mgmt code"
├─ [invariant_enforced] "All API calls over TCP must be mocked"
├─ [strategy_choice] "Prioritize auth and payments" (confidence: 0.82)
├─ [subplan_parallel_spawn] "Implement auth and payment modules, in parallel"
│  ├─ [subplan_spawn] "Write auth tests" → Plan: 01HXM9F1A
│  └─ [subplan_spawn] "Write payment tests" → Plan: 01HXM9F2B

Actual Behavior

The current implementation (lines 4096–4119) renders node labels as:

XXXXXXXX (type) Q: question text truncated to 40 chars

For example:

01HXM8C2 (prompt_definition) Q: Increase test coverage to 85%

Specific deviations:

  1. Truncated decision_id prefix (01HXM8C2): The spec does not show decision IDs in the tree node labels (they are shown in the separate "Decision IDs" panel). The implementation prepends an 8-character decision ID prefix to every node.

  2. Q: prefix on question: The spec uses "question text" (quoted), not Q: question text.

  3. No confidence shown: strategy_choice nodes should show (confidence: 0.82) but the implementation does not include confidence in the label.

  4. No child plan reference: subplan_spawn nodes should show → Plan: <PLAN_ID> but the implementation does not include child plan IDs.

  5. Type format: The spec uses [type] (square brackets), the implementation uses (type) (parentheses).

Code location: src/cleveragents/cli/commands/plan.py, lines 4096–4119

label = (
    f"[bold]{root_d.decision_id[:8]}[/bold] "
    f"({root_d.decision_type}) "
    f"Q: {root_d.question[:40]}"
)

Steps to Reproduce

  1. Create a plan with decisions
  2. Run agents plan tree <PLAN_ID>
  3. Observe: 01HXM8C2 (prompt_definition) Q: Increase test coverage... instead of [prompt_definition] "Increase test coverage to 85%"

Impact

The tree output is harder to read than the spec intends:

  • Decision IDs clutter the tree (they belong in the separate Decision IDs panel)
  • Missing confidence scores make it harder to assess decision quality at a glance
  • Missing child plan references make it harder to navigate to spawned subplans

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** Decision Tree Rendering **Command:** `agents plan tree <PLAN_ID>` **Milestone:** v3.2.0 **Severity:** Non-critical (Priority/Backlog) --- ## What Was Tested Code analysis of the rich tree node label rendering in `src/cleveragents/cli/commands/plan.py` (lines 4096–4119) against the specification at `docs/specification.md` §agents plan tree rich example (lines 14341–14349). --- ## Expected Behavior (from spec §14341–14349) Tree node labels should follow the format: ``` [type] "question/description text" ``` With additional details for specific types: - `strategy_choice` nodes: `[strategy_choice] "description" (confidence: 0.82)` - `subplan_spawn` nodes: `[subplan_spawn] "description" → Plan: 01HXM9F1A` Spec example: ``` ├─ [prompt_definition] "Increase test coverage to 85%" ├─ [invariant_enforced] "Prioritize financial transaction and user mgmt code" ├─ [invariant_enforced] "All API calls over TCP must be mocked" ├─ [strategy_choice] "Prioritize auth and payments" (confidence: 0.82) ├─ [subplan_parallel_spawn] "Implement auth and payment modules, in parallel" │ ├─ [subplan_spawn] "Write auth tests" → Plan: 01HXM9F1A │ └─ [subplan_spawn] "Write payment tests" → Plan: 01HXM9F2B ``` --- ## Actual Behavior The current implementation (lines 4096–4119) renders node labels as: ``` XXXXXXXX (type) Q: question text truncated to 40 chars ``` For example: ``` 01HXM8C2 (prompt_definition) Q: Increase test coverage to 85% ``` **Specific deviations:** 1. **Truncated decision_id prefix** (`01HXM8C2`): The spec does not show decision IDs in the tree node labels (they are shown in the separate "Decision IDs" panel). The implementation prepends an 8-character decision ID prefix to every node. 2. **`Q:` prefix on question**: The spec uses `"question text"` (quoted), not `Q: question text`. 3. **No confidence shown**: `strategy_choice` nodes should show `(confidence: 0.82)` but the implementation does not include confidence in the label. 4. **No child plan reference**: `subplan_spawn` nodes should show `→ Plan: <PLAN_ID>` but the implementation does not include child plan IDs. 5. **Type format**: The spec uses `[type]` (square brackets), the implementation uses `(type)` (parentheses). **Code location:** `src/cleveragents/cli/commands/plan.py`, lines 4096–4119 ```python label = ( f"[bold]{root_d.decision_id[:8]}[/bold] " f"({root_d.decision_type}) " f"Q: {root_d.question[:40]}" ) ``` --- ## Steps to Reproduce 1. Create a plan with decisions 2. Run `agents plan tree <PLAN_ID>` 3. Observe: `01HXM8C2 (prompt_definition) Q: Increase test coverage...` instead of `[prompt_definition] "Increase test coverage to 85%"` --- ## Impact The tree output is harder to read than the spec intends: - Decision IDs clutter the tree (they belong in the separate Decision IDs panel) - Missing confidence scores make it harder to assess decision quality at a glance - Missing child plan references make it harder to navigate to spawned subplans --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 13:39:43 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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.

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