feat(decisions): implement plan tree renderer for agents plan tree CLI command #4991

Open
opened 2026-04-09 00:20:37 +00:00 by HAL9000 · 3 comments
Owner

Metadata

  • Commit Message: feat(decisions): implement plan tree renderer for agents plan tree CLI command
  • Branch: feat/m3/plan-tree-renderer
  • Milestone: v3.2.0
  • Parent Epic: #4958

Background and Context

The agents plan tree command needs to render the decision tree from the database. Currently the command exists but does not produce the spec-required JSON envelope (see #4976) and the tree visualization is incomplete.

This issue implements the PlanTreeRenderer that reads decisions from the DB and renders them as a Rich tree or JSON output.

Expected Behavior

  • agents plan tree <PLAN_ID> renders a visual decision tree using Rich
  • agents plan tree <PLAN_ID> --format json produces the spec-required JSON envelope
  • agents plan tree <PLAN_ID> --show-superseded includes superseded decisions
  • Tree shows decision IDs, types, and relationships

Acceptance Criteria

  • PlanTreeRenderer class implemented in src/cleveragents/decisions/
  • Rich tree output matches spec format (decision IDs, types, relationships)
  • JSON output uses spec-required envelope: {"command": "plan tree", "status": "ok", "exit_code": 0, "data": {...}}
  • --show-superseded flag includes superseded decisions in output
  • agents plan tree CLI command wired to PlanTreeRenderer
  • Unit tests (Behave) cover tree rendering scenarios
  • Integration test (Robot) verifies end-to-end tree output

Subtasks

  • Implement PlanTreeRenderer service
  • Implement Rich tree output format
  • Implement JSON envelope output (fix #4976)
  • Wire --show-superseded flag
  • Update agents plan tree CLI command
  • Tests (Behave): Add scenarios for tree rendering
  • Tests (Robot): Add integration test
  • 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.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • 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.

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Metadata - **Commit Message**: `feat(decisions): implement plan tree renderer for agents plan tree CLI command` - **Branch**: `feat/m3/plan-tree-renderer` - **Milestone**: v3.2.0 - **Parent Epic**: #4958 ## Background and Context The `agents plan tree` command needs to render the decision tree from the database. Currently the command exists but does not produce the spec-required JSON envelope (see #4976) and the tree visualization is incomplete. This issue implements the `PlanTreeRenderer` that reads decisions from the DB and renders them as a Rich tree or JSON output. ## Expected Behavior - `agents plan tree <PLAN_ID>` renders a visual decision tree using Rich - `agents plan tree <PLAN_ID> --format json` produces the spec-required JSON envelope - `agents plan tree <PLAN_ID> --show-superseded` includes superseded decisions - Tree shows decision IDs, types, and relationships ## Acceptance Criteria - [ ] `PlanTreeRenderer` class implemented in `src/cleveragents/decisions/` - [ ] Rich tree output matches spec format (decision IDs, types, relationships) - [ ] JSON output uses spec-required envelope: `{"command": "plan tree", "status": "ok", "exit_code": 0, "data": {...}}` - [ ] `--show-superseded` flag includes superseded decisions in output - [ ] `agents plan tree` CLI command wired to `PlanTreeRenderer` - [ ] Unit tests (Behave) cover tree rendering scenarios - [ ] Integration test (Robot) verifies end-to-end tree output ## Subtasks - [ ] Implement `PlanTreeRenderer` service - [ ] Implement Rich tree output format - [ ] Implement JSON envelope output (fix #4976) - [ ] Wire `--show-superseded` flag - [ ] Update `agents plan tree` CLI command - [ ] Tests (Behave): Add scenarios for tree rendering - [ ] Tests (Robot): Add integration test - [ ] 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. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - 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. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:03:37 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Core decision recording feature required for Decision Intelligence Legendary
  • Milestone: v3.2.0
  • Story Points: 8 — XL
  • MoSCoW: Must Have — Required for Decision Recording Epic (#4958)
  • Parent Epic: #4958

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Core decision recording feature required for Decision Intelligence Legendary - **Milestone**: v3.2.0 - **Story Points**: 8 — XL - **MoSCoW**: Must Have — Required for Decision Recording Epic (#4958) - **Parent Epic**: #4958 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Core decision recording feature required for Decision Intelligence Legendary
  • Milestone: v3.2.0
  • Story Points: 8 — XL
  • MoSCoW: Must Have — Required for Decision Recording Epic (#4958)
  • Parent Epic: #4958

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Core decision recording feature required for Decision Intelligence Legendary - **Milestone**: v3.2.0 - **Story Points**: 8 — XL - **MoSCoW**: Must Have — Required for Decision Recording Epic (#4958) - **Parent Epic**: #4958 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Core decision recording feature required for Decision Recording Epic (#4958)
  • Milestone: v3.2.0
  • Story Points: 8 — XL
  • MoSCoW: Must Have — Required for Decision Recording Epic (#4958)
  • Parent Epic: #4958

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Core decision recording feature required for Decision Recording Epic (#4958) - **Milestone**: v3.2.0 - **Story Points**: 8 — XL - **MoSCoW**: Must Have — Required for Decision Recording Epic (#4958) - **Parent Epic**: #4958 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#4991
No description provided.