How to Write a Project Brief for AI Coding Agents (With a Free Template)

Most disappointing results from AI coding agents do not come from a weak model. They come from a weak brief. "Build me a booking app" leaves hundreds of decisions to the AI: who the users are, what a booking is, which pages exist, how payments work, what happens when two people book the same slot. The agent fills every gap with a guess, and you spend the next week undoing guesses.

A short written project brief, sometimes called a PRD (product requirements document) or spec, fixes this. It is a plain-text file that describes what you are building, for whom, and what "done" means. You write it once, keep it in the project, and point your agent at it at the start of every task. This guide shows what goes into a good brief, gives you a free template you can copy, and explains how to use it with tools like Cursor, Claude Code, Windsurf, Bolt or Lovable.

Why a brief beats a long prompt

You could put all of this in one giant prompt. A separate brief file is better for three reasons:

A good brief is short. One to three pages is plenty for a side project or an MVP. Long, vague documents are as unhelpful as no document, because the important constraints get buried.

The nine sections of a useful brief

1. One-paragraph summary

What is the product, who is it for, and what problem does it solve? If you cannot write this in three or four sentences, the idea is not clear enough to build yet. Example: "A web app for small coaching centres to publish their weekly class timetable and let students mark attendance with their phone. Teachers create classes; students join with a code. No payments in version 1."

2. Users and roles

List each type of user and what they are allowed to do. Roles drive authentication, database rules and which screens exist, so agents need this early. For the example: Teacher (creates classes, sees attendance), Student (joins classes, marks own attendance), Admin (you; can see everything).

3. Core user flows

Describe the three to five most important journeys step by step, in plain language. "Student opens the link, signs in with Google, enters a class code, sees the timetable, taps 'I'm here' during class time." Flows are more useful to an agent than a feature list, because they show how features connect.

4. Scope: in and out

Write two lists. In scope for version 1 and explicitly out of scope. The out-of-scope list is the secret weapon. Agents love to be helpful and will add notifications, dark mode, analytics dashboards and admin panels you never asked for. "Out of scope: payments, push notifications, mobile app, multiple languages, chat" keeps the build small and finishable.

5. Data model

List the main things the app stores and their key fields, in plain words. You do not need SQL. "Class: name, teacher, weekly schedule (day + start time + end time), join code. Attendance: student, class, date, time marked." Mention relationships ("a class has one teacher and many students"). This single section prevents a large share of the rework, because a wrong data model forces changes everywhere later.

6. Tech stack and constraints

Name the stack if you have a preference, or ask the agent to propose one and then write the decision down. Include hard constraints:

7. Non-functional requirements

These are the qualities that are not features but still matter: security rules ("students can only see their own attendance"), performance ("timetable page should load fast on slow mobile connections"), accessibility ("readable font sizes, works with screen readers"), and privacy ("store the minimum personal data needed"). Agents rarely add these unless asked.

8. Definition of done

How will you know a feature is finished? Write acceptance criteria as checkable statements: "A student who is not in a class cannot see its attendance list, even by changing the URL." "The timetable shows correctly on a 360-pixel-wide screen." These double as a test plan, and you can ask the agent to write automated tests from them.

9. Open questions

List decisions you have not made yet. This stops the agent from silently deciding them for you, and reminds you to come back to them. "Should teachers be able to edit attendance after the class ends?"

A copy-and-paste template

Save this as BRIEF.md (or PRD.md, or SPEC.md) in the root of your project and fill it in:

# Project brief: <name>

## Summary
<3-4 sentences: what, for whom, which problem>

## Users and roles
- <Role>: <what they can do>
- <Role>: <what they can do>

## Core flows
1. <Flow name>: <step> -> <step> -> <step>
2. ...

## Scope
In scope (v1):
- ...
Out of scope (v1):
- ...

## Data model
- <Thing>: <field>, <field>, <field>
- Relationships: ...

## Stack and constraints
- Frontend / backend:
- Database and auth:
- Hosting and budget:
- Users' devices and connection:
- Currency, locale, time zone, languages:

## Non-functional requirements
- Security:
- Performance:
- Accessibility:
- Privacy:

