Write PRDs that agents can build and test against
A product requirements document (PRD) says what to build and why, not how. For agents it is the contract: plans are argued from it, tasks trace to it, tests prove it, and reviewers grade against it. Spec-driven tools such as GitHub Spec Kit and Kiro make the same split: requirements first, then design or plan, then tasks, then code, with review between steps.
Content
Section titled “Content”-
MUST include these sections:
Section Contains Problem and why Who has the problem, what it costs them, why now Users Who uses it and in what situation Success Measurable outcomes, with how they will be measured Goals / non-goals / anti-goals What is in, what is deliberately out, what would make it a failure even if it works Requirements Numbered, each with acceptance criteria Non-functional requirements Security, privacy, performance, accessibility, operations, cost Constraints Platforms, versions, dependencies, budgets, policies, deadlines (exact values) Assumptions and open questions Each with an owner Owner, status, version, date Who decides; draft / approved -
MUST keep the how out, except where a decision is a real constraint; record it as a constraint with its reason.
-
MUST give each requirement a stable ID (
R-012) that never changes or gets reused, so plans, tasks, tests and commits can cite it.
Testable requirements
Section titled “Testable requirements”-
MUST write acceptance criteria that can be checked, one behaviour each. Use EARS-style patterns:
Pattern Form Always THE SYSTEM SHALL … Event WHEN … THE SYSTEM SHALL … State WHILE … THE SYSTEM SHALL … Unwanted IF … THEN THE SYSTEM SHALL … Optional feature WHERE … THE SYSTEM SHALL … -
MUST cover error, empty and edge cases, not only the happy path, and define every term that could be read two ways (BP-0024).
-
MUST NOT use words that cannot be tested (“fast”, “user-friendly”, “robust”, “as appropriate”); replace them with numbers or observable behaviour.
Review before planning
Section titled “Review before planning”- MUST review the PRD before any plan is written: a fresh agent or person checks for gaps (a goal with no requirement), contradictions (two criteria no implementation can satisfy together), ambiguity (criteria with more than one reasonable reading), and untestable wording. Fix or record each as an open question.
- MUST get the owner’s approval and record it; the PRD is then the reference until changed through review (BP-0057).
Use it
Section titled “Use it”- MUST trace work to it: every planned unit names the requirement IDs it delivers, every requirement maps to at least one unit and one test, and the final review checks each criterion (BP-0008, BP-0048).
- SHOULD write acceptance tests from the criteria before implementation (BP-0037).
- MUST change the PRD when the requirement changes, through review with a version bump and change note. If code and PRD disagree, decide which is right and fix the other; never leave both.
- SHOULD store PRDs in the repository as Markdown in plain language, where agents and people read the same file (BP-0009).
When to apply
Section titled “When to apply”Features and projects big enough to need a plan; anything where several agents or people must build to the same understanding.
Examples
Section titled “Examples”Requirement with EARS acceptance criteria:
### R-007 Report a problem on a practice pageUser story: As a reader, I want to report a problem with a practice so that errors get fixed.
Acceptance criteria1. THE SYSTEM SHALL show a "Report a problem" link on every practice page.2. WHEN the reader selects the link, THE SYSTEM SHALL open a pre-filled GitHub issue form with the practice ID and version.3. IF the practice has no ID, THEN THE SYSTEM SHALL fail the site build with error E_NOID.4. WHERE the site is built without a repository URL, THE SYSTEM SHALL omit the link.Traceability in a plan:
Unit 3: report link component — delivers R-007.1, R-007.2; tests: report-link.test.tsUnit 4: build check for missing IDs — delivers R-007.3; tests: practices.test.ts (E_NOID)Anti-patterns
Section titled “Anti-patterns”- A PRD that is a list of features with no why and no success measure.
- “The page should load fast” instead of a number and a condition.
- Architecture and class names in the requirements.
- Requirements renumbered so commits and tests point at the wrong thing.
- The code changed, the PRD did not.
Checklist
Section titled “Checklist”- Problem, users, measurable success, goals / non-goals / anti-goals
- Numbered requirements with stable IDs and testable criteria (EARS-style)
- Edge and error cases; non-functional requirements; constraints with exact values
- Reviewed for gaps, contradictions, ambiguity; approved by the owner
- Units, tests and final review trace to requirement IDs
- Changed through review when requirements change