From d27e71cec08588ea829881a804305bca6acc7e9e Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 25 Mar 2026 22:56:27 +0100 Subject: [PATCH] fix(debug-loop): add Plan Mode rejection/revision loop Add explicit handling for user rejection and cancellation during the Plan Mode setup phase. Users can now revise parameters, re-attempt reproduction, and update the GitHub Issue before confirming. Cancel path cleans up the pre-created GitHub Issue. Co-Authored-By: Claude Opus 4.6 (1M context) --- templates/commands/maxsim/debug-loop.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/commands/maxsim/debug-loop.md b/templates/commands/maxsim/debug-loop.md index d2276898..df7af065 100644 --- a/templates/commands/maxsim/debug-loop.md +++ b/templates/commands/maxsim/debug-loop.md @@ -33,8 +33,12 @@ Invoke the `autoresearch` skill (debug workflow) to drive the investigation loop - **Scope** — which files/directories are likely involved (or "unknown") 3. Attempt initial reproduction — run the reproduction command to confirm the bug exists 4. Create a GitHub Issue labeled `debug` to track the session -5. Show the investigation plan and confirm with user -6. Exit Plan Mode via ExitPlanMode +5. Show the investigation plan and ask user to confirm +6. **Handle user response:** + - **If user approves:** proceed to step 7 + - **If user requests changes:** revise the relevant parameters (scope, reproduction command, investigation approach). If the reproduction command changed, re-attempt reproduction (step 3). Update the GitHub Issue body with the revised plan. Return to step 5 (stay in Plan Mode). + - **If user cancels:** close the GitHub Issue created in step 4 (`gh issue close {ISSUE_NUM} --comment "Debug session cancelled by user before investigation began"`), Exit Plan Mode via ExitPlanMode, and stop. +7. Exit Plan Mode via ExitPlanMode **Phase 2 — Debug Loop**