In short: Coding agents now produce more code than people can review line by line, and the tests they write check what they built, not what you asked for. A coding agent is an AI system that writes, changes and tests software on its own. Microsoft Research's PDD Kit answers this with formal proof. A formal proof is a computer-checked mathematical argument that code behaves as described for every possible input, not only for the inputs someone tried. PDD Kit turns developer intent into a specification, a precise written statement of what the code must do, and proves the agent's code meets it for every input. Its Magnetar system goes further, attaching a proof to a program's result that anyone can check in milliseconds. For assurance teams, the people who confirm that controls work, the evidence moves from "someone reviewed it" to "a verifier proved it against this specification". A verifier is the program that checks the proof. The review effort moves to the specification.
Before and after: say an audit file for a login component reads "pull request reviewed by two engineers; 94% test coverage". With a proof, it reads "login rules proved against specification v1.2; specification reviewed and signed off by the product owner". The first record tells you people looked. The second tells you what was shown, and against which rules.
Why does review stop working for AI-written code?
Microsoft Research describes the problem plainly. Coding agents ship whole features in one sitting, often spanning tens or hundreds of thousands of lines. A pull request is the bundle of changes a developer submits for review before it joins the main code. Reading every line of the pull request does not scale.
For scale only: say a careful reviewer reads 500 lines an hour. A 100,000-line feature is then 200 hours of reading, about five working weeks for one person, for one feature.
Teams have moved their effort to the plan and the tests instead. That has its own gap: nothing forces the agent to follow the plan. The agent can implement something slightly different, then write tests that pass for its own implementation. Coverage looks healthy. Test coverage is the share of the code the tests run; a high figure shows the code was exercised, not that it does the right thing. The gap between what was asked for and what shipped stays hidden until a bug report arrives.
Imagine you ask for prices rounded to the nearest penny. The agent writes code that cuts off the extra digits instead, so £2.999 becomes £2.99 rather than £3.00. It then writes tests that expect £2.99. Every test passes and coverage is full. The code is still wrong, and nothing in the test report says so.
For an auditor, this breaks the usual evidence. Review notes no longer cover the code. Test coverage no longer shows the requirement was met.
What is proof-driven development?
Proof-driven development (PDD) is Microsoft Research's name for a workflow where a coding agent must prove its code meets a formal specification. A formal specification is a requirement written in a precise, mathematical language that a computer can check code against. PDD Kit is its toolkit. It runs inside GitHub Next's Chopin planning environment, a workspace where the developer and the agent agree a plan before any code is written. It works in two halves:
- Settle intent. PDD Kit asks the questions a careful reviewer would ask and records the answers in an intent document, a plain record of what the developer wants. The parts that can be formalised become a formal specification in Verus, a proof language for Rust. Rust is a programming language. The rest become informal specifications for tests.
- Hold the code to it. PDD Kit generates proofs that the code satisfies the formal specification for every possible input, and generates tests for the informal parts.
FIG. 1.0 — How PDD Kit turns a developer request into labelled results
Every result states which kind of verification it rests on. A proof is labelled proof. A passing test is labelled evidence, because it shows the code worked only on the inputs it tried.
Say a shop's intent document holds two requirements. "A discount never takes a price below zero" is exact: for every price and every discount, the result is zero or more. That becomes a formal specification, and PDD Kit proves it. "The checkout page responds quickly" has no exact definition to prove, so it becomes an informal specification and gets tests. The report then reads: discount rule, proof; checkout response, evidence.
What did the Pet Store example show?
Microsoft built Pet Store, a full-stack web app of about 5,000 lines of Rust, and used PDD Kit to verify its login logic. Full-stack means the app includes both the screens people use and the server code behind them. The developer's request was two sentences: you only get a token with the right password, and only admin accounts get admin tokens. A token is the digital pass a system issues after login; an admin token unlocks administrator powers.
PDD Kit's first question shows why specifications need review. "You only get a token with the right password" is also satisfied by a login that refuses everyone. The developer had to add the converse, that the right password always works, to rule that out. The converse is the same rule turned round: not only "wrong password, no token" but also "right password, always a token". An agent left alone would pick one reading without saying so.
Before and after:
- Before: "You only get a token with the right password." A login that rejects every user meets this rule. Nobody can break in, and nobody can log in.
- After: "You only get a token with the right password, and the right password always gets a token." The refuse-everyone login now fails the specification, and the proof cannot be completed until genuine users get in.
Verus then hardened the code, making it resistant to the failures the specification rules out, and found existing bugs. It proved the absence of login bugs with respect to the specification. In plain words: for the rules written down, no input exists that breaks them. The developer reviewed the intent and never read the generated code line by line.
Where does the proof stop?
PDD Kit makes the boundary explicit. The Trusted Computing Base is the code the proof assumes behaves as described, such as a third-party cryptography library or the user interface. A third-party library is ready-made code from another supplier; cryptography is the maths that scrambles and protects data such as passwords. Those parts are covered by tests, not proof, and PDD Kit asks the developer to sign off on each piece.
Imagine the login proof rests on one assumption: the cryptography library checks passwords correctly. The proof says the login rules hold if that assumption is true. Now say the library has a flaw that accepts a blank password. The proof is still valid, yet the login is not safe, because the flaw sits in the trusted part. The sign-off record shows exactly where to look: the library, its version and the person who accepted it.
FIG. 2.0 — What a proof covers and what it rests on
That boundary is exactly what an auditor needs written down. A proof is only as good as its specification and its assumptions.
What does Magnetar add?
Magnetar is a zero-knowledge virtual machine from Microsoft Research. A virtual machine is software that runs programs as if it were a separate computer. Zero-knowledge means the proof reveals nothing about the inputs beyond the fact that the run was correct. A program runs and returns, alongside its result, a short proof that it ran correctly. Anyone can check that proof in milliseconds, without rerunning the program, without trusting whoever ran it and without seeing the private inputs.
Microsoft reports three properties:
- General-purpose: it proves ordinary programs written in Rust, Go or C, compiled for RISC-V, as written. Go and C are programming languages. RISC-V is a standard set of machine instructions that programs are translated into before they run. "As written" means the program needs no rewriting for the proof system.
- Faster: it runs 10 to 39 times faster on average than the prior fastest comparable systems. For scale only: a proving job that took 39 minutes on such a system would take between 1 and 3.9 minutes.
- Long-lived security: its security rests only on standard hash functions, not on cryptography a quantum computer could break. A hash function turns any data into a short fingerprint. A quantum computer is a different kind of computer that could break some of today's encryption.
Microsoft names two uses that matter to governance teams. An AI agent could attach a proof that each action complied with the policy it was given. A regulated financial institution could prove transactions were processed correctly without making them public.
Imagine a payments agent with one policy: no transfer above £10,000 without a second approval. Each time it acts, it returns the action and a proof that the policy check ran and passed. Before, an auditor samples 25 transfers and trusts the rest. After, every transfer carries its own proof, and the auditor checks each one without account details and without rerunning anything.
Google DeepMind is working in the same direction: its November 2026 blog lists "AlphaProof Code: a breakthrough in verifying complex software at depth".
Why this matters for assurance
An audit asks for evidence that a control ran. A control is a check or safeguard that keeps a risk in bounds, such as "only admin accounts get admin tokens". For software, that evidence has been review records and test results. Both weaken as agents write more of the code.
A machine-checked proof against a reviewed specification is stronger evidence, and it scales with code volume: the computer checks the proof, so more code does not mean more reading. It changes three things for assurance work:
- What to review: the specification and the trusted boundary, not the generated code.
- What to record: which components are proved, which are tested and which are trusted, and who signed off on each.
- What to ask suppliers: for a high-risk component, ask whether it is proved, against which specification, and what sits in its trusted boundary.
Say a supplier sells you a payments module. Before: you ask for the test report and receive "1,200 tests, all passing". After: you also ask three questions. Is the transfer-limit logic proved? Against which specification, and may we read it? What sits in the trusted boundary, and who signed it off? The answers separate what was shown for every input from what was only tried.
What to do differently
- Rank components by risk. Start where Microsoft starts: the most sensitive logic, such as authentication (checking who someone is), authorisation (checking what they may do), payments and policy checks.
- Write the specification first. Have a person review it before the agent writes code, including the converse cases.
- Label every result. Record each component as proved, tested or trusted, with the sign-off.
- Keep the specification in change control. Change control is the formal process for approving changes. A changed specification is a changed requirement and needs the same review.
- Review the trusted boundary. Everything outside the proof is an assumption. List the assumptions and test them.
Imagine a team applying this to a customer portal with three parts. Password reset is sensitive logic, so it gets a written specification, a person's review including the converse case (a valid reset link always works), and a proof. The monthly report export gets tests, labelled evidence. The PDF library from an outside supplier sits in the trusted boundary, with a named engineer's sign-off. Six months later, the business adds a support role that may reset other users' passwords. That is a changed specification, so it goes through the same review before the agent touches the code.
These tools are new research results. Confirm a tool's maturity before you rely on its output as audit evidence.*
Frequently asked questions
Can you trust tests written by a coding agent?
Not on their own. Microsoft Research notes that agent-written tests tend to check what the agent built rather than what you asked for.
What is the difference between a proof and a test?
A test shows the code worked on the inputs it tried. A formal proof shows the code meets its specification for every possible input.
Do you need formal-methods expertise to use PDD Kit?
Microsoft says no. PDD Kit helps write the specification and generates the proofs. The developer's job is to review intent.
What is a zero-knowledge proof of computation?
A short certificate, produced alongside a program's result, that the program ran correctly on its inputs. Anyone can check it without rerunning the program or seeing private inputs.
Does a proof make code safe?
It proves the code meets its specification. If the specification is wrong or incomplete, the proof does not catch it, so the specification needs its own review.
We build custom AI apps and agents, and hand over code, runbooks and the evidence trail with them.
Sources
- Microsoft Research, "Formally verifying agent-written full-stack web apps with PDD Kit": https://www.microsoft.com/en-us/research/blog/formally-verifying-agent-written-full-stack-web-apps-with-pdd-kit/
- Microsoft Research, "Proof-based general-purpose computing with Magnetar": https://www.microsoft.com/en-us/research/blog/proof-based-general-purpose-computing-with-magnetar/
- Google DeepMind blog listing (AlphaProof Code, November 2026): https://deepmind.google/discover/blog/
*Tool descriptions and figures come from each publisher's own blog post.
