One-Page Product Spec: Write It Before the First AI Prompt
A fill-in one-page spec with a worked booking-app example, so Claude Code, Cursor, Codex, or Lovable builds what you meant, not just what you typed.
Added
Fill this in BEFORE you open Claude Code, Cursor, Codex, Lovable, or Bolt. Keep it to one page. If a section won't fit, the scope is too big: cut it. Save it as SPEC.md in the project root and start your first prompt with: "Read SPEC.md. Build only what it describes. Ask me before going outside it." # SPEC: [APP NAME] ## 1. Problem (2 sentences) Who has the problem, and what they do today instead: [WHO] currently [WORKAROUND], which is [WHY IT HURTS]. ## 2. User and main job Primary user: [ONE TYPE OF PERSON]. The one job they hire this app for: [VERB + OUTCOME]. ## 3. Core flow (5-7 numbered steps, happy path only) 1. [User opens ... and sees ...] 2. [...] Done when: [the observable end state, e.g. "a confirmed booking appears on both calendars"] ## 4. Must have in v1 (max 5) - [FEATURE]: [one-line acceptance check you could test by hand] ## 5. NOT in v1 (the agent must not build these) - [e.g. payments, user roles, dark mode, mobile app, admin dashboard, AI features] ## 6. Data - Things the app stores: [ENTITY: key fields], [ENTITY: key fields] - Who can see or change each one: [RULE] - Never store: [e.g. card numbers, passwords in plain text] ## 7. Edge cases and states - Empty: [what a brand-new user sees] - Error: [what happens when the save fails or the network drops] - Limits: [max sizes, double clicks, two users at once, time zones] ## 8. Stack and constraints (decisions already made) - [e.g. Next.js + Supabase + Tailwind, deploy on Vercel]; no new services without asking - Budget: [$/month]; Deadline: [DATE]; Must work on: [phone / desktop / both] ## 9. Definition of done - [ ] Every "must have" check passes by hand on [DEVICE] - [ ] The empty, error, and limit cases behave as written above - [ ] README says how to run it; no secrets in the repo ## Open questions (the agent asks these before building, not after) - [QUESTION] --- WORKED EXAMPLE (delete when you write your own) # SPEC: ChairTime (barber booking) 1. Problem: Solo barbers take bookings by text and DM, so they double-book and lose no-shows' slots. Clients wait hours for a reply. 2. User: a solo barber with one chair. Job: let clients book an open slot without texting. 3. Core flow: (1) Barber sets weekly hours and 3 services with durations. (2) Barber shares one link. (3) Client picks a service, then sees only open slots. (4) Client enters name + phone and confirms. (5) Slot disappears for everyone else. (6) Barber sees today's list on their phone. Done when: a booked slot can't be booked twice and shows in the barber's list. 4. Must have: weekly hours editor; service list with durations; public booking page; no double booking (test: two browsers book the same slot, one fails cleanly); barber's today/this-week list. 5. NOT in v1: payments, deposits, SMS reminders, multiple barbers, reviews, client accounts. 6. Data: Service (name, minutes, price shown only), Booking (service, start time, client name, phone). Only the barber sees phone numbers. Never store payment details. 7. Edge cases: no hours set = page says "Not taking bookings yet"; slot taken while choosing = "Just booked, pick another"; times shown in the barber's time zone. 8. Stack: Next.js + Supabase + Tailwind on Vercel; free tiers only; phone-first. 9. Done: all five checks pass on an iPhone and a laptop; RLS on so clients can't read other bookings; README written. Open questions: Can clients cancel themselves? How far ahead can they book?
How to use it
- Click Copy template.
- Paste into ChatGPT, Claude, Grok, Cursor, or your agent framework.
- Replace the [BRACKETED] parts with your details.
Pairs well with: Six-File AI Dev Team Starter Kit: SPEC, TASKS & Agent Roles
FAQ
Why write a spec before prompting an AI coding agent?
AI agents build what you said, not what you meant. A short spec forces the decisions a two-line idea leaves open (who it's for, what's out of scope, what happens on errors), so the agent stops guessing and you stop rebuilding. A spec file also survives /clear and new sessions, unlike a long chat.
How long should a product spec for vibe coding be?
One page. If it runs longer, v1 is too big. Keep the must-have list to five items with a hand-testable check each, and put everything else in the NOT in v1 list so the agent doesn't add it.
Can the AI write the spec for me?
It can draft one, but you should make the calls. A good pattern: paste this template with your rough idea and ask the model to interview you one question at a time until every section is filled, then edit the result yourself before any code is written.
How does this fit with a wireframe brief and AGENTS.md?
Use the spec first to decide what to build, the wireframe brief next to decide how screens look, and AGENTS.md for how the agent should work in the repo (stack, commands, rules). Point AGENTS.md at SPEC.md so every session reads it.
Get 3 new templates every week
Free. Unsubscribe anytime.Related templates
Wireframe-First UI Brief: Plan Screens Before Vibe Coding
Vibe Coding Project Kickoff Prompt
AGENTS.md Starter Template for Claude Code, Codex & Cursor
Vibe-Coded App Security Review: Keys, Auth, RLS & Limits
Browse all Coding & Cursor Rules templates