| name | plan-and-execute |
| description | Write a detailed plan before coding and execute it step by step |
Methodology from obra/superpowers (MIT)
Plan and Execute
Core rule: write a detailed plan before writing any code.
Phase 1 -- Plan
- Restate the goal in your own words. Confirm understanding with the user if ambiguous.
- Identify inputs, outputs, constraints, and acceptance criteria.
- Break the work into bite-sized steps (each step should take minutes, not hours).
- Order the steps by dependency -- what must come first?
- Write the plan out explicitly. Number every step.
Phase 2 -- Execute Step by Step
- Pick the next uncompleted step from the plan.
- Do the work for that step and only that step.
- Verify the step is done (run tests, read output, check the file).
- Mark the step complete and note any deviations or discoveries.
- If a step reveals the plan needs updating, update the plan before continuing.
Phase 3 -- Handle Blockers
- If you are stuck for more than a few minutes, stop.
- State clearly: what you tried, what happened, and what you expected.
- Ask the user for guidance rather than guessing.
- Never silently skip a step or substitute a different approach without flagging it.
Phase 4 -- Wrap Up
- Walk through the completed plan. Confirm every step is verified.
- Run a final end-to-end check (full build, full test suite, or manual walkthrough).
- Summarize what was done, what changed, and any remaining open items.
Practical Rules
- Plans are living documents -- update them as you learn more.
- Prefer many small steps over a few large ones.
- Each step should have a clear "done" condition.
- If the scope grows mid-execution, call it out and re-plan.
- Time-box exploratory steps to avoid rabbit holes.
Anti-patterns to Avoid
- Starting to code before having a plan.
- Writing a plan but then ignoring it.
- Making a single giant step that bundles multiple concerns.
- Silently changing course when stuck instead of communicating.