Files
khyari hamza 3e25b41a3a feat(cli): add plan explain and decision tree outputs
Add `plan explain` and `plan tree` CLI commands that format decision
trees in json/yaml/table/rich formats. Flags control views for
superseded decisions, context snapshots, and reasoning details.

- plan explain <decision_id>: renders a single decision with optional
  --show-context, --show-reasoning, --show-alternatives flags
- plan tree <plan_id>: renders full decision tree with optional
  --show-superseded and --depth flags
- BFS tree building uses collections.deque (no list.pop(0))
- Behave BDD scenarios (14 scenarios, 54 steps)
- Robot Framework smoke tests with helper script
- ASV benchmarks for explain formatting and tree operations
- Updated docs/reference/plan_cli.md and CHANGELOG.md

ISSUES CLOSED: #174
2026-03-03 12:10:25 +00:00

22 lines
886 B
Plaintext

*** Settings ***
Documentation Smoke tests for plan explain and plan tree CLI logic
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER_SCRIPT} robot/helper_plan_explain.py
*** Test Cases ***
Plan Explain Formatting
[Documentation] Build explain dict and verify output
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} explain_format cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-explain-ok
Plan Tree Build
[Documentation] Build decision tree from flat decisions list
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} tree_build cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} plan-tree-ok