feat(decisions): implement agents plan tree CLI command #8525

Open
opened 2026-04-13 20:36:09 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit message type: feat
  • Scope: decisions
  • Branch name prefix: feat/v3.2.0-plan-tree-cli

Background and Context

As part of Epic #8477 (Decision Recording & Persistence), the agents plan tree command provides users with a visual representation of the decision tree for a given plan. This is essential for understanding how decisions were made and what the plan structure looks like.

This issue depends on the Decision data model and recording hooks being implemented first.

This issue blocks Epic #8477.

Expected Behavior

  • agents plan tree [plan-id] renders a visual tree of all decisions in the specified plan
  • The tree shows the hierarchy of decisions, their phases, and status
  • If no plan-id is given, shows the most recent plan's decision tree
  • Output is formatted for terminal display with proper indentation and symbols

Acceptance Criteria

  • agents plan tree command is registered in the CLI
  • Command accepts an optional plan-id argument
  • Output renders a tree structure showing decision hierarchy
  • Each node shows: decision ID (short), phase, timestamp, outcome summary
  • Corrected nodes are visually marked (e.g., with a ✓ or [corrected] tag)
  • Command handles empty decision tree gracefully (shows "No decisions recorded")
  • Integration tests verify tree output format for a known decision tree
  • Unit tests achieve >= 97% coverage for tree rendering logic

Subtasks

  • Register plan tree subcommand in the CLI argument parser
  • Implement decision tree query (fetch all decisions for a plan, ordered by hierarchy)
  • Implement tree rendering function (ASCII/Unicode tree format)
  • Add visual markers for corrected nodes
  • Handle edge cases: empty tree, single-node tree, deep nesting
  • Write unit tests for tree rendering
  • Write integration tests for agents plan tree end-to-end

Definition of Done

  1. agents plan tree command is functional and renders correct output
  2. Integration tests verify tree output for a known decision tree
  3. Unit tests pass with >= 97% coverage for new code
  4. Help text is updated for the new command
  5. Code reviewed and merged to main branch

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit message type**: `feat` - **Scope**: `decisions` - **Branch name prefix**: `feat/v3.2.0-plan-tree-cli` ## Background and Context As part of Epic #8477 (Decision Recording & Persistence), the `agents plan tree` command provides users with a visual representation of the decision tree for a given plan. This is essential for understanding how decisions were made and what the plan structure looks like. This issue depends on the Decision data model and recording hooks being implemented first. This issue blocks Epic #8477. ## Expected Behavior - `agents plan tree [plan-id]` renders a visual tree of all decisions in the specified plan - The tree shows the hierarchy of decisions, their phases, and status - If no plan-id is given, shows the most recent plan's decision tree - Output is formatted for terminal display with proper indentation and symbols ## Acceptance Criteria - [ ] `agents plan tree` command is registered in the CLI - [ ] Command accepts an optional `plan-id` argument - [ ] Output renders a tree structure showing decision hierarchy - [ ] Each node shows: decision ID (short), phase, timestamp, outcome summary - [ ] Corrected nodes are visually marked (e.g., with a ✓ or [corrected] tag) - [ ] Command handles empty decision tree gracefully (shows "No decisions recorded") - [ ] Integration tests verify tree output format for a known decision tree - [ ] Unit tests achieve >= 97% coverage for tree rendering logic ## Subtasks - [ ] Register `plan tree` subcommand in the CLI argument parser - [ ] Implement decision tree query (fetch all decisions for a plan, ordered by hierarchy) - [ ] Implement tree rendering function (ASCII/Unicode tree format) - [ ] Add visual markers for corrected nodes - [ ] Handle edge cases: empty tree, single-node tree, deep nesting - [ ] Write unit tests for tree rendering - [ ] Write integration tests for `agents plan tree` end-to-end ## Definition of Done 1. `agents plan tree` command is functional and renders correct output 2. Integration tests verify tree output for a known decision tree 3. Unit tests pass with >= 97% coverage for new code 4. Help text is updated for the new command 5. Code reviewed and merged to main branch --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.2.0 milestone 2026-04-13 20:57:05 +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.

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