← Back to library

Talk through a feature spec before any code is written

aurareturn on Hacker News says his days once went mostly to writing code, fixing syntax and reading library docs. Now he talks through a thorough specification with ChatGPT or an agent, passes it to a coding agent, and focuses on tests rather than reading every generated line.

  • OutcomeShift your time from typing code to defining behavior: work out a thorough spec in conversation, hand it to a coding agent, and test the result hard.
  • SetupUnder an hour
  • LevelIntermediate
  • Creditaurareturn on Hacker News
View original
Works with
ChatGPTClaude Code

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

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?

  1. Talk it throughDiscuss the feature with an assistant until edge cases and data shapes are written down.
  2. Freeze the specSave it as a document the coding agent reads.
  3. Hand offLet the coding agent implement against the spec.
  4. Test hardExercise edge cases and unexpected inputs.
  5. 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)

Prompt1 variable
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?
Not every line; he tests outcomes thoroughly instead.
Is AI code buggier?
He finds it handles more cases than his own did, though data surprises still cause bugs.

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.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityWorkflow✓ AI dry run

Have a different model family critique the spec

Plan a spec with one model, have a model from another family critique it, then write tests, build and review against that spec.

Credit: u/wczaja on r/ClaudeAI

Under an hour
IT & SecuritySkill✓ AI dry run

Make your coding agent write the behavior before the code

Add a short standing rule to your coding agent's project file so every user-facing change starts as plain-language scenarios, becomes a failing test and only then gets the smallest code change that makes it pass.

Credit: u/cannyshammy on r/ClaudeCode

Minutes
IT & SecurityWorkflow✓ AI dry run

Keep a working understanding of code agents write

Pair agent coding with an interview-style spec, your own decisions on what differentiates the product, and agent-made explainers and quizzes about the system.

Credit: iamwil on Hacker News

Under an hour
IT & SecurityWorkflow✓ AI dry run

Let a CLI agent drive your screen to test a UI

Check that a UI actually works by letting your terminal coding agent control the screen as a last resort, after it has tried commands and tools first.

Credit: Mohamed EL BATHA

Under an hour