A1.05 · Correct by definition · dive 1
The closure
“Done” is a closed set, not a feeling. A rung carries a finite set of acceptance checks; it is done only when every one has executed and passed, and nothing is outstanding.
A closure is a set you can enumerate and re-run, not an impression. Toggle the five checks for one Portal rung on the right: the ring closes only when all five are proven. A majority is not a closure.
The closure ring · toggle each check
A closed set, not a feeling
Across this chapter the unit of work has been a rung: a thin slice of value, specified only enough, built and proven before the next begins. The word that says it is proven is done, and on this project done has a single, mechanical meaning. Each rung carries a closure — a finite, named set of acceptance checks, fixed up front from the spec (A1.04.2). The rung is done when the set is closed: every check has executed and passed, and nothing is outstanding.
The contrast is with “looks done.” “Looks done” is a statement about appearance, made by a person glancing at the work. “Closure complete” is a statement about a set you can enumerate and re-run on demand. The first is a feeling; the second is a fact a machine can confirm. Once the closure is the definition, “is it done?” stops being a debate and becomes a count.
- closure
- The finite set of acceptance checks that, all green, mean the rung is correct. Defined up front from the spec and frozen for that rung.
- closed
- Every member of the set has executed and passed, and no member is outstanding. One outstanding member means the set is not closed.
- outstanding
- A check in the set that has not yet passed — never run, or run and failed. Done is the absence of any outstanding check.
- not "looks done"
- An impression of completeness is not membership in the closed set. A check is in the closure only when it is green.
The closure is built from acceptance criteria, which A2.04 writes as Given/When/Then scenarios. This dive treats the set as given; that module shows how each member is authored.
A majority is not a closure
The tempting error is to read a high pass-count as “mostly done.” It is not. A closure is closed or it is open; there is no “eighty percent closed.” Four checks of five green is not done — and the one outstanding check is, more often than chance, the sad path everyone hoped to skip: the duplicate, the empty input, the second click. The count that matters is not how many are green; it is whether any is outstanding.
Move the slider to set how many of the five checks are green, and mark whether the sad-path check (C3) is among them. Only 5/5 reads done. Every count below it — however high — reads not done, and a 4/5 that is missing C3 is the common false “done” that ships the duplicate to a real learner.
Pass-count versus closure · only 5/5 is done
Closed or open, never “mostly”: any outstanding check — especially the sad path — leaves the rung not done, whatever the pass-count.
The closure on the Portal
Take the canonical rung “enrol in a course.” Its closure is the five acceptance checks the figures use: browse lists courses, enrol records an enrolment, enrol twice creates no duplicate, opening a lesson returns its content, and progress advances and persists. The code can compile, and C1, C2, C4 and C5 can be green, and the rung is still not done while C3 is outstanding — because “enrol twice creates no duplicate” is exactly the invariant a learner hits in the wild.
The Author (the Claude agent) builds the enrol path to the spec; the Operator (the human) accepts the rung against the executed checks, not against a glance at the screen. The closure is closed only when C3 is proven too — at which point the rung is correct, because that is what correct was defined to mean.
# The closure for the rung "enrol in a course" — five acceptance checks. # C1 browse → the catalogue lists courses # C2 enrol → an enrolment is recorded # C3 enrol twice → no duplicate (the idempotent sad path) # C4 open lesson → its content is returned # C5 progress → it advances and persists # 4/5 green with C3 outstanding is NOT done — the set is not closed. done? = Enum.all?(closure, & &1.passed?) # => false while C3 has not executed green # done only when every member has executed and passed.
Done is a closed set of executed, passing checks, defined up front; the rung is complete only when every member is green, and a majority is not a closure.
The “enrol” rung is done only when all five checks — including “enrol twice → no duplicate” — have executed green; four of five leaves it not done.
A rung is done when its closure is complete — every check in the set executed and green, nothing outstanding — not when it looks done.
Recap — the set, and whether it is closed
Done is the state of a closed set: a finite, named closure of acceptance checks, fixed from the spec, with every member executed and passing and nothing outstanding. “Looks done” is a feeling about appearance; “closure complete” is a count you can re-run. A majority is not a closure — one outstanding check, usually the sad path, leaves the rung not done. The next dive sharpens what it means for a check to be a real member of the set: it must be proven, not merely asserted.
Next in A1.05: A1.05.2 · Proven, not asserted — the check that ran and passed versus the one someone says passes, and the trace that joins a requirement to its green execution.
References
Primary sources for “done” as a set of passing checks, and where it connects in the course.
Sources
- Beck, K. — Extreme Programming Explained — “done” as the customer's acceptance tests passing, not a developer's opinion.
- Adzic, G. — Specification by Example — the agreed set of examples as the living definition of done.
- Humble & Farley — Continuous Delivery — “done” means released, held by an automated pipeline.
Related in this course
- A1.05 · Correct by definition — the module hub.
- A1.05.2 · Proven, not asserted — the next dive.
- A2.04 · Acceptance criteria with Given/When/Then — how each member of the closure is authored.
- A1.01 · The two failure modes — provable completion of a thin slice.
- A1 · Why an Agile Agent Workflow — the chapter.