A5.2.2 · dive 2/3
Numbered requirements
References tell the agent what to read. The second part of the brief tells it what to build — as numbered, testable lines, each a single statement with a single check.
The Portal's web bootstrap brief, f6.1.llms.md, carries eight of
them: F6.1-R1 through F6.1-R8. Each names exactly one
thing the agent builds and exactly one check that closes it — a boot, a render, a static grep, a
restart. Toggle the figure on the right to read each requirement as one numbered line and the kind of check
that proves it.
One numbered statement, one check · pick a requirement
One statement, one check
A numbered requirement is one checkable statement, given an id, that names exactly one thing the agent must build and exactly one check that closes it. It is the unit the brief decomposes the work into. If you cannot say what check closes a line — a boot, a render, a grep, a restart — the line is a wish, not a requirement.
Read F6.1-R7 as the cleanest case: no module under
apps/portal_web/lib/ contains the strings Portal.Engine,
Repo, or GenServer.call. That is the master
invariant, and its check is a single static grep that either returns nothing or names the offending file.
There is no room to interpret it. F6.1-R6 is the same shape on a runtime check:
GET /health returns 200 with body
ok and performs no domain call — one request, one observable answer.
The principle
A requirement is one observable fact and the kind of check that proves it. Name the check — boot, render, grep, restart — or the line is intent the agent must interpret.
On the Portal
f6.1.llms.md writes each of R1–R8 as a single line with a single check: R7 is a grep,
R6 a request, R8 a 422-not-500 observation plus an
endpoint restart.
A requirement the agent can run a check against is buildable; one it can only interpret is not.
Numbering keeps them separable
Numbering is not a tidy habit. R1, R4,
R7 are addresses: the build cites them, the task DAG cites them
(T5 … [R4, R8]), the agent stories cite them, and the review walks them.
Eight numbered lines are eight separately-checkable units. Fold two of them into one paragraph and the
checkable count falls — one paragraph is one ambiguous unit, however many checks it once held.
Toggle the figure below between the eight numbered requirements and a version that merges
R7 and R8 into a single paragraph. The static grep and
the 422-and-self-heal check are distinct obligations; merged, they read as one line of intent, and the
separately-checkable count drops from eight to seven.
Separately-checkable requirements · toggle how they are written
Numbering turns a paragraph of intent into a checklist the build and the review share.
On the Portal
The Portal's web bootstrap ships from f6.1.llms.md, and its
## Requirements section is eight numbered lines —
F6.1-R1 through F6.1-R8. The first pins the
PortalWeb.Endpoint plug stack and the LiveView socket; the seventh is the master
invariant a single grep proves; the eighth is two observations — an expected failure renders
422, never 500, and a killed endpoint restarts under its
supervisor. The controller that satisfies R4 lives in the companion course at
the controllers lesson, where
index/2 calls Portal.courses_of/1 and renders the 422 path
on a %Portal.Error{}.
# f6.1.llms.md — ## Requirements (numbered, testable; verbatim) # F6.1-R1 PortalWeb.Endpoint is the outermost plug — Plug.Static, RequestId, Telemetry, Parsers, Session, then plug PortalWeb.Router last; it declares socket "/live", Phoenix.LiveView.Socket. [US: F6.1-US1] F6.1-R6 GET /health returns 200 with body "ok" and performs no domain call. [US: F6.1-US1] F6.1-R7 no module under apps/portal_web/lib/ contains Portal.Engine, Repo, or GenServer.call — the master invariant, statically checkable. [US: F6.1-US3] F6.1-R8 an expected domain failure yields a 422, never a 500; killing the endpoint restarts it under the supervisor. [US: F6.1-US4, F6.1-US5] # # R7 closes on a literal grep over code: grep -rE "Portal\.Engine|Repo|GenServer\.call" apps/portal_web/lib/ # returns nothing
The principle
Number the requirements so each is a single statement the agent can satisfy and the reviewer can check — and so every other artifact can cite the exact line.
On the Portal
f6.1.llms.md numbers R1–R8; R7 is a literal grep
(grep -rE "Portal.Engine|Repo|GenServer.call" apps/portal_web/lib/ is empty), and
the task DAG cites each requirement the steps satisfy.
Numbering makes a requirement addressable — cited by the build, the task DAG, and the review, never restated and never lost.
Recap — eight lines, eight checks
The brief's second part is a list of numbered, testable requirements: each one a single statement that
names what the agent builds and the check that closes it. On the Portal that list is
F6.1-R1 through F6.1-R8 — a boot, a render, a static
grep, a restart, each addressable and each separately checkable. Fold two into a paragraph and the count
falls; keep them numbered and the build and the review share one checklist. The next dive carries the line
further: each requirement also names the story it serves, so the list is not only checkable but
accountable.
Next in A5.2: Traceability — each requirement names the user story it serves and the check it satisfies, and an untraced requirement is flagged.
References
Primary sources for writing testable, numbered requirements an agent can satisfy and a reviewer can check, and where the requirement this dive grounds on is built in the companion course.
Sources
- llmstxt.org — The /llms.txt convention — the links-first machine-brief form whose second part is the numbered requirements list.
- Cohn, M. — User Stories Applied — a requirement is testable only when it names the check that closes it; the discipline behind a single numbered line.
- Hunt, A. & Thomas, D. — The Pragmatic Programmer — design by contract: state each obligation precisely so the builder satisfies it rather than interprets it.
Related in this course
- A5.2 · References and requirements — the module hub.
- A5.2.1 · References first — the sources the agent reads before any requirement.
- A5.2.3 · Traceability — each requirement traced to its story and its check.
- A4 · The spec layer — the spec a requirement derives from.
- Companion · The request lifecycle (F6) — the real rung whose
f6.1.llms.mdcarriesR1–R8.