Ask for a Plan Before Code
For anything non-trivial, separate thinking from typing. Ask the AI to outline its approach first. This catches wrong assumptions before they become 200 lines of wrong code, and it is far cheaper to fix a plan than a .
I want to add rate limiting to my API. Before writing any code,
give me a short plan: where the limiter should live, what
storage it needs, what happens when a limit is hit, and any
tradeoffs. Don't write code yet — I'll approve the approach first.
When the plan looks right, say "good, implement step 1." When it does not, you have spent thirty seconds correcting course instead of an hour untangling code. Planning first is the habit that most separates engineer-style prompting from wishful prompting.
The plan stage is also where you catch the AI choosing a heavier solution than you need — reaching for Redis when an in-memory map would do, or hand-rolling something a one-line library call already solves. Read the plan with one question in mind: is this the simplest thing that could work? If the approach smells over-engineered, push back in plain words ("this is a hobby project with one server — can we skip the distributed store?") before a single line is written.