feat(plan): integrate plan correct revert and append modes with subplan execution #9403

Open
opened 2026-04-14 16:48:48 +00:00 by HAL9000 · 2 comments
Owner

Metadata

  • Commit Message: feat(plan): integrate plan correct revert and append modes with subplan execution
  • Branch: feat/plan-correct-subplan-integration

Background and Context

The v3.3.0 milestone requires "Correction flow functional (plan correct --mode revert and --mode append)." While issue #9286 covers the basic plan correct command, this issue covers the integration of correction modes with subplan execution — ensuring that when a correction is applied, subplans are properly re-executed or updated.

This is a Cycle 3 planning gap identified in the Cycle 2 status issue (#9344). The correction flow must handle the case where a plan has spawned child subplans, and a correction to the parent plan must propagate correctly to those subplans. In revert mode, affected subplans must be re-executed from the corrected decision point. In append mode, existing subplans should not be recomputed.

Expected Behavior

When agents plan correct --mode=revert is applied to a plan with subplans, the system re-executes from the targeted decision point including any affected subplans. When agents plan correct --mode=append is applied, guidance is added without recomputing existing subplans. The parent plan correctly tracks all subplan statuses after correction.

Acceptance Criteria

  • agents plan correct --mode=revert re-executes from the targeted decision point including any affected subplans
  • agents plan correct --mode=append adds guidance without recomputing existing subplans
  • Parent plan tracks all subplan statuses after correction
  • Correction flow handles nested subplans (2+ levels deep)
  • Test coverage >= 97%

Subtasks

  • Audit existing plan correct implementation to understand current subplan handling
  • Design correction propagation logic for revert mode with subplans
  • Design correction propagation logic for append mode with subplans
  • Implement revert mode correction propagation to affected subplans
  • Implement append mode correction that preserves existing subplan state
  • Implement parent plan status tracking after correction
  • Add support for nested subplan correction (2+ levels deep)
  • Add unit tests for correction propagation logic
  • Add integration tests for revert mode with subplans
  • Add integration tests for append mode with subplans
  • Add integration tests for nested subplan correction
  • Run nox -e coverage_report and verify coverage >= 97%

Definition of Done

  • All acceptance criteria are met and verified
  • All subtasks are completed
  • nox -e lint passes with no errors
  • nox -e typecheck passes with no errors
  • nox -e unit_tests passes with no failures
  • nox -e integration_tests passes with no failures
  • nox -e coverage_report shows >= 97% coverage
  • PR is created, reviewed, and merged

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit Message**: `feat(plan): integrate plan correct revert and append modes with subplan execution` - **Branch**: `feat/plan-correct-subplan-integration` ## Background and Context The v3.3.0 milestone requires "Correction flow functional (plan correct --mode revert and --mode append)." While issue #9286 covers the basic plan correct command, this issue covers the integration of correction modes with subplan execution — ensuring that when a correction is applied, subplans are properly re-executed or updated. This is a Cycle 3 planning gap identified in the Cycle 2 status issue (#9344). The correction flow must handle the case where a plan has spawned child subplans, and a correction to the parent plan must propagate correctly to those subplans. In revert mode, affected subplans must be re-executed from the corrected decision point. In append mode, existing subplans should not be recomputed. ## Expected Behavior When `agents plan correct --mode=revert` is applied to a plan with subplans, the system re-executes from the targeted decision point including any affected subplans. When `agents plan correct --mode=append` is applied, guidance is added without recomputing existing subplans. The parent plan correctly tracks all subplan statuses after correction. ## Acceptance Criteria - [ ] `agents plan correct --mode=revert` re-executes from the targeted decision point including any affected subplans - [ ] `agents plan correct --mode=append` adds guidance without recomputing existing subplans - [ ] Parent plan tracks all subplan statuses after correction - [ ] Correction flow handles nested subplans (2+ levels deep) - [ ] Test coverage >= 97% ## Subtasks - [ ] Audit existing plan correct implementation to understand current subplan handling - [ ] Design correction propagation logic for revert mode with subplans - [ ] Design correction propagation logic for append mode with subplans - [ ] Implement revert mode correction propagation to affected subplans - [ ] Implement append mode correction that preserves existing subplan state - [ ] Implement parent plan status tracking after correction - [ ] Add support for nested subplan correction (2+ levels deep) - [ ] Add unit tests for correction propagation logic - [ ] Add integration tests for revert mode with subplans - [ ] Add integration tests for append mode with subplans - [ ] Add integration tests for nested subplan correction - [ ] Run `nox -e coverage_report` and verify coverage >= 97% ## Definition of Done - All acceptance criteria are met and verified - All subtasks are completed - `nox -e lint` passes with no errors - `nox -e typecheck` passes with no errors - `nox -e unit_tests` passes with no failures - `nox -e integration_tests` passes with no failures - `nox -e coverage_report` shows >= 97% coverage - PR is created, reviewed, and merged --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.3.0 milestone 2026-04-14 16:50:06 +00:00
Author
Owner

🏷️ Triage Decision — [AUTO-OWNR-1]\n\nStatus: Verified (already in State/Verified)\n\nIssue Type: Feature (v3.3.0) \nMoSCoW: Must Have — Integration of correction modes with subplan execution is core v3.3.0 \nPriority: High (already set)\n\nRationale: Integrating plan correct revert/append modes with subplan execution is essential for the v3.3.0 correction flow. Must Have for milestone completion.\n\nMissing labels to apply: MoSCoW/Must have\n\n---\nAutomated by CleverAgents Bot\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor\n\n---\nAutomated by CleverAgents Bot\nAgent: automation-tracking-manager

## 🏷️ Triage Decision — [AUTO-OWNR-1]\n\n**Status:** ✅ Verified (already in State/Verified)\n\n**Issue Type:** Feature (v3.3.0) \n**MoSCoW:** Must Have — Integration of correction modes with subplan execution is core v3.3.0 \n**Priority:** High (already set)\n\n**Rationale:** Integrating plan correct revert/append modes with subplan execution is essential for the v3.3.0 correction flow. Must Have for milestone completion.\n\n**Missing labels to apply:** MoSCoW/Must have\n\n---\n**Automated by CleverAgents Bot**\nSupervisor: Project Owner | Agent: project-owner-pool-supervisor\n\n---\n**Automated by CleverAgents Bot**\nAgent: automation-tracking-manager
Author
Owner

🔍 Triage Decision — Verified

Decision: Verified | MoSCoW: Must Have | Priority: High

This is a core v3.3.0 milestone feature. The correction flow must handle plans with child subplans — in revert mode, affected subplans must be re-executed from the corrected decision point; in append mode, existing subplans must be preserved. This was identified as a Cycle 3 planning gap in the Cycle 2 status issue (#9344).

Rationale:

  • Directly required by the v3.3.0 milestone acceptance criteria: "Correction flow functional (plan correct --mode revert and --mode append)"
  • Subplan integration is a non-trivial correctness requirement — without it, correction modes are incomplete
  • The issue is well-scoped with clear acceptance criteria and subtasks
  • Classified as Must Have: this is a gating feature for the v3.3.0 milestone
  • Milestone confirmed as v3.3.0

Next steps: Audit existing plan correct implementation for current subplan handling, then implement revert-mode propagation (re-execute from decision point) and append-mode preservation (no subplan recomputation). Add integration tests for both modes including nested subplans (2+ levels).


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Worker: [AUTO-OWNR-1]

## 🔍 Triage Decision — Verified ✅ **Decision:** Verified | **MoSCoW:** Must Have | **Priority:** High This is a core v3.3.0 milestone feature. The correction flow must handle plans with child subplans — in revert mode, affected subplans must be re-executed from the corrected decision point; in append mode, existing subplans must be preserved. This was identified as a Cycle 3 planning gap in the Cycle 2 status issue (#9344). **Rationale:** - Directly required by the v3.3.0 milestone acceptance criteria: "Correction flow functional (`plan correct --mode revert` and `--mode append`)" - Subplan integration is a non-trivial correctness requirement — without it, correction modes are incomplete - The issue is well-scoped with clear acceptance criteria and subtasks - Classified as **Must Have**: this is a gating feature for the v3.3.0 milestone - Milestone confirmed as **v3.3.0** **Next steps:** Audit existing plan correct implementation for current subplan handling, then implement revert-mode propagation (re-execute from decision point) and append-mode preservation (no subplan recomputation). Add integration tests for both modes including nested subplans (2+ levels). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor Worker: [AUTO-OWNR-1]
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#9403
No description provided.