[BUG] agents plan explain missing impact section and correction_hint field in output #9167

Open
opened 2026-04-14 08:59:38 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(plan): add impact section and correction_hint to plan explain output
  • Branch: fix/plan-explain-missing-impact-correction-hint

Background and Context

The spec (docs/specification.md §agents plan explain, lines 14680–14696) defines required impact and correction_hint fields in the plan explain output.

Current Behavior

The _build_explain_dict() function in src/cleveragents/cli/commands/plan.py (lines 4157–4185) does NOT include an impact section or correction_hint field.

Expected Behavior

Per docs/specification.md lines 14680–14696, agents plan explain output must include:

{
  "impact": {
    "downstream_decisions": 3,
    "downstream_child_plans": 2,
    "artifacts_produced": 5,
    "correction_impact": "medium"
  },
  "correction_hint": "agents plan correct <DECISION_ID> --mode revert --guidance \"...\""
}

The impact section should be derived from the Decision model's existing fields (downstream_decision_ids, downstream_plan_ids, artifacts_produced).

Acceptance Criteria

  • _build_explain_dict() includes impact dict with downstream_decisions, downstream_child_plans, artifacts_produced, correction_impact fields
  • _build_explain_dict() includes correction_hint string with the correction command
  • Rich output renders an "Impact" panel and a "Correction" panel
  • BDD tests added to verify impact and correction_hint fields

Subtasks

  • Add impact computation to _build_explain_dict()
  • Add correction_impact heuristic (low/medium/high based on downstream count)
  • Add correction_hint field with formatted correction command
  • Update rich output to render Impact and Correction panels
  • Add BDD scenarios verifying impact and correction_hint fields

Definition of Done

  • agents plan explain output includes impact and correction_hint fields
  • Rich output renders Impact and Correction panels
  • All BDD tests pass

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(plan): add impact section and correction_hint to plan explain output` - **Branch**: `fix/plan-explain-missing-impact-correction-hint` ## Background and Context The spec (`docs/specification.md` §agents plan explain, lines 14680–14696) defines required `impact` and `correction_hint` fields in the `plan explain` output. ## Current Behavior The `_build_explain_dict()` function in `src/cleveragents/cli/commands/plan.py` (lines 4157–4185) does NOT include an `impact` section or `correction_hint` field. ## Expected Behavior Per `docs/specification.md` lines 14680–14696, `agents plan explain` output must include: ```json { "impact": { "downstream_decisions": 3, "downstream_child_plans": 2, "artifacts_produced": 5, "correction_impact": "medium" }, "correction_hint": "agents plan correct <DECISION_ID> --mode revert --guidance \"...\"" } ``` The `impact` section should be derived from the `Decision` model's existing fields (`downstream_decision_ids`, `downstream_plan_ids`, `artifacts_produced`). ## Acceptance Criteria - [ ] `_build_explain_dict()` includes `impact` dict with `downstream_decisions`, `downstream_child_plans`, `artifacts_produced`, `correction_impact` fields - [ ] `_build_explain_dict()` includes `correction_hint` string with the correction command - [ ] Rich output renders an "Impact" panel and a "Correction" panel - [ ] BDD tests added to verify `impact` and `correction_hint` fields ## Subtasks - [ ] Add `impact` computation to `_build_explain_dict()` - [ ] Add `correction_impact` heuristic (low/medium/high based on downstream count) - [ ] Add `correction_hint` field with formatted correction command - [ ] Update rich output to render Impact and Correction panels - [ ] Add BDD scenarios verifying impact and correction_hint fields ## Definition of Done - `agents plan explain` output includes `impact` and `correction_hint` fields - Rich output renders Impact and Correction panels - All BDD tests pass --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added this to the v3.2.0 milestone 2026-04-14 09:03:05 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid bug: agents plan explain is missing the impact section and correction_hint field in its output, which are required by the spec. This is a spec compliance gap in a core M3 deliverable.

Assigning to v3.2.0 as plan explain is a core M3 deliverable. Priority Medium — missing output fields, not a functional failure.

MoSCoW: Should Have — these fields provide important context for users making correction decisions.


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

✅ **Triage: Verified** [AUTO-OWNR-1] Valid bug: `agents plan explain` is missing the `impact` section and `correction_hint` field in its output, which are required by the spec. This is a spec compliance gap in a core M3 deliverable. Assigning to **v3.2.0** as `plan explain` is a core M3 deliverable. Priority **Medium** — missing output fields, not a functional failure. MoSCoW: **Should Have** — these fields provide important context for users making correction decisions. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9167
No description provided.