
- Updated
Give an AI coding agent a clear task brief
Agents do their best work with a clear goal and a clear finish line. This brief gives the goal, where to look, the constraints and a done means list, and asks the agent to share its plan before it writes code.
Goal: [WHAT SHOULD BE TRUE WHEN DONE, e.g. users can export their invoices as CSV] Context: [WHERE IN THE CODE, e.g. see src/invoices/ and the existing PDF export] Constraints: [e.g. no new dependencies, keep the API backward compatible] Done means: - [e.g. new endpoint with tests] - [e.g. button on the invoices page] - [e.g. all tests and lint pass] First explore the relevant code and tell me your plan in a few bullet points. Wait for my OK. Then implement it in small steps, run the tests after each step, and finish with a summary of what changed and anything you were unsure about.
A clear "done means" list is the single biggest improvement for agent results. It tells the agent when to stop.
Get a better result
A brief an AI coding agent can follow: the goal, where to look, the limits and a “done means” list, with a plan first, small steps, tests after each step and a closing summary of what changed and what was uncertain.
The agent starts changing files before you have agreed the plan.
Fix: Keep “wait for my OK” in the prompt and read the plan before you reply. If it skips the pause, stop it and say “revert, then show the plan only”.
- “Done means” is a wish, such as “works well”. Write checks that can pass or fail: “GET /invoices.csv returns 200 and a header row”, “npm test passes”. If you can run the check, so can the agent.
- The agent adds a dependency or rewrites unrelated code. Name what must not change in the constraints: “do not touch src/auth/, no new packages”. Agents take the widest route unless fenced in.
For a big goal, change it to “only step one: add the endpoint with tests, nothing else”. Ask for the next step in a new message once step one passes.
Stop and show me what you have changed so far. List each file, why you changed it and what you were unsure about, then wait for my OK.
Guides that use this prompt
More chat & writing prompts
See all 465 →More like this
- Write a CLAUDE.md file for your projectClaude Code · Cursor
- Real estate agent introductionVeo · Kling
- Do a large refactor in small safe stepsClaude Code · Cursor
- Turn a fixed bug into a regression testClaude · ChatGPT · Claude Code
- Upgrade a library to a new major versionClaude · ChatGPT · Claude Code



