A5.6.3 · dive 3/3
Review to refute
A review that sets out to confirm the agent's self-report finds nothing — the report is written to pass. A review that sets out to refute the work against the Definition of Done finds what the gates missed.
Briefing handed the agent a complete plan; supervising watched the run against the task gates. What remains is the review — and the review is where the practice earns its name. The reference is the spec's Definition of Done, the traced and executed checks A4 produced, never the agent's “done — tests green.” The Portal's F6.7 ship prompt states the discipline literally: adversarially verify, try to refute, and default to fail when uncertain. Toggle the figure to see which reference set a critical review checks against.
Reviewed against the report, or the Definition of Done · toggle the reference
What a review checks against
Reviewing is reading the agent's output against the spec's Definition of Done by trying to refute it, not by confirming the agent's self-report. The two references are not the same set. The self-report covers only what the agent ran — the compile, the suite. The Definition of Done covers every traced check A4 produced, including the ones the agent did not run and would not report. A review that takes the report as its reference can only confirm what the report already claims; a review that takes the Definition of Done as its reference can find what the report leaves out.
Three properties make a review adversarial. It checks the spec, not the report — the reference is the Definition of Done, the traced and executed checks, never the agent's “done — tests green.” It tries to refute — each check is run as an attempt to find a counterexample, not as a box to tick. It defaults to fail when uncertain — a check that cannot be proven passing is treated as failing, so ambiguity blocks acceptance rather than passing it.
The self-report
Names only the checks the agent ran — the compile, the suite. It is written to pass, so a review that confirms it finds exactly what it already claims, and nothing more.
The Definition of Done
Names every traced and executed check A4 produced — including the master-invariant grep and the liveness smoke. Checked as a refutation, it surfaces the gap the report omits.
The one check that separates the two references on the Portal is liveness: a green
mix test does not prove the dev server boots, because the suite runs
server: false. The next section runs that check.
Refute, do not confirm
The move that distinguishes a real review from a rubber stamp is the direction of the check. A confirming
review reads the self-report and runs only the checks the report already proves — it stops at
“tests green.” An adversarial review runs every check in the Definition of Done as an attempt to
refute, including the ones the suite cannot prove until they are run live. Where the two diverge is one
check: the liveness smoke. The green suite runs server: false, so
a passing suite proves nothing about a running server. The adversarial review boots the node and runs the
check; the confirming review assumes it.
Toggle the meter below between the two reviews, over the three real Apollo checks on the Portal's F6.7
rung. A confirming review runs the two the suite already proves and assumes the third; an adversarial
review runs all three and default-fails the liveness check until it is run live. The
broadcast-only-on-success rule it refutes is the one taught in
/elixir/phoenix/pubsub/broadcast.
Confirm the report, or try to refute · toggle the review
A review that tries to confirm the agent finds nothing; a review that tries to refute it finds what the gates missed.
On the Portal
The Portal's F6.7 ship prompt assigns its verify stage to Apollo, whose standing directive is the one this dive argues, quoted verbatim from the implementation prompt:
# f6.7 — the Apollo verify stage, verbatim APOLLO — adversarially verify (try to REFUTE; default FAIL when uncertain)
The prompt then names the liveness gate as the reason the review must run the real check, not the report. A green suite is not a running server, verbatim from the same file:
# f6.7 — the liveness gate, verbatim mix test runs server:false (config/test.exs), so a green suite does NOT prove the dev server boots
and from the Director's ratify gate in the same file:
# f6.7 — the ratify gate, verbatim mix test alone does NOT satisfy the liveness criterion (the endpoint runs server: false under test)
Apollo's adversarial checks on F6.7 are all run as attempts to refute. The master-invariant
grep — CatalogLive and Catalog name only
Portal and Portal.PubSub (no Engine,
Repo, or GenServer.call); the facade boundary holds.
Broadcast only on {:ok, _} — the broadcast fires only after a
successful write, and is silent on a failed one; the review refutes it by checking both directions, the
rule taught in /elixir/phoenix/pubsub/broadcast.
The liveness two-window smoke — boot the node, curl :4000/health
for a 200, and run the rung's live two-window update; the one check the green suite does not prove. A
confirming review reads the self-report and stops at “tests green.” An adversarial review runs
the liveness smoke and finds that the green suite ran server: false — the
failure the gates alone do not catch.
The principle
Review by trying to refute the work against the spec's Definition of Done, defaulting to fail when uncertain — not by confirming the agent's self-report.
On the Portal
F6.7's Apollo verifies the master-invariant grep, the broadcast-only-on-success rule, and the liveness
two-window smoke, refuting before it accepts — and treats a green server: false
suite as no proof of a running server.
A review that tries to confirm the agent finds nothing; a review that tries to refute it finds what the gates missed.
Recap — the review earns the practice its name
Briefing fixes the plan; supervising watches the run; reviewing decides whether the work is done. The
review is adversarial: it checks the spec's Definition of Done rather than the agent's self-report, it runs
each check as an attempt to refute rather than a box to tick, and it defaults to fail when uncertain. On the
Portal that resolves to one decisive check the gates alone miss — the liveness smoke, because the
suite runs server: false. Running an agent well is a loop the human owns: the agent
runs the prompt; the human owns the gate. The module's loop closes back at its hub.
This closes A5.6 — Running Claude agents well. The pager returns to the module hub, where briefing, supervising, and reviewing are the three practices around one prompt.
References
Primary sources for adversarial verification and the value of a fixed contract to refute against, and where the prompt this dive grounds on and the companion Phoenix chapter are defined in the course.
Sources
- Anthropic — Building effective agents — why an agent's output is checked against an explicit gate rather than its own self-report.
- Anthropic — Claude Code best practices — reviewing a coding agent's work against the task's acceptance criteria, not the agent's summary.
- Hunt, A. & Thomas, D. — The Pragmatic Programmer — design by contract and the discipline of proving a claim rather than asserting it.
Related in this course
- A5.6 · Running Claude agents well — the module hub; the three practices around one prompt.
- A5.6.2 · Supervising — watching the run against the task gates, the dive before this one.
- A1.05 · Correct by definition — the Definition of Done as a closure over traced, executed checks.
- A4.6 · Traceability — how the traced checks the review reads against are produced.
- Companion · Phoenix (F6) — the real chapter whose
f6.7ship prompt this dive grounds on.