Files
cleveragents-core/features/plan_explain.feature
freemo 8ea00f5185
CI / unit_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / security (push) Has been cancelled
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / build (push) Has been cancelled
CI / push-validation (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / helm (push) Has been cancelled
fix: restore CI quality tests to passing state (#4175)
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-08 11:02:14 +00:00

144 lines
6.2 KiB
Gherkin

Feature: Plan explain and decision tree CLI commands
Validates the plan explain and plan tree commands including
formatting, filtering, and flag-controlled detail views.
# ------------------------------------------------------------------
# plan explain - default format
# ------------------------------------------------------------------
Scenario: Explain a decision with default format
Given a test decision for explain
When I build the explain dict with default options
Then the explain dict should contain key "decision_id"
And the explain dict should contain key "question"
And the explain dict should contain key "chosen"
And the explain dict should contain key "type"
And the explain dict should contain key "alternatives_considered"
And the explain dict should not contain key "rationale"
And the explain dict should not contain key "context_snapshot"
# ------------------------------------------------------------------
# plan explain - show-context
# ------------------------------------------------------------------
Scenario: Explain with show-context flag
Given a test decision with context snapshot for explain
When I build the explain dict with show-context enabled
Then the explain dict should contain key "context_snapshot"
And the context snapshot should contain key "hot_context_hash"
And the context snapshot should contain key "relevant_resources"
# ------------------------------------------------------------------
# plan explain - show-reasoning
# ------------------------------------------------------------------
Scenario: Explain with show-reasoning flag
Given a test decision with reasoning for explain
When I build the explain dict with show-reasoning enabled
Then the explain dict should contain key "rationale"
And the explain dict should contain key "actor_reasoning"
# ------------------------------------------------------------------
# plan explain - alternatives always included
# ------------------------------------------------------------------
Scenario: Explain includes alternatives by default
Given a test decision with alternatives for explain
When I build the explain dict with default options
Then the explain dict should contain key "alternatives_considered"
And the alternatives list should have 2 items
# ------------------------------------------------------------------
# plan explain - json format
# ------------------------------------------------------------------
Scenario: Explain with json format
Given a test decision for explain
When I format the explain dict as json
Then the json output should contain "decision_id"
And the json output should be valid json
# ------------------------------------------------------------------
# plan explain - yaml format
# ------------------------------------------------------------------
Scenario: Explain with yaml format
Given a test decision for explain
When I format the explain dict as yaml
Then the yaml output should contain "decision_id"
# ------------------------------------------------------------------
# plan explain - non-existent decision
# ------------------------------------------------------------------
Scenario: Explain for non-existent decision returns error marker
Given a non-existent decision id
Then the explain lookup should indicate not found
# ------------------------------------------------------------------
# plan tree - default format
# ------------------------------------------------------------------
Scenario: Tree with default format builds tree structure
Given a set of test decisions forming a tree
When I build the decision tree with default options
Then the tree should have at least 1 root node
And the first root node should have children
# ------------------------------------------------------------------
# plan tree - show-superseded
# ------------------------------------------------------------------
Scenario: Tree with show-superseded includes superseded decisions
Given a set of test decisions with superseded entries
When I build the decision tree with show-superseded enabled
Then the tree should include superseded decision nodes
# ------------------------------------------------------------------
# plan tree - depth limit
# ------------------------------------------------------------------
Scenario: Tree with depth limit restricts tree depth
Given a set of test decisions forming a deep tree
When I build the decision tree with depth 1
Then the root nodes should have no children
# ------------------------------------------------------------------
# plan tree - json format
# ------------------------------------------------------------------
# @tdd_issue @tdd_issue_4254 @tdd_expected_fail @skip
@skip
Scenario: Tree with json format
Given a set of test decisions forming a tree
When I format the tree as json
Then the json tree output should be valid json
And the json tree output should contain "decision_id"
# ------------------------------------------------------------------
# plan tree - yaml format
# ------------------------------------------------------------------
Scenario: Tree with yaml format
Given a set of test decisions forming a tree
When I format the tree as yaml
Then the yaml tree output should contain "decision_id"
# ------------------------------------------------------------------
# plan tree - no decisions
# ------------------------------------------------------------------
Scenario: Tree for plan with no decisions
Given an empty list of decisions
When I build the decision tree with default options from empty list
Then the tree should be empty
# ------------------------------------------------------------------
# plan tree - filters superseded by default
# ------------------------------------------------------------------
Scenario: Tree filters out superseded decisions by default
Given a set of test decisions with superseded entries
When I build the decision tree with default options
Then the tree should not include superseded decision nodes