Make AI Write the Implementation Plan Before Coding

2026-06-14 · 中文

Make AI Write the Implementation Plan Before Coding

superpowers core skill · writing-plans

In one line: Even with a design, don't rush to code. Have the AI produce an implementation plan someone who doesn't know your project could follow.

Scenario: add "export the monthly statement" to the admin

Finance wants a feature: click in the admin, export a month's statement as Excel (order no., amount, fees, refunds, net). It spans several steps — query the order DB -> compute fees -> generate Excel -> add a download endpoint. Tell the AI "write an export," and it'll miss refund reversals or miscompute fees — more rework.

How to ask the AI

Demand an executable plan, not vague steps:

Use writing-plans for "export monthly statement as Excel":
exact files and line ranges, complete code per step, the command to run, expected output. Show me the plan first, don't implement yet.
❌ Weak ✅ Strong
Roughly list a few steps Break into 2-5 minute steps, one action each
Add fee calculation Put the fee rule in the plan: 0.6% rate, reverse the refunded portion, give the full formula code
Just write it Show me the plan doc, I'll confirm the definitions before you execute

Review the plan against four words: DRY, YAGNI, TDD, frequent commits. See a vague "compute the fee"? Make it write copy-pasteable code and test cases.

How it'll walk you through it

It breaks "export statement" into small steps: write a test for "query a month's orders" -> implement -> write a test for "fee calc (incl. refund reversal)" -> implement -> generate Excel -> add the download endpoint -> commit each. Each step names the file, complete code, the command, and expected output. The plan lands in a docs/plans doc. When done it asks: execute via subagents in this session, or a separate session.

Remember one line

writing-plans = have the AI break the work into a "just type it in" checklist. For multi-step features like "export a statement," make it spell out each step's files/code/definitions, and bounce anything vague.

Link copied