Write a one-page spec before you vibe-code
Added Updated Copyable prompt below
Published Last verified
Our verdict
The cheapest quality jump in vibe-coding is usually a clearer brief, not a better tool. Anthropic's Claude Code guide suggests asking the agent to interview you until it could write the spec, saving it as SPEC.md, then building from it in a fresh session. Skip it for throwaway experiments; use it for anything you'll keep.
- Who it's for
- Anyone starting a new app with an A.I. builder
- Leverage
- Clearer output, fewer rewrites
- Effort
- Low
- Date added
What SPEC.md does
Before building, you let the A.I. ask you questions one at a time about the parts you haven't decided yet (who it's for, the one core job, screens, data, auth, what's out of scope) and write the answers into a short SPEC.md. That file becomes the brief for Lovable, Bolt, v0 or a coding agent, the definition of done for the build, and the checklist you review the result against.
How builders use SPEC.md
- Paste the interview prompt below into any chat assistant or coding agent, and answer the questions it asks rather than writing the spec from scratch.
- Save the result as SPEC.md in the repo root so every later session and tool can read it.
- Start a fresh session to build from the spec, so the build starts with a clean context instead of the whole Q&A.
- Build one section of the spec at a time and check each against its acceptance points before moving on.
- When the build is done, ask a reviewer (a subagent or a second tool) to compare the diff against SPEC.md and list unmet requirements.
The loop, step by step
Adapted from Anthropic's Claude Code best-practices guide, checked 17 Nov 2026. It works the same way in other agents.
- Ask: "I want to add rate limiting to the public API but haven't thought it through yet. Interview me until you could write the spec, then write it to SPEC.md." (Anthropic's own example.)
- The agent comes back with multiple-choice questions on what you haven't pinned down, such as per-user versus per-key limits, what happens to requests over the limit, and what's out of scope.
- Once SPEC.md exists, open a fresh session and build from it. You start with a clean context and a written definition of done.
- Review against the spec, not just for bugs. Anthropic's example prompt: "use a subagent to review the rate limiter diff against SPEC.md, check every requirement is implemented and the listed edge cases have tests".
- Before leaving an agent to run unattended, the guide asks: does it know what done looks like? A spec file is one of the three answers it gives, alongside a goal condition or a failing test.
What a useful one-page spec contains
| Section | Example for a booking app |
|---|---|
| User and core job | Freelance coaches; let a client book a paid 30-minute slot |
| Must-have screens | Availability page, booking form, confirmation, coach dashboard |
| Data | Coach, Slot, Booking (status: pending, paid, cancelled) |
| Auth and integrations | Email magic link for coaches; Stripe Checkout for payment |
| Out of scope | Group sessions, refunds UI, mobile app |
| Done when | A test client can book, pay in Stripe test mode and see the slot disappear |
SPEC.md: limits and gotchas
- A spec only guides the model; it doesn't enforce anything. Anthropic's guide separates instructions the model may or may not follow from checks the harness always runs, such as tests, hooks and CI, so pair the spec with at least one check.
- For exploration, a vague prompt is fine. The same guide says you'll correct a bit more as you go, and that's the trade-off, so don't spec a prototype you'll throw away.
- Specs go stale. If you change direction mid-build, update SPEC.md first, or the next session will build the old plan.
- A long spec costs context on every session that loads it; keep it to one page and move detail into later, per-feature specs.
SPEC.md compared with other tools here
- Spec-to-ship lifecycle with agent-skills: installs skills so the agent writes the spec, plans, builds, tests and reviews in a fixed order.
- Plannotator: lets you review and annotate the agent's plan in a browser before it writes code.
- Write an AGENTS.md: holds standing rules for the whole repo; the spec covers one feature or app.
- Lovable: an app builder where a pasted spec as the first prompt saves rounds of rework.
- Bolt.new: the same idea in a browser IDE: feed the spec, then build section by section.
When to pick SPEC.md
- Write a one-page spec if you're starting an app or feature you plan to keep, and you've been rebuilding because the A.I. guessed wrong.
- Use GitHub's open-source Spec Kit if you want a fuller process with a project constitution, plan, task list and implement steps.
- Install the agent-skills lifecycle if you want the agent to follow spec, plan, build, test and review every time without prompting.
- Skip the spec and prompt directly if you're exploring an idea for an hour and expect to throw the code away.
Copy this: Spec interview
I want to build <idea>. Interview me one question at a time to write a one-page spec.
Cover: target user, the one core job, must-have screens, data model, auth, integrations, and explicit out-of-scope items.
When done, output SPEC.md in Markdown, under 400 words.SPEC.md questions
Should I write the spec myself or let the A.I. write it?
Let it interview you. You know the answers but not always the questions; the agent's questions surface decisions you hadn't made, and it writes them up.
Why start a fresh session after the spec?
Anthropic's guide recommends it so the build begins with a clean context and the spec as the written definition of done, instead of the whole interview.
How long should SPEC.md be?
One page is enough for a first version. The prompt below caps it at 400 words; split bigger projects into a spec per feature.
What is Spec Kit?
An open-source toolkit from GitHub that gives coding agents structured commands for spec-driven development: a constitution, then specify, plan, tasks and implement. It needs Python 3.11+ and uv.
Related discoveries
See the newest picks →Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.