agents plan tree output should display full ULIDs for all decisions, not truncated IDs #5825

Closed
opened 2026-04-09 10:13:34 +00:00 by CoreRasurae · 5 comments
Member

Background and Context

The agents plan tree command displays a decision tree for a plan, but truncates decision ULIDs to 8 characters for readability. This creates a usability gap: the displayed IDs are incomplete and cannot be used directly in follow-up CLI commands.

According to the specification (docs/specification.md, section "agents plan tree"), the output should include a dedicated "Decision IDs (for correction)" section that lists full ULIDs for each decision node. This allows users to:

  1. Copy IDs directly from tree output
  2. Use them immediately in correction commands like agents plan correct <DECISION_ID> --choose ...
  3. Avoid manual ID reconstruction or context-switching to other commands

Current Behavior

What users see:

Plan 01KNRTMV...
├── 01KNRTNX (strategy_choice) Q: Which strategy should the plan follow?
└── 01KNRTP7 (implementation_choice) Q: How should the plan be executed?

Decision IDs 01KNRTNX and 01KNRTP7 are truncated to 8 characters and cannot be used in CLI commands (they're incomplete ULIDs).

The CLI implementation (/app/src/cleveragents/cli/commands/plan.py, lines 4097-4099) truncates all decision ULIDs:

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

This truncation is applied to:

  • Tree node labels
  • Table view ID column
  • All displayed decision references

Result: Users cannot use displayed IDs directly in CLI commands without re-querying for full IDs.

Expected Behavior

Per specification example:

Plan 01KNRTMV5NPYDYN5ZZSN9DB4F7
├── 01KNRTNX1A2B3C4D5E6F7G8H9I0J1 (strategy_choice) Q: Which strategy should the plan follow?
└── 01KNRTP71K2L3M4N5O6P7Q8R9S0T1 (implementation_choice) Q: How should the plan be executed?

╭─ Decision IDs (for correction) ──────────────────────────────────────────╮
│ Strategy Choice: 01KNRTNX1A2B3C4D5E6F7G8H9I0J1                          │
│ Implementation Choice: 01KNRTP71K2L3M4N5O6P7Q8R9S0T1                    │
╰──────────────────────────────────────────────────────────────────────────╯

After this issue is resolved:

  1. agents plan tree displays full ULIDs for all decisions (no truncation)
  2. A "Decision IDs (for correction)" reference section is added to show full ULIDs in a dedicated format
  3. IDs can be copy-pasted directly from tree output into correction commands
  4. Both rich (default) and plain text output formats display full IDs
  5. The tree remains readable (full ULIDs are 26 characters, which is manageable in modern terminals)

Acceptance Criteria

  • agents plan tree displays full 26-character ULIDs for all decisions (not truncated)
  • Table format (--format=table) shows full ULIDs in the ID column
  • Rich/plain format includes a "Decision IDs (for correction)" section listing all decision ULIDs
  • All decision IDs displayed in tree output are copy-paste-ready for use in agents plan correct
  • Decision IDs remain properly formatted and aligned in output (not breaking terminal width)
  • Both root and child decisions show full ULIDs
  • Spec example output matches implementation output (per docs/specification.md)
  • No command-line option added (full ULIDs shown by default)
  • Code passes Pyright type checking: nox -s typecheck
  • Code passes linting: nox -s lint
  • All tests pass: nox

Supporting Information

Related Issues:

  • Affects: agents plan correct (users cannot easily reference the decisions to correct)
  • Related: Plan decision management and correction workflows

Reference Files:

  • Implementation: /app/src/cleveragents/cli/commands/plan.py (lines 4013-4130)
    • build_decision_tree() function (lines 3918-3980)
    • tree() command implementation (lines 4013-4130)
  • Specification: /app/docs/specification.md - Section "agents plan tree" (line ~14320+)
    • Expected output format with full ULIDs
    • "Decision IDs (for correction)" section requirement

Code Analysis:

File: /app/src/cleveragents/cli/commands/plan.py
Current behavior:
  - Line 4097: decision_id[:8] truncates to 8 chars
  - Rich tree view: Only shows truncated ID + type + question
  - Table view: Only shows decision_id[:8] in ID column
Missing:
  - "Decision IDs (for correction)" reference section
  - Full ULID display in tree
  - Full ULID in table ID column

Metadata

  • Commit Message: fix(cli): display full ULIDs in plan tree output for CLI usability
  • Branch: bugfix/m3-plan-tree-full-ulids

Subtasks

  • Code Changes

    • Update plan.py tree rendering to show full decision_id (remove [:8] truncation)
    • Update table view to show full decision_id in ID column
    • Add "Decision IDs (for correction)" section to rich/plain output
    • Ensure output remains readable with 26-char ULIDs
    • Format decision IDs section for easy copy-paste
  • Testing

    • Unit tests: Verify full ULIDs in output
    • Integration tests: Test tree command with multiple decision levels
    • Test all output formats (rich, plain, table, json, yaml)
    • Verify IDs are usable in follow-up commands
  • Quality Gates

    • Type checking: nox -s typecheck passes
    • Linting: nox -s lint passes
    • All tests: nox passes
  • Documentation

    • Verify spec matches implementation
    • Add/update examples in docstrings if needed
    • Update CHANGELOG.md

Definition of Done

This issue is complete when:

  • All subtasks are completed and checked off
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly
  • The commit is pushed to the remote on the branch matching Branch in Metadata
  • The commit is submitted as a pull request to master, reviewed, and merged
  • All CI checks pass (tests, type checking, linting, coverage)
  • agents plan tree displays full ULIDs that can be copy-pasted directly into correction commands
  • The output matches the specification example (full ULIDs, Decision IDs section included)
  • Users no longer need to truncate or reconstruct ULIDs from tree output
## Background and Context The `agents plan tree` command displays a decision tree for a plan, but truncates decision ULIDs to 8 characters for readability. This creates a usability gap: the displayed IDs are incomplete and cannot be used directly in follow-up CLI commands. According to the specification (`docs/specification.md`, section "agents plan tree"), the output should include a dedicated **"Decision IDs (for correction)"** section that lists full ULIDs for each decision node. This allows users to: 1. Copy IDs directly from tree output 2. Use them immediately in correction commands like `agents plan correct <DECISION_ID> --choose ...` 3. Avoid manual ID reconstruction or context-switching to other commands ## Current Behavior **What users see:** ``` Plan 01KNRTMV... ├── 01KNRTNX (strategy_choice) Q: Which strategy should the plan follow? └── 01KNRTP7 (implementation_choice) Q: How should the plan be executed? ``` Decision IDs `01KNRTNX` and `01KNRTP7` are truncated to 8 characters and **cannot be used in CLI commands** (they're incomplete ULIDs). The CLI implementation (`/app/src/cleveragents/cli/commands/plan.py`, lines 4097-4099) truncates all decision ULIDs: ```python label = ( f"[bold]{root_d.decision_id[:8]}[/bold] " # ← Truncates to 8 chars f"({root_d.decision_type}) " f"Q: {root_d.question[:40]}" ) ``` This truncation is applied to: - Tree node labels - Table view ID column - All displayed decision references **Result:** Users cannot use displayed IDs directly in CLI commands without re-querying for full IDs. ## Expected Behavior **Per specification example:** ``` Plan 01KNRTMV5NPYDYN5ZZSN9DB4F7 ├── 01KNRTNX1A2B3C4D5E6F7G8H9I0J1 (strategy_choice) Q: Which strategy should the plan follow? └── 01KNRTP71K2L3M4N5O6P7Q8R9S0T1 (implementation_choice) Q: How should the plan be executed? ╭─ Decision IDs (for correction) ──────────────────────────────────────────╮ │ Strategy Choice: 01KNRTNX1A2B3C4D5E6F7G8H9I0J1 │ │ Implementation Choice: 01KNRTP71K2L3M4N5O6P7Q8R9S0T1 │ ╰──────────────────────────────────────────────────────────────────────────╯ ``` After this issue is resolved: 1. `agents plan tree` displays **full ULIDs** for all decisions (no truncation) 2. A "Decision IDs (for correction)" reference section is added to show full ULIDs in a dedicated format 3. IDs can be copy-pasted directly from tree output into correction commands 4. Both rich (default) and plain text output formats display full IDs 5. The tree remains readable (full ULIDs are 26 characters, which is manageable in modern terminals) ## Acceptance Criteria - [ ] `agents plan tree` displays full 26-character ULIDs for all decisions (not truncated) - [ ] Table format (--format=table) shows full ULIDs in the ID column - [ ] Rich/plain format includes a "Decision IDs (for correction)" section listing all decision ULIDs - [ ] All decision IDs displayed in tree output are copy-paste-ready for use in `agents plan correct` - [ ] Decision IDs remain properly formatted and aligned in output (not breaking terminal width) - [ ] Both root and child decisions show full ULIDs - [ ] Spec example output matches implementation output (per docs/specification.md) - [ ] No command-line option added (full ULIDs shown by default) - [ ] Code passes Pyright type checking: `nox -s typecheck` - [ ] Code passes linting: `nox -s lint` - [ ] All tests pass: `nox` ## Supporting Information **Related Issues:** - Affects: `agents plan correct` (users cannot easily reference the decisions to correct) - Related: Plan decision management and correction workflows **Reference Files:** - **Implementation:** `/app/src/cleveragents/cli/commands/plan.py` (lines 4013-4130) - `build_decision_tree()` function (lines 3918-3980) - `tree()` command implementation (lines 4013-4130) - **Specification:** `/app/docs/specification.md` - Section "agents plan tree" (line ~14320+) - Expected output format with full ULIDs - "Decision IDs (for correction)" section requirement **Code Analysis:** ``` File: /app/src/cleveragents/cli/commands/plan.py Current behavior: - Line 4097: decision_id[:8] truncates to 8 chars - Rich tree view: Only shows truncated ID + type + question - Table view: Only shows decision_id[:8] in ID column Missing: - "Decision IDs (for correction)" reference section - Full ULID display in tree - Full ULID in table ID column ``` ## Metadata - **Commit Message**: `fix(cli): display full ULIDs in plan tree output for CLI usability` - **Branch**: `bugfix/m3-plan-tree-full-ulids` ## Subtasks - [ ] **Code Changes** - [ ] Update `plan.py` tree rendering to show full decision_id (remove [:8] truncation) - [ ] Update table view to show full decision_id in ID column - [ ] Add "Decision IDs (for correction)" section to rich/plain output - [ ] Ensure output remains readable with 26-char ULIDs - [ ] Format decision IDs section for easy copy-paste - [ ] **Testing** - [ ] Unit tests: Verify full ULIDs in output - [ ] Integration tests: Test tree command with multiple decision levels - [ ] Test all output formats (rich, plain, table, json, yaml) - [ ] Verify IDs are usable in follow-up commands - [ ] **Quality Gates** - [ ] Type checking: `nox -s typecheck` passes - [ ] Linting: `nox -s lint` passes - [ ] All tests: `nox` passes - [ ] **Documentation** - [ ] Verify spec matches implementation - [ ] Add/update examples in docstrings if needed - [ ] Update CHANGELOG.md ## Definition of Done This issue is complete when: - All subtasks are completed and checked off - A Git commit is created where the **first line** matches the Commit Message in Metadata exactly - The commit is pushed to the remote on the branch matching **Branch** in Metadata - The commit is submitted as a **pull request** to master, reviewed, and **merged** - All CI checks pass (tests, type checking, linting, coverage) - `agents plan tree` displays full ULIDs that can be copy-pasted directly into correction commands - The output matches the specification example (full ULIDs, Decision IDs section included) - Users no longer need to truncate or reconstruct ULIDs from tree output
HAL9000 added this to the v3.2.0 milestone 2026-04-09 10:22:32 +00:00
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
Owner

Thank you for filing this issue, @CoreRasurae. I'm reviewing it now and will provide triage feedback shortly.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

Thank you for filing this issue, @CoreRasurae. I'm reviewing it now and will provide triage feedback shortly. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Owner

Issue reviewed and triaged.

Completeness check per CONTRIBUTING.md:

  • Clear title
  • Background/context with spec reference
  • Current behavior with code location (plan.py lines 4097-4099)
  • Expected behavior with spec example output
  • Acceptance criteria
  • Subtasks checklist
  • Definition of Done
  • Metadata (commit message, branch name)
  • Milestone already assigned (v3.2.0 — correct, plan tree is a v3.2.0 feature)

This issue is well-formed and actionable.

Triage assessment:

  • Type: Bug — the current behavior (truncating ULIDs to 8 characters) deviates from the specification which requires full ULIDs and a "Decision IDs (for correction)" section.
  • Priority: Medium — this is a usability issue that affects the plan treeplan correct workflow, but it does not block core plan execution. Users can work around it by querying full IDs separately.
  • Story Points: S (2 points) — The fix is targeted: remove [:8] truncation in plan.py and add a "Decision IDs" section. The code location is clearly identified.
  • Milestone: v3.2.0 — already assigned, correct.
  • Parent Epic: I was unable to locate a specific "Plan Tree / Plan Lifecycle CLI" epic in the current open epics. This issue should be linked to a plan lifecycle epic. I will flag this as needing epic linkage — the backlog groomer or epic planner will address this.

Note on labels: The issue has a duplicate Priority/Medium label (one from the organization label set, one from the repository label set). The repository-level label should be removed — only organization-level labels should be used per CONTRIBUTING.md.

Next step: This issue is ready for implementation once the duplicate label is cleaned up and a parent epic is identified. The implementation team will pick it up in the normal course.


Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison

Issue reviewed and triaged. **Completeness check per CONTRIBUTING.md:** - Clear title - Background/context with spec reference - Current behavior with code location (`plan.py` lines 4097-4099) - Expected behavior with spec example output - Acceptance criteria - Subtasks checklist - Definition of Done - Metadata (commit message, branch name) - Milestone already assigned (v3.2.0 — correct, `plan tree` is a v3.2.0 feature) This issue is well-formed and actionable. **Triage assessment:** - **Type**: Bug — the current behavior (truncating ULIDs to 8 characters) deviates from the specification which requires full ULIDs and a "Decision IDs (for correction)" section. - **Priority**: Medium — this is a usability issue that affects the `plan tree` → `plan correct` workflow, but it does not block core plan execution. Users can work around it by querying full IDs separately. - **Story Points**: S (2 points) — The fix is targeted: remove `[:8]` truncation in `plan.py` and add a "Decision IDs" section. The code location is clearly identified. - **Milestone**: v3.2.0 — already assigned, correct. - **Parent Epic**: I was unable to locate a specific "Plan Tree / Plan Lifecycle CLI" epic in the current open epics. This issue should be linked to a plan lifecycle epic. I will flag this as needing epic linkage — the backlog groomer or epic planner will address this. **Note on labels**: The issue has a duplicate `Priority/Medium` label (one from the organization label set, one from the repository label set). The repository-level label should be removed — only organization-level labels should be used per CONTRIBUTING.md. **Next step**: This issue is ready for implementation once the duplicate label is cleaned up and a parent epic is identified. The implementation team will pick it up in the normal course. --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison
Owner

PR #6571 has been submitted by @CoreRasurae to address this issue. The issue has been transitioned to State/In Review.\n\n---\nAutomated by CleverAgents Bot\nSupervisor: Human Liaison | Agent: human-liaison

PR #6571 has been submitted by @CoreRasurae to address this issue. The issue has been transitioned to State/In Review.\n\n---\n**Automated by CleverAgents Bot**\nSupervisor: Human Liaison | Agent: human-liaison
Owner

PR #6571 has been merged. This issue should be closed as the fix has been implemented and merged to master.

Note: Forgejo prevented automatic closure due to open dependencies. Please close this issue manually if all dependencies are resolved.


Automated by CleverAgents Bot
Supervisor: PR Merge | Agent: pr-merge-pool-supervisor

PR #6571 has been merged. This issue should be closed as the fix has been implemented and merged to master. Note: Forgejo prevented automatic closure due to open dependencies. Please close this issue manually if all dependencies are resolved. --- **Automated by CleverAgents Bot** Supervisor: PR Merge | Agent: pr-merge-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#5825
No description provided.