## Definition of done
- [ ] <checkable statement>
- [ ] <checkable statement>

## Open questions
- ...

How to use the brief with your coding agent

Draft it with the AI, decide it yourself

You do not have to write the brief alone. A practical approach: describe your idea in a few paragraphs and ask the agent, "Ask me up to ten questions you need answered to write a project brief using this template. Do not write any code." Answer the questions, then ask it to fill in the template. Read the result critically and edit it. The agent is good at spotting missing sections; you are the one who knows what you actually want.

Point every session at it

Most AI coding tools support a project instructions file that is loaded automatically, for example rules files in Cursor or a CLAUDE.md file for Claude Code. Add a line such as "Read BRIEF.md before starting any task. Do not build anything listed as out of scope. If a request conflicts with the brief, ask me first." Our Cursor rules examples show the format, and the Claude Code tutorial for beginners covers project memory files.

Build in small slices

Do not ask the agent to "build everything in BRIEF.md". Ask for one flow at a time: "Implement core flow 1 from the brief. Stop when the definition-of-done items for that flow pass." Then test it yourself, commit, and move on. Small slices keep the agent focused and make problems easy to spot. If you are new to version control, read Git for vibe coders first.

Ask for a plan before code

For each slice, ask "Write a short plan: which files you will create or change and why. Wait for my OK." Compare the plan against the brief. It is far easier to correct a five-line plan than five hundred lines of code.

Keep the brief alive

When you change your mind, change the brief first, then ask the agent to update the code to match. Add a short "Decisions" section at the bottom with dated notes ("23 Oct: dropped Google sign-in, using email magic links instead"). This keeps future sessions, and future you, from reopening settled questions.

Common mistakes

A short example

Here is a compressed brief for a simple tool, to show the level of detail that works:

# Project brief: Tiffin Tracker

## Summary
A mobile-first web app for a home tiffin (meal) service to track
daily orders and monthly dues for about 50 regular customers.
Owner-only app; customers do not log in in v1.

## Users and roles
- Owner: adds customers, marks daily deliveries, sees monthly totals.

## Core flows
1. Daily: open app -> see today's customer list -> tick delivered/skipped.
2. Month end: pick a month -> see each customer's count and amount due
   -> copy a WhatsApp-ready text summary.

## Scope
In: customers, daily ticks, monthly totals, text summary.
Out: online payments, customer logins, SMS sending, multiple owners.

## Data model
- Customer: name, phone, price per meal, active (yes/no)
- Delivery: customer, date, status (delivered/skipped)

## Stack and constraints
- Plain HTML + PHP + MySQL on existing shared hosting. No paid services.
- Owner uses an Android phone; large tap targets; amounts in ₹; IST.

## Definition of done
- [ ] Marking 50 deliveries takes under a minute on a phone.
- [ ] Monthly total = deliveries x price per meal, per customer.
- [ ] App requires the owner's password on every page.

That is enough for a capable agent to build a first version in one focused session, and enough for you to judge whether it got it right.

Next steps

Once your brief is ready, pick your tools with our guides to the best AI app builders and the best AI coding agents, then follow how to vibe code an app for the build itself. Before launch, run the vibe coding security checklist.

FAQ

How long should a project brief be?

For a side project or MVP, one to three pages. Enough to cover users, flows, scope, data and done criteria; short enough that you will actually keep it updated.

Is a brief useful for no-code AI app builders too?

Yes. Tools like Bolt and Lovable work from prompts, and you can paste sections of the brief into the first prompt and refer back to it later. The scope and data-model sections are especially helpful there.

Should I write the brief in English?

Write it in the language you think most clearly in. Most current coding agents understand many languages, including Hindi. Keeping technical terms such as field names in English often makes the generated code easier to read.

What is the difference between a brief and a rules file?

The brief describes what you are building. A rules or instructions file describes how the agent should work (coding style, testing, what not to touch). Use both, and have the rules file point to the brief.

About the author

Suraj Kumar builds and edits AIUseFlow, a directory of AI tools for vibe coders, agent builders and creators. How we rank tools.

Get the weekly stack

Rank movers and new AI tools for builders, once a week. Free, no spam, unsubscribe anytime.