Skip to content

Guides

Writing for AI agents

A block an AI can use is specific, sourced and connected: it says the concrete thing, names where it comes from or calls it an assumption, and links to what it rests on. The same qualities make it useful to people.

An AI reads every block literally and acts on it. Vague context gives it nothing to act on, so it falls back on the average of the internet. These are the habits that make a block move an AI's output from generic to yours.

Be specific, not generic

Instead of…Write…
"We use modern technologies""Frontend: Next.js with the App Router and TypeScript in strict mode; styling with design tokens, never raw hex values"
"Users need an easy experience""Our primary users are product managers without a developer at hand; they finish a task without asking for help"
"Performance matters""Pages load in under two seconds on a mid-range phone; API responses under 200 ms"
"Friendly tone""Direct and warm. We say you, never the user. No exclamation marks in product copy"

Lead with the answer

Put the structural fact first and the explanation after it. "Pages are mandatory companions to features" comes before why. An agent reading a briefing excerpt may only see the first sentences of a block.

Name the source, or call it an assumption

Say where a claim comes from: an interview, a decision, a measurement, a person. If nobody knows yet, write it anyway and leave the block assumed. Claim validated only when something proves it, and link the evidence with a supports link. See Lifecycle.

Write the constraints and the non-goals

Agents benefit most from knowing what not to do:

  • technical constraints (browser support, accessibility floor, data that may not leave a system);
  • non-goals (what you decided not to build, and why);
  • decisions with the alternatives you rejected.

One thing per block, connected

Write one persona per block, one decision per block, one feature per block, and connect them: the feature to the persona and the job it serves, the decision to what it decides, the KPI to the goal it measures. A relation says more than a paragraph that mentions the other thing. See Relations.

Use the words of the glossary

Define a term once in the glossary and use it the same way everywhere. Two words for one thing, or one word for two things, is where AI output drifts first.

Reach for the visual that carries information

A journey as a timeline table, an architecture as a ~~~flow diagram, a trend as a ~~~chart: the book draws them and the AI reads the same structure. Never invent numbers or boxes to fill a visual. See Writing a page.

Replace, don't overwrite

When a decision changes, write the new decision and let it supersede the old one. The history stays readable and an agent can see why things changed.

Let the AI write too

The fastest way to good context is often to let the AI draft from what exists (a transcript, a document, the code) and to correct it. Every write carries a reason and lands in the changes feed, so correcting is cheap. Rules you want every session to follow belong in save_rule, not in a local memory file.

Check it

Ask the AI for a health check (check_project_health): it reports orphans, stubs that hold others back and broken references, with the writes that would fix them. Ask the same question twice in different words and compare the answers; where they differ, a block is missing or unclear.

About AI-GUIDE.md

The ZIP export contains a generated AI-GUIDE.md for tools that read files instead of using MCP. It is produced from the project at export time; you do not edit it. See Export.

Next

Last updated: