UAT: plan explain missing Impact section and Correction hint panel #3593

Open
opened 2026-04-05 20:12:53 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/plan-explain-impact-correction-panel
  • Commit Message: fix(cli): add Impact section and Correction hint panel to plan explain output
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #394

Background

The agents plan explain <DECISION_ID> CLI command is missing two output panels required by the specification (docs/specification.md lines 14565–14609):

  1. Impact panel — showing downstream decision count, downstream child plan count, artifacts produced count, and correction impact level
  2. Correction hint panel — showing the agents plan correct <DECISION_ID> command hint

The _build_explain_dict() function in src/cleveragents/cli/commands/plan.py (lines 3528–3563) and explain_decision_cmd (lines 3566–3635) build the explain output but omit these fields, even though the Decision domain model (src/cleveragents/domain/models/core/decision.py) already exposes downstream_decision_ids, downstream_plan_ids, and artifacts_produced.

Steps to Reproduce

  1. Create a plan with at least one recorded decision
  2. Run agents plan explain <DECISION_ID>
  3. Observe that the Impact section and Correction hint panel are absent from the output

Expected Behaviour (per spec lines 14565–14609)

The plan explain output must include:

Panel Fields
Decision ID, Type, Question, Chosen, Confidence, Plan, Sequence, Created
Alternatives Considered All alternatives
Impact Downstream Decisions count, Downstream Child Plans count, Artifacts Produced count, Correction Impact level
Context Snapshot (when --show-context)
Rationale (when --show-reasoning)
Correction agents plan correct <DECISION_ID> command hint

Actual Behaviour

_build_explain_dict() returns: decision_id, plan_id, type, sequence, question, chosen, confidence, parent, is_correction, superseded, created_at, alternatives_considered.

Missing fields:

  • downstream_decision_ids count (available as decision.downstream_decision_ids)
  • downstream_plan_ids count (available as decision.downstream_plan_ids)
  • artifacts_produced count (available as decision.artifacts_produced)
  • Correction impact level (derived from downstream counts)
  • Correction hint panel rendering agents plan correct <DECISION_ID>

Affected Code

  • src/cleveragents/cli/commands/plan.py_build_explain_dict() (lines 3528–3563) and explain_decision_cmd (lines 3566–3635)
  • src/cleveragents/domain/models/core/decision.py — Decision model (fields already present, no model changes needed)

Subtasks

  • Add downstream_decisions_count, downstream_plans_count, artifacts_produced_count, and correction_impact fields to _build_explain_dict() return value
  • Render the Impact panel in explain_decision_cmd using the new fields
  • Render the Correction hint panel in explain_decision_cmd with the agents plan correct <DECISION_ID> command
  • Add/update Behave unit tests in features/ covering the new Impact and Correction panel output
  • Add/update Robot Framework integration tests in robot/ for the full plan explain output
  • Verify nox -e typecheck passes (no new # type: ignore suppressions)
  • Verify nox -e coverage_report >= 97%

Definition of Done

  • _build_explain_dict() returns all fields required by spec lines 14565–14609
  • explain_decision_cmd renders the Impact panel with downstream counts and correction impact level
  • explain_decision_cmd renders the Correction hint panel with the agents plan correct command
  • All Behave unit tests pass (nox -e unit_tests)
  • All Robot Framework integration tests pass (nox -e integration_tests)
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.3.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/plan-explain-impact-correction-panel` - **Commit Message**: `fix(cli): add Impact section and Correction hint panel to plan explain output` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #394 ## Background The `agents plan explain <DECISION_ID>` CLI command is missing two output panels required by the specification (docs/specification.md lines 14565–14609): 1. **Impact panel** — showing downstream decision count, downstream child plan count, artifacts produced count, and correction impact level 2. **Correction hint panel** — showing the `agents plan correct <DECISION_ID>` command hint The `_build_explain_dict()` function in `src/cleveragents/cli/commands/plan.py` (lines 3528–3563) and `explain_decision_cmd` (lines 3566–3635) build the explain output but omit these fields, even though the Decision domain model (`src/cleveragents/domain/models/core/decision.py`) already exposes `downstream_decision_ids`, `downstream_plan_ids`, and `artifacts_produced`. ## Steps to Reproduce 1. Create a plan with at least one recorded decision 2. Run `agents plan explain <DECISION_ID>` 3. Observe that the **Impact** section and **Correction** hint panel are absent from the output ## Expected Behaviour (per spec lines 14565–14609) The `plan explain` output must include: | Panel | Fields | |---|---| | Decision | ID, Type, Question, Chosen, Confidence, Plan, Sequence, Created | | Alternatives Considered | All alternatives | | **Impact** | Downstream Decisions count, Downstream Child Plans count, Artifacts Produced count, Correction Impact level | | Context Snapshot | (when `--show-context`) | | Rationale | (when `--show-reasoning`) | | **Correction** | `agents plan correct <DECISION_ID>` command hint | ## Actual Behaviour `_build_explain_dict()` returns: `decision_id`, `plan_id`, `type`, `sequence`, `question`, `chosen`, `confidence`, `parent`, `is_correction`, `superseded`, `created_at`, `alternatives_considered`. **Missing fields:** - `downstream_decision_ids` count (available as `decision.downstream_decision_ids`) - `downstream_plan_ids` count (available as `decision.downstream_plan_ids`) - `artifacts_produced` count (available as `decision.artifacts_produced`) - Correction impact level (derived from downstream counts) - Correction hint panel rendering `agents plan correct <DECISION_ID>` ## Affected Code - `src/cleveragents/cli/commands/plan.py` — `_build_explain_dict()` (lines 3528–3563) and `explain_decision_cmd` (lines 3566–3635) - `src/cleveragents/domain/models/core/decision.py` — Decision model (fields already present, no model changes needed) ## Subtasks - [ ] Add `downstream_decisions_count`, `downstream_plans_count`, `artifacts_produced_count`, and `correction_impact` fields to `_build_explain_dict()` return value - [ ] Render the **Impact** panel in `explain_decision_cmd` using the new fields - [ ] Render the **Correction** hint panel in `explain_decision_cmd` with the `agents plan correct <DECISION_ID>` command - [ ] Add/update Behave unit tests in `features/` covering the new Impact and Correction panel output - [ ] Add/update Robot Framework integration tests in `robot/` for the full `plan explain` output - [ ] Verify `nox -e typecheck` passes (no new `# type: ignore` suppressions) - [ ] Verify `nox -e coverage_report` >= 97% ## Definition of Done - [ ] `_build_explain_dict()` returns all fields required by spec lines 14565–14609 - [ ] `explain_decision_cmd` renders the Impact panel with downstream counts and correction impact level - [ ] `explain_decision_cmd` renders the Correction hint panel with the `agents plan correct` command - [ ] All Behave unit tests pass (`nox -e unit_tests`) - [ ] All Robot Framework integration tests pass (`nox -e integration_tests`) - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.3.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:14:45 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low — plan explain is missing the Impact section and Correction hint panel. The command works but doesn't show downstream decision counts or the correction command hint.
  • Milestone: v3.7.0
  • Story Points: 2 — S — The Decision model already has the required fields. Just need to add them to _build_explain_dict() and render two additional panels.
  • MoSCoW: Could Have — Output completeness improvement. The explain command shows the core decision information; the missing panels are supplementary.
  • Parent Epic: #394 (dependency link already exists)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Low — `plan explain` is missing the Impact section and Correction hint panel. The command works but doesn't show downstream decision counts or the correction command hint. - **Milestone**: v3.7.0 - **Story Points**: 2 — S — The Decision model already has the required fields. Just need to add them to `_build_explain_dict()` and render two additional panels. - **MoSCoW**: Could Have — Output completeness improvement. The explain command shows the core decision information; the missing panels are supplementary. - **Parent Epic**: #394 (dependency link already exists) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.7.0 milestone 2026-04-06 23:37:45 +00:00
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.

Blocks
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3593
No description provided.