AI
Microsoft's PDD Kit brings mathematical proof to AI-generated code without specialists
A new toolkit lets teams verify that agent-written code meets its specification through automated proofs, making formal methods accessible to engineers without advanced training.
1/6
Microsoft Research Blog
As AI coding agents ship entire features in a single pass—sometimes spanning hundreds of thousands of lines—traditional line-by-line code review no longer scales. Microsoft Research's PDD Kit addresses this challenge by automatically verifying that agent-generated code actually implements what was requested, rather than merely passing whatever tests the agent wrote.
The gap between intent and implementation#
When teams work with coding agents today, they typically invest time in a clear plan and expected tests, then hand off the work. The problem: nothing technically forces the agent to follow that plan. An agent might implement something slightly different, then write tests that pass for its implementation rather than what was originally requested. This gap remains hidden until a bug surfaces or an edge case appears.
Traditional human review caught two common failure modes—missing obviously necessary logic or including obviously incorrect behavior—but testing alone can't close that gap. Tests only exercise a tiny fraction of what a program can actually do. Mathematical proofs, by contrast, can verify that code works correctly for every possible input.
What PDD Kit does#
PDD Kit integrates formal methods—the mathematical proofs historically reserved for specialists—into everyday development. Rather than requiring developers to learn unfamiliar proof languages or wait years for verification, the toolkit works with both humans and AI agents to:
- Turn a developer's intent (in plain language) into a formal specification
- Automatically prove the generated code meets that spec for all inputs
- Fall back to high-quality tests for code the proof can't reach (like external libraries or I/O operations)
- Label every result with which kind of verification backs it up
The system runs inside GitHub Next's Chopin, a collaborative planning tool where teams and agents work in a shared document. Two key verification types emerge:
Formal verification uses Verus, a proof language for Rust developed by Microsoft Research and academic partners. This produces a mathematical proof that code satisfies its specification.
Empirical verification runs the code against tests (including browser automation and computer-use agents) to check behavior that proofs can't reach, such as third-party libraries or user interfaces.

