Skip to content

[Feature]:Saga-tree visualization: 'cleo saga tree <id>' showing recursive saga→epic→task hierarchy with phase/severity/depends inline #404

@kryptobaseddev

Description

@kryptobaseddev

Feature Request

Summary

cleo saga members <id> returns flat list of member epic IDs. Building the full saga→epic→task hierarchy (with each epic's phase, dependency edges, and child tasks) requires 7+ separate commands the operator must compose mentally. A cleo saga tree <id> command would make multi-saga orchestration tractable.

Concrete need

To validate the SG-SoR (T119) dep graph during the 2026-05-21 session, I had to run:

cleo show T119                                 # see saga relates[type=groups] members
cleo list --parent T123                        # E-SoR.1 children (14 ADRs)
cleo list --parent T124                        # E-SoR.6 children
cleo list --parent T127                        # E-SoR.5 children
cleo show T127 | jq '.data.task.depends'       # T127 dep chain
cleo show T128 | jq '.data.task.depends'       # T128 dep chain
cleo show T125 | jq '.data.task.depends'       # T125 dep chain
cleo show T126 | jq '.data.task.depends'       # T126 dep chain
cleo show T124 | jq '.data.task.depends'       # T124 dep chain

…then mentally reconstruct the tree. The manual phase-status table in NEXT_SESSION.md is the artifact of this exercise. Without a built-in tree view, each orchestrator session repeats it.

Proposed design

cleo saga tree T119
# Output:
T119 SG-SoR — Kodo as relational System of Record [saga, pending]
├── T123 E-SoR.1 — Research + ADRs           [phase:R+C, pending, 14 children]
│   ├── T129 ADR-SoR-006 Evidence-span schema
│   ├── T130 ADR-SoR-007 Supersedence edges
│   ├── ...
│   └── T148 ADR-SoR-011 Gemini migration   [priority:critical, deadline:2026-06-01]
├── T122 E-SoR.2 — Entity graph             [phase:A+S, pending, 5 children]
├── T121 E-SoR.3 — DSL + extraction          [phase:A+S, pending, 6 children]
├── T120 E-SoR.4 — Cache + retrieval         [phase:A+S, pending, 0 children]
├── T127 E-SoR.5 — Foundation impl          [phase:D, depends:T120,T121,T122,T123]
├── T124 E-SoR.6 — Extraction impl           [phase:D, depends:T123,T121]
│   └── T149 Gemini cutover                  [priority:critical, deadline:2026-06-01]
├── T125 E-SoR.7 — Moat capabilities         [phase:D, depends:T127]
├── T128 E-SoR.8 — Cache impl                [phase:D, depends:T160]   ← cross-saga edge to T009/E-F.6
└── T126 E-SoR.9 — Validation                [phase:V, depends:T127,T124,T125,T128]

Cross-saga edges:
  T128 depends T160 (from T009/SG-Foundation/E-F.6 redis service)

Flags

  • --depth N — limit recursion
  • --show depends,phase,priority,severity,deadline — opt-in columns
  • --format text|json|mermaid — text-tree (default), JSON for programmatic, Mermaid for diagram embedding
  • --cross-track — highlight edges that cross saga boundaries

Impact

The user's manual analysis required ~7 separate commands to reconstruct what cleo saga tree T119 would emit in one call. For an orchestrator dispatching N agents, this is a high-frequency operation.

Pairs naturally with the saga-traversal bug fix (#390) and the deps-show rendering improvement (#399) — both depend on the same recursive-traversal engine.

Cross-ref

Surfaced during SG-SoR validation 2026-05-21. Related: #390 (orchestrate ready/waves saga traversal), #399 (deps show rendering).
Area: cli

Are you using an AI agent?

Yes - AI agent filed this issue


Environment

Component Version
CLEO 2026.2.1
Node.js v24.13.1
OS linux 6.19.14-200.fc43.x86_64 x64 (x64)
Shell /bin/bash
gh CLI gh version 2.87.3 (2026-02-23)
Install /home/keatonhoskins/.npm-global/bin/cleo

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageNeeds triage and prioritization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions