When agents write the code and the tests
AI changes the economics of this topic more than almost any other. Code is cheap. Tests are cheap. A coding agent will happily produce a feature, a test suite that passes and a pull request description, in minutes. The temptation is to read “all tests green” as evidence of quality. It is not.
Tests written by the same agent that wrote the code are not independent evidence. They prove the code does what the agent thought it should, which is the thing in question.
Independence is the whole point of verification. The V-Model paired every level of design with a test derived from the requirement, not from the design. An agent that writes the implementation and then writes tests to match has derived both from the same misunderstanding, and will pass its own exam. If the generated tests are the only tests, the right-hand side of the H has quietly been folded into the left.
What gives independent evidence:
- Integration Scenarios with acceptance criteria written from intent, before generation. These are the executable specification the agent generates against, and the check it cannot have gamed. Outcome-based prompting is how the intent reaches the agent; the scenario check is how it comes back.
- Fitness functions and contracts that pre-date the change and run on every change.
- Evaluations for anything with a model in it: a fixed set of cases with expected behaviour, run on every change, as Verification is the bottleneck describes.
- Review by a person who owns the change, and who is accountable for it however it was produced. An agent can review too, usefully, as a first pass. It is not the owner.
- Production. Shift right matters more, not less, when the volume of change goes up. If five times as much code arrives and review capacity has not changed, the queue moves downstream and quality falls through the gap; canaries, flags and error budgets are what catch it.
This is the AI SDLC thesis in miniature. AI compresses the bottom of the H, so the verification burden shifts right, onto the evidence side, and onto people. The cross-functional developer of the 2010s wrote the code and the tests. The cross-functional developer of the late 2020s writes the scenarios and the checks, directs the generation, and owns the evidence. The second job needs more judgement than the first, which is a problem for how people acquire it; see Mastery when agents do the junior work.
The fringe-case picture changes too. Agents are good at the happy path and the alternatives they were told about, because those are in the prompt. They are no better than people at the paths nobody wrote down, and they are confident in a way that hides it. Exploratory testing, chaos experiments and the professional tester’s instinct for the unusual become more valuable as the obvious paths get cheaper to cover.
Related
- Verification is the bottleneck: why the right-hand side of the H is where AI-era effort goes
- Outcome-based prompting: how intent reaches the agent
- Shift left, shift right: canaries, flags and error budgets that catch what review misses