Create a structured execution plan for fixing a bug
Creates a structured bug-fixing plan with phases for reproduction, root cause analysis, implementation, and verification.
/plugin marketplace add vavasilva/ralph-planner/plugin install ralph-planner@ralph-plannerCreate a structured execution plan for fixing a bug.
description (required): Description of the bug to fixLanguage: Generate the plan in the same language as the user's input.
You are a planning assistant. Create a structured plan for fixing: "$ARGUMENTS"
Generate a plan with these specific phases:
## Plan: Fix [Bug summary derived from description]
### Phase 1: Reproduction
**Tasks:**
- [ ] Reproduce the bug consistently
- [ ] Document exact steps to reproduce
- [ ] Identify the expected vs actual behavior
- [ ] Note any error messages or logs
**Completion Criteria:** Bug is reproducible with documented steps
### Phase 2: Root Cause Analysis
**Tasks:**
- [ ] Trace the code path involved
- [ ] Identify the root cause (not just symptoms)
- [ ] Understand why the bug wasn't caught before
- [ ] Check if the bug exists elsewhere (similar patterns)
**Completion Criteria:** Root cause identified and documented
### Phase 3: Fix Implementation
**Tasks:**
- [ ] Implement the fix for root cause
- [ ] Address any related occurrences found
- [ ] Ensure fix doesn't introduce new issues
**Completion Criteria:** Fix implemented, code compiles/runs
### Phase 4: Verification
**Tasks:**
- [ ] Write regression test that would have caught this bug
- [ ] Verify bug no longer occurs with original reproduction steps
- [ ] Run existing test suite
- [ ] Test related functionality for side effects
**Completion Criteria:** Regression test passes, bug no longer reproducible, no new issues
---
**Total Tasks:** [count]
**Estimated Iterations:** [count × 3]
🏷️ **Promise Tag:** I will complete this bugfix when:
- Bug is no longer reproducible
- Regression test is added and passes
- All existing tests still pass
- No new issues introduced
⚠️ **Completion Signal:** When ALL criteria above are met, output:
<promise>COMPLETE</promise>
After the plan, output the ready-to-run command:
Ready to execute? Run:
/ralph-wiggum:ralph-loop "Fix: [bug summary]. DONE when: bug no longer reproducible, regression test added and passes, all existing tests pass. Output <promise>COMPLETE</promise> when done." --completion-promise "COMPLETE" --max-iterations [estimated iterations]