Write the PRD before the prompt: a spec your AI builder understands
Read in : Français

Contents
- Why write a PRD before the first prompt?
- What should a PRD for AI include?
- A PRD template to copy
- A filled-in example: a coffee shop loyalty card
- Where should the PRD live in your tool?
- Let the AI draft the PRD without letting it decide
- Mistakes that make a PRD useless
- How do you keep the PRD alive during the project?
- Frequently asked questions
- Frequently asked questions
- Sources
A PRD (product requirements document) for AI is a one- or two-page document that says what the app should do, who it's for, and what it won't do. You write it before the first prompt, hand it to the tool as permanent context, and the AI stops making decisions for you. Here are the 8 sections that matter, a template to copy, a filled-in example and where to put it in each tool.
Why write a PRD before the first prompt?
Without a PRD, the AI fills every gap with a default, and you spend your time undoing decisions you never made. A prompt describes a task; the PRD describes the project that task belongs to.
GitHub sums up the shift in the launch post for Spec Kit, its open-source toolkit for spec-driven development:
We're moving from "code is the source of truth" to "intent is the source of truth.
— GitHub Blog
In practice, a good PRD gives you three things:
- Shorter prompts: the context is already written down, so you stop repeating it.
- Less drift: when the AI suggests an off-topic feature, you have a reference to say no.
- A definition of "done": you know when a feature is finished, and you can ask the AI to check its work against the document.
If you're new to all this, start with the complete vibe coding guide to see where the PRD fits in the overall process.
What should a PRD for AI include?
An effective PRD for AI has 8 short sections. The tool docs agree on the essentials: Lovable recommends describing what the application does, user personas, the database schema, architecture decisions, domain terminology, project constraints, design guidelines and security requirements. GitHub stresses user journeys and what success looks like.
| Section | What you write | Why the AI needs it |
|---|---|---|
| 1. Problem | One or two sentences on the problem solved | To choose between two solutions |
| 2. Users | Each user type, what they want, what they can do | To handle permissions and screens |
| 3. Journeys | The 2 to 4 main scenarios, step by step | To build things in the right order |
| 4. V1 features | A numbered list, by priority | To move one feature at a time |
| 5. Out of scope | What V1 won't do | To prevent features nobody asked for |
| 6. Data | The objects (customer, order…) and who sees what | For the database and for security |
| 7. Design | Style, colors, typography, mobile or desktop | For consistency across screens |
| 8. Success criteria | What must work before you call it "done" | To test and verify |
Sections 5 and 6 are the ones everyone skips, and the ones that prevent the most trouble. Out of scope keeps the AI from wandering. The "who sees what" rule is the foundation of your app's security.
A PRD template to copy
Copy this template into a document, fill in each section in a few lines, and aim for one to two pages in total.
[Project name] — V1 requirements
## 1. Problem
[One or two sentences: what problem, for whom, how it's handled today.]
## 2. Users
- [User type 1]: [what they want to do] — can: [allowed actions]
- [User type 2]: [what they want to do] — can: [allowed actions]
## 3. Main journeys
1. [User] [action 1] → [action 2] → [expected result]
2. ...
## 4. V1 features (by priority)
1. [Must-have feature]
2. [Must-have feature]
3. [Nice-to-have feature]
## 5. Out of scope for V1
- [What the app won't do]
## 6. Data and access
- [Object]: [main fields] — visible to: [who]
- Rule: a user never sees another user's data.
## 7. Design
[Style in 3 words, colors, mobile or desktop first, interface language.]
## 8. Success criteria
- [Testable scenario 1]
- [Testable scenario 2]
## Glossary
- [Domain term]: [definition]
The glossary is optional but useful as soon as your business has its own vocabulary. Lovable recommends it as domain terminology: if you say "service" and the AI hears "product," your screens won't speak your customers' language.
A filled-in example: a coffee shop loyalty card
Here's the same template applied to a real-world case.
Coffee Shop Loyalty — V1 requirements
## 1. Problem
Paper punch cards get lost. The owner wants a card on customers' phones:
10 purchases = 1 free drink.
## 2. Users
- Customer: sees their stamps and reward — can: sign up, show their QR code.
- Barista: adds a stamp — can: scan a QR code, redeem a reward.
- Owner: tracks activity — can: see the month's customer and reward counts.
## 3. Main journeys
1. Customer: signs up with email → sees an empty card → shows QR code at the counter.
2. Barista: scans the QR code → adds a stamp → customer sees 1/10.
3. Customer at 10 stamps: sees "Reward available" → barista redeems it → card resets to 0.
## 4. V1 features
1. Customer sign-up and login by email.
2. Card with stamp counter and QR code.
3. Barista screen: scan and add a stamp.
4. Reward redemption.
5. Owner dashboard (2 numbers).
## 5. Out of scope for V1
- Payments, online ordering, notifications, multiple locations.
## 6. Data and access
- Customer: first name, email, stamp count — visible to: themselves, baristas, owner.
- Stamp: date, barista — visible to: baristas and owner.
- Rule: a customer never sees another customer's card.
## 7. Design
Warm, simple, big buttons. Mobile first. Interface in English.
## 8. Success criteria
- A new customer sees their card at 0/10 within 2 minutes of signing up.
- After 10 scans the reward appears; after redemption the counter goes back to 0.
- A logged-in customer can't open someone else's card by editing the page URL.
That last criterion is a security test in disguise. It's exactly the kind of flaw found in poorly configured vibe-coded apps, and the pre-launch security checklist helps you hunt it down.
Where should the PRD live in your tool?
Every tool has a place for permanent instructions that it reads with every request. Put a condensed version of the PRD there, and keep the full version in a project file.
| Tool | Where to put the PRD | Worth knowing |
|---|---|---|
| Lovable | Project instructions (Knowledge) | Lovable separates rules shared across a workspace from context specific to one project |
| Bolt | Project knowledge | The docs reserve it for information that always applies to your project; it survives when you reset the context |
| Claude Code | A SPEC.md file in the project, with lasting rules in CLAUDE.md | The docs recommend keeping CLAUDE.md short |
| Cursor, Codex, GitHub Copilot and other agents | An AGENTS.md file at the project root | An open format described as "a README for agents" |
We go deeper into these context files in a dedicated article: CLAUDE.md, AGENTS.md and rules files.
Let the AI draft the PRD without letting it decide
You can have the AI write your PRD, as long as it asks you the questions instead of inventing the answers. Engineer Addy Osmani recommends starting from a solid design and having the AI help write the spec before any code is generated. The Claude Code docs suggest exactly that workflow: ask the agent to interview you until it could write the spec to a file, then start a fresh session to build from that file.
Here's a prompt you can use in any assistant or in plan mode:
I want to build [one sentence about your idea].
Interview me to write a V1 requirements document.
Rules:
1. Ask one question at a time, with suggested options where possible.
2. Cover: problem, users, journeys, V1 features, out of scope,
data and who sees what, design, success criteria.
3. Don't invent any answers: if I don't know, write "to be decided".
4. When you have enough, write the PRD in one to two pages,
with testable success criteria.
Don't generate any code.
Then read the result line by line. Anything you don't understand or didn't decide should be rewritten or deleted.
Mistakes that make a PRD useless
A failed PRD is usually too long, too technical, or never updated.
- Too long: 15 pages bury the essentials. Lovable notes that in very long conversations with a lot of context, its instructions may not always be followed consistently. Short and precise wins.
- Too technical too early: if you impose a database without knowing why, you create pointless constraints. Describe the need, let the plan propose the tech, then approve it.
- No out-of-scope section: without it, the AI adds "helpful" features you'll then have to maintain.
- Fuzzy criteria: "the app must be fast" can't be tested. "The list loads in under 2 seconds on a phone" can.
- A frozen document: the week-one PRD no longer describes the week-three app.
More classic traps are listed in 12 mistakes that sink vibe coding projects.
How do you keep the PRD alive during the project?
The PRD stays useful if you update it after each finished feature and use it to check the AI's work.
- Reference it in your prompts: "Implement feature 3 from the PRD."
- Have work checked against it: the Claude Code docs suggest asking for a review of the changes against the spec file, to confirm every requirement is implemented.
- Update it: tick off finished features, add decisions made along the way, move new ideas to a "V2" section.
- Save it with the code: if you use Git, a versioned PRD tells you what each version was meant to do.
Taken further, this discipline is called spec-driven development. And to write prompts that build on your PRD, follow the 5-step vibe coding prompt method.
Frequently asked questions
Frequently asked questions
What's the difference between a PRD and a prompt?
A PRD describes the whole project: users, features, boundaries, data and success criteria. It stays stable and acts as the reference. A prompt describes one specific task at a given moment, such as adding a feature or fixing a bug. A good prompt leans on the PRD instead of repeating all the context every time.
How long should a PRD for vibe coding be?
One to two pages is enough for a first version. The goal is for you and the AI to know what's in, what's out, and how to check that it's done. Beyond that, the document gets hard to keep current and the key points get lost. Put a condensed version in the tool's instructions and the full version in a file.
Do you need technical knowledge to write a PRD?
No. The PRD describes what the app should do and for whom, not how to code it. GitHub's Spec Kit post says it directly: the spec is about user journeys and success, and the technical side comes later, in the plan. You can let the tool suggest technologies, then ask it to explain its choices.
Can the AI write the PRD for me?
It can draft it, but it shouldn't decide it. The right approach is to have it interview you, one question at a time, and write "to be decided" when you don't have the answer. Then read the document line by line: anything you didn't choose yourself should be confirmed or removed.
Do you need to rewrite the PRD when the project changes?
Not rewrite it, update it. After each finished feature, tick it off, add the decisions made along the way and park new ideas in a list for the next version. An up-to-date PRD lets you pick the project back up after a break, and lets you ask the AI to check its work against a reliable reference.
Sources
- Spec-driven development with AI: get started with a new open source toolkit — GitHub Blog
- Instructions (Knowledge) — Lovable Docs
- Prompting best practices — Lovable Docs
- Manage project context — Bolt Support
- Best practices for Claude Code — Claude Code Docs
- AGENTS.md — open format for guiding coding agents
- Vibe coding is not the same as AI-Assisted engineering — Addy Osmani


