HandbookVII the BasilicaWriting a feature spec
VIIthe Basilica, Build the right thingWriting a feature spec
In plain words
A feature spec is a one-page document that gathers the problem, user stories, acceptance criteria, rules and non-goals for one feature, so your agent builds from one source.
Where you see it
A markdown file such as docs/specs/share-links.md in your project, or a Notion page you paste into the chat. Claude Code, Cursor and Codex read a spec file when you point at it, and it outlives the chat, so the next session starts from the same page.
What goes wrong
- A spec that falls behind
You change your mind in chat, the spec still says the old thing, and the next session follows the spec. When a decision changes, change the page.
- Ten pages where one would do
A long spec buries the lines that matter, and the agent may fix on the wrong paragraph. Keep it to a page, with headings it can quote.
- Specifying the code instead of the behaviour
"Add a shares table with a random-ID column" makes choices the agent may handle better. Describe what users can do and what must be true, and ask the agent to propose the how.
What to tell your agent
Quick check
Sign in to earn +10 XP for itHalfway through building, you decide share links should expire after 30 days. Where does that decision go?