An agent builds from what the request says. Where the request leaves gaps, it fills them with plausible guesses, and the gap between what was asked and what was needed shows up in review, often thousands of lines later. The cheapest place to close that gap is before the agent starts: on a page that the right people have read and approved. This chapter covers what goes on that page, where its content comes from, who approves it, and how it stays true after the code ships.

Four parts of a spec that holds up

The first part is intent: why the feature exists and what problem it solves. The second is acceptance criteria, the part that decides when the work is done. Hari Krishnan, who helps large teams adopt spec-driven development and advises the OpenSpec project, writes them as Given, When, Then, from the point of view of what the business wants. In his setup each criterion becomes an acceptance test, and after the build a separate quality agent works through the list and checks off each one. The same criteria that shaped the design then verify the result.

EARS, a notation first published by Rolls-Royce engineers in 2009, does the same job in single sentences: when this happens, the system shall do that. AWS Kiro writes the requirements of every spec in this form.

The third part is invariants: what must stay true whatever the change, such as an account balance that never goes negative. The fourth is scope, a list of what the spec deliberately leaves out, so that the agent does not add it on its own initiative. Both are easy to forget, and both prevent the kind of plausible guess that looks right in a demo and fails in production.

How long it should be

Long is not the goal. Michal Cichra of Safe Intelligence, in a talk published by AI Engineer in June 2026, described the product requirements document as something light: why the feature exists, the problem it solves, and the journey a user takes through the application to reach the goal. He added that the document serves the team as well as the agent, including the developer who has forgotten, six weeks later, why the feature was built that way.

Where the content comes from

A short document still needs the right content, and that comes from the people who know the business. Haimanot Tekie uses domain storytelling, a workshop method in which domain experts and developers draw how work actually flows. At NDC Oslo in October 2026 she described a session in which the group spent about two and a half hours drawing two scenario stories of ten or eleven sentences each. The time went on conversation. In her words, what matters is "the understanding of the domain that you're left with after the conversation", not the diagram itself.

That is the reason a generated spec is not enough. An AI model can draft a requirements document in seconds. The understanding comes from the conversation, and the spec is its record.

Who approves it

A workable split follows the four parts. Product approves the intent and the acceptance criteria. The architect approves the constraints and invariants. Security or compliance approve the parts that touch their area. Each approval is recorded with the name of the approver and the time, so that the approved version can be found again when someone asks why the system behaves the way it does. Nitin Garg, writing in InfoQ in September 2026, lists such an approved baseline, with approver and timestamp, among the records that form the audit trail.

In regulated work, traceability is the second requirement. Each requirement keeps a stable ID that links it to its tests. In one published case from November 2026, the build pipeline checks those links on every pull request and blocks changes to requirements that nobody approved. The check is mechanical, which is the point: nobody has to remember to do it.

Keeping the spec alive

An approved spec can still go stale. The code changes, an incident reveals a case nobody thought of, and the document drifts away from what the system does. At XConf Singapore in October 2026, Hao Pan, a principal consultant at Thoughtworks, described a rule his team adopted: when an incident slips through, they never only patch the bug. They also correct the decision record behind it, together with the thresholds, the monitoring and the ownership. Over time the records improve with every incident, and the agent reads the corrected version on the next change.

The rule carries over to any spec. When a defect escapes, ask whether the spec missed something, correct it there, and let the next change start from the corrected version.

Checklist for your team

Before an agent starts on a feature:

  1. Does the spec state the intent in a few sentences that a business owner would sign?
  2. Is every acceptance criterion testable, in Given, When, Then or EARS form?
  3. Are the invariants written down, and is the scope explicit about what is left out?
  4. Did the content come from a conversation with the people who know the domain?
  5. Is each approval recorded with a name and a time, and does each requirement have a stable ID linked to its tests?
  6. When a defect escapes, who corrects the spec, and where is that recorded?

The approval split and the checklist are our own proposal, drawn from the sources below. The invariant example is an illustration.

Next: chapter 3 moves from what to build to the limits the agent builds within, with architecture as a guardrail.

Sources

BMad Method (by Brian Madison and the BMad Code community, open source): GitHub, github.com, opens in a new tab · YouTube, youtube.com, opens in a new tab · Discord, discord.gg, opens in a new tab