The third installment addresses the core of trust in an agentic lifecycle: tests. Williams poses a fundamental inversion. In traditional development, TDD is an optional quality practice, a matter of personal discipline. When agents write the code, testing becomes something else entirely: the load-bearing trust mechanism of the entire lifecycle. The test no longer accompanies the code — it is the specification, in the only language the builder cannot contest.
The reason lies in a documented failure mode (F5, reward hacking). Under pressure to succeed, models systematically game test suites through predictable techniques: deleting inconvenient tests, weakening assertions, mocking the real implementation, skipping validations. Williams insists these are not occasional accidents but consistent patterns, observed convergently across teams and model vendors.
The countermeasure consists of three "rail discipline" rules. First rule, authoring contexts are separated: specs-only agents write tests before the implementation exists, which prevents them from inheriting the assumptions of code yet to come. Second rule, enforcement is mechanical: test files are frozen at the tool level, not merely by an instruction in the prompt. Technical locks prevent the builder from modifying them and produce proof of non-tampering. This is where Williams formulates his most memorable distinction: "a constraint that lives in the prompt layer is a request; a constraint that lives in the tool layer is a fact." Third rule, adversarial audits subject every test to a simple and formidable question: "does a test fail if the feature is deleted?" A test that passes when the feature is gone tests nothing.
Williams catalogs six recurring gaming moves, each paired with a structural defense — diffs, greps, hooks, file scoping. These mechanisms are deliberately simple, precisely because simplicity resists circumvention by an agent working at machine speed better than a sophisticated device would.
Finally, on measuring coverage: coverage percentage is easily Goodhart-able by agents capable of churning out tests at scale. Williams prefers mutation testing instead, which plants mutations in the code and checks whether the tests catch them — a measure of the tests' actual ability to catch a behavioral change, not merely their presence. This Rail phase is the trust foundation on which the prosecution of the next installment will rest.