Playbook overview

Verification and validation (V&V)

Guide, operating model and reference

The cancellation patch comes back green. Then you look at the diff and see that the test for exactly 24 hours now expects a refusal. The implementation and the test agree with each other. They disagree with the decision.

Adding tests is part of the job. If the worker can also change the agreed expectations and wave the result through, it’s marking its own homework.

In short. Keep the approved expectations outside the candidate’s control. Check the exact revision and let the team see what passed, what someone tried in use and what still needs a decision.

Verification, validation and review

In the earlier article on building with agents, verification was my quick sanity check before handing the diff to a reviewer. I was sitting there and could try the feature myself. If I send the same change away to run overnight, what will I need in the morning? I want to know what the build checked, who controlled the expected result and whether someone tried the journey a customer will actually take.

Verification asks whether the change meets the written requirements. Validation asks whether the result works for the people using it, in the situation it was built for. A green suite can tell you the service accepts the cancellation at exactly 24 hours. It takes a different check to find that the booking confirmation and the customer’s screen describe different deadlines. The distinction comes from systems engineering and is useful even when you only need five minutes to apply it. NASA Systems Engineering Handbook

What do you need to know?What I’d ask to see
Does the rule allow cancellation at the agreed cutoff?A domain test with a fixed clock just before, at and just after the cutoff. Use the precision the application supports.
Do existing bookings keep their terms?An integration test that reads a representative record created before the new policy field existed.
Does retrying the request repeat its side effects?An integration test that makes repeated requests and checks persisted events. Try overlapping requests if the system can receive them.
Can the customer and support team use the result?A representative user journey in a test environment. Compare the confirmation, displayed deadline and refusal message. Ask the owner to resolve any policy mismatch it exposes.
Can the team maintain the patch?A fresh review of the diff, the architecture and the test changes. Check where the rule lives and whether its assertions still mean what the brief says.

Use the lowest layer that can see the failure. A domain test can pin the time boundary cheaply. A browser journey can check what a customer sees. If a realistic journey reveals that the brief itself is wrong, take that back to the owner and agree a new revision before treating it as a coding defect.

Agree how you’ll check the result

For a small supervised change, the brief and the existing checks may be enough. For unattended work or a change with serious consequences, agree the checks before starting and keep a versioned record. I’ll call that the verification contract. Start with the approved specification and the team’s rules for verifying changes. Write down which revisions apply, why the work needs this level of checking, and what a reviewer should expect to see for each important requirement. If the build uses the record to decide whether work can proceed, give the checks stable identifiers and a format it can read.

LevelChecks I’d considerWhere I’d use it
StandardBuild, relevant unit and integration tests, architecture checks where applicable, and review. Validate the path affected by the change.Ordinary content, interface and low-risk behaviour changes.
EnhancedAdd approved fixtures, property-based or mutation tests, failure and concurrency cases, or an independent examination of a risky assumption.Compatibility changes, imports, shared state, or policies with expensive edge cases.
Targeted formalAdd a model check or machine-checked proof for a named invariant. Keep the implementation checks and state what the model covers.A property where the cost of an error justifies a separate model or proof, such as preventing a superseded worker from publishing.

Set the level of checking by what happens if you get it wrong. Exactly where a boundary falls may matter more than how much code moved. Keep the contract light enough for the task. One worker and an ordinary build job may be all the machinery you need.

Keep the agreed checks outside the worker’s control

The build needs a trusted copy of the approved specification, expected results for critical tests and the rules for signing off the change. The worker can suggest a better test or point out a wrong expectation. The person who owns the decision must approve a change to it, and the check needs to run again against the new revision.

Run the checks that decide acceptance in a separate job with permissions and settings the worker’s patch cannot change. The job should fetch the approved inputs itself and check the exact revision under review. If a check fails, start by finding out why. If an assertion or fixture genuinely needs changing, show the reason and have that change reviewed. A second agent reading the diff can help, but it cannot make the build independent if the patch can edit the rules the build uses.

Keep the result with the change

Let the worker explain what it changed and where it got stuck. Have the separate verification job record which approved brief and policy it used, the code and build it checked, and the result of each required check. Record pass, fail, inconclusive or not run as distinct outcomes. Include links to the evidence and any assumptions or exclusions a reviewer needs. A manual check can go in the record too, with who did it and what they observed.

A pass belongs to the revisions it names. If the patch changes after verification, run the checks for the new patch. If the agreement or required checks change, verify against the new agreement. A failure, a missing result or a check that ran out of time leaves the work open. Passing the checks gets the change to the next step. The team still makes any acceptance or release decision that its policy reserves for a person.

A second reader can spot something the tests missed. Ask them to read the brief and the diff before showing them the implementation agent’s account. Give them time to check whether the change fits the surrounding code as well as whether it does what was asked.

What I’d check in the review

Start with the couple of decisions that matter to the change. For the booking policy, I’d ask where the cutoff is decided and what happens to bookings made under the old terms. A review summary can point to those parts of the diff and link the evidence.

  • The behaviour in the diff matches the approved brief, including the important edge cases.
  • The rule lives where the team expects it. Test and fixture changes still express the agreed behaviour.
  • The verification record identifies the revision under review, the approved expectations and the result of each required check.
  • Someone has tried the affected journey where it matters and recorded what they saw. Open decisions have an owner.

An automated first pass can group files, surface changed assertions and flag missing evidence. Have the reviewer decide whether those findings matter and record any acceptance decision the policy gives them. If a colleague is learning this part of the system, pair on one review and ask them to walk through why the old booking still gets the old terms. In one study of developers learning a Python library, Anthropic found lower quiz scores with AI assistance and observed differences in how people used it. That gives me a reason to make room for explaining the change during review. NIST Secure Software Development Framework · Anthropic’s coding-skills study

When a model is worth trying

Use ordinary checks by default. Treat formal methods as an optional escalation for a high-consequence property. The worker recovery model below is a proposed pilot.

Suppose a worker goes quiet, its claim expires and a replacement takes over. Can the original worker still publish when it wakes up? If the timing is hard to reason through, model the few states and events that matter. Say what must never happen, what should eventually happen, and what you’re assuming about the system. Then put the same failure cases through the implementation.

Choose the method after naming the property. For a self-contained calculation with explicit preconditions and invariants, a language such as Dafny gives you somewhere to express and verify them. A verified model of the calculation gives you evidence about that model. Check how it relates to the code that ships. For failure timing across a scheduler, a small state model checked with TLC can help. If you’re already testing concurrent .NET code, Coyote is an example of a tool to evaluate against your runtime and test setup.

Before relying on the result, check that the property can fail in a deliberately broken example and that the model reaches the cases you care about. Put a limit on how long you’ll explore or attempt a proof. Record an inconclusive result as inconclusive.

DeepMind’s AlphaProof Code research gives a useful example of keeping the approved statement separate from the work produced to prove it. The results concern specified properties of a particular build of a library. The practice I’d borrow is to keep the agreement fixed while the worker produces evidence. The worker recovery example is a proposed trial of that idea at a much smaller scale. AlphaProof Code paper

See a filled-in verification record.