When should you use it?
- Features are well understood but tedious to build
- You test more than you review
- Small internal apps
Not for: Security-critical code that needs line-by-line review; Teams with no test coverage
What do you need, and what do you get?
You need
- Feature idea
- Acceptance tests
You get
- A written spec
- Working code
- Test results
How does it work, step by step?
- Talk it throughDiscuss the feature with an assistant until edge cases and data shapes are written down.
- Freeze the specSave it as a document the coding agent reads.
- Hand offLet the coding agent implement against the spec.
- Test hardExercise edge cases and unexpected inputs.
- Feed failures backAdd each bug found to the spec and rerun.
The prompt
Our own prompt, inspired by aurareturn on Hacker News and written to work in ChatGPT and Claude Code. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Help me write a spec for {feature}.
Ask questions until you can list: inputs and their shapes, outputs, edge cases, error handling and acceptance tests. Then produce a spec document a coding agent can implement without further questions, ending with a test checklist.Inspired by aurareturn on Hacker News: Hacker News comment on writing specs with AI before coding. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Skipping code review is a choice; keep it for low-risk code.
- Bugs from unexpected data show up if the spec never described the data.
Our take
The shift from writer to specifier and tester only works if both ends are strong. A spec that names data shapes and edge cases gives the agent something to aim at; thorough tests catch what skimming generated code misses. aurareturn's routine moves effort to the two ends of the job. Talk the feature through with an assistant until data shapes and edge cases are written down, save that as a document the coding agent reads, and spend your own time on tests rather than reading every generated line. Each bug found goes back into the spec before the next run, so the document improves along with the code. Many bugs come from data the spec never described, so be explicit about unexpected inputs. Skipping line-by-line review is a choice that only suits low-risk code; anything touching security, payments or personal data still needs a careful read. Teams with no test coverage should build that first, because this approach leans entirely on good tests.
Where the time goes back: Time goes into deciding what to build and checking it works, not into syntax and documentation lookups.
FAQ
Does the author read the code?
Is AI code buggier?
Source and credit
Inspired by aurareturn on Hacker News. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Hacker News comment on writing specs with AI before coding
- Creator
- aurareturn on Hacker News
- Published on
- Hacker News
- Original date
- Feb 16, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- ChatGPT
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.