Formally verifying agent-written full-stack web apps with PDD Kit

Microsoft Research has described PDD Kit, a toolkit for what it calls Proof-Driven Development, or PDD. PDD Kit runs inside Chopin, GitHub Next's real-time, multiplayer planning environment, and is positioned roughly the way Spec Kit serves Spec-Driven Development, but for formal methods. The core idea: a team settles its intent in plain language, PDD Kit converts the parts that can be formalized into specifications in Verus, a proof language for Rust, then proves the code a coding agent wrote satisfies those specs for every possible input. Where a proof cannot reach, it uses tests instead.
The motivation is the review bottleneck. Coding agents can now ship whole features in one sitting, spanning tens of thousands or hundreds of thousands of lines. Reading every line of a pull request does not scale, so teams invest in a plan plus tests. The problem, as Microsoft Research frames it, is that nothing forces an agent to follow the plan. The agent can drift, implement something slightly different, and then write tests that pass for its own implementation rather than the code that was asked for. Continuous integration fills with many low-quality tests, coverage looks healthy, and the gap between intent and shipped code stays hidden until a bug report surfaces.
PDD Kit's answer separates two kinds of assurance. Formal verification is a mathematical proof, checked by a verifier, that code satisfies its specification for every possible input. The verifier today is Verus, co-developed by Microsoft Research, Carnegie Mellon University, VMware Research, ETH Zurich, MPI-SWS, UNSW Sydney, the University of Texas at Austin, the University of Michigan, the University of British Columbia, the University of Wisconsin–Madison and the Weizmann Institute of Science. Empirical verification runs the code and observes behavior, covering what a proof cannot reach, such as a third-party cryptography library or a user interface, using unit and end-to-end tests, terminal automation, browser agents and computer-use agents. PDD Kit labels a passing test as evidence rather than proof.
The boundary between the two is the Trusted Computing Base, the code a proof assumes behaves as described. PDD Kit makes that boundary explicit and asks the developer to sign off on each piece. The workflow has two halves: team members review intent in plain language, with PDD Kit asking the questions a careful reviewer would ask and explaining relevant code as it goes, and answers are recorded in an intent artifact. Formalizable intent becomes formal specs; the rest, taken on trust, becomes informal specs backed by tests. Microsoft Research says no formal methods background is required.
The demo is Pet Store, a full-stack web app written entirely in Rust, with an Axum and SQLite backend handling inventory, promotions, orders and checkout, and a Leptos storefront compiled to WebAssembly, totaling about 5,000 lines. The team focused on login logic, reasoning that a login bug can hand an attacker a customer's account or an admin's controls. The developer's entire request was two sentences: verify the login logic, with the requirements that you only get a token with the right password and that only admin accounts get admin tokens.
PDD Kit's planning step, pdd-plan, read the code and returned questions in a Decisions tab before writing anything. One early question matters beyond pedantry: the statement that a token only comes with the right password rules out a wrong password earning a token, but it is also satisfied by a login that refuses everyone. The developer chose both directions, making the requirement an if-and-only-if, and PDD Kit built an intent map tying each requirement to the developer's own words, the corresponding spec section and the covering tests.
At plan sign-off, the developer widened scope. The default draft proved the central decision but left the surrounding handler trusted and tested; the handler is where lookups are awaited and the token is signed, glue where a refactor can quietly swap lines. The developer gave the handler its own async spec, moving nearly everything into the proof and leaving a new login_flow function carrying the contract from request fields to token or HTTP error. Because matching intent is not proof, PDD Kit brought the revised plan back for fresh sign-off.
Microsoft Research is explicit about where proof stops. bcrypt hashing, sqlx queries and jsonwebtoken signing live in other crates outside the verifier's view; facts about what SQLite holds or what the clock says are inputs; whether and how fast login completes is unspecified; human judgments about error messages and screens are out of scope; and a proof says nothing about requirements nobody wrote down. For login, the developer accepted six trusted pieces: two lookups, a password-check wrapper around bcrypt, token generation, the 24-hour expiry computation, database error mapping, and the handler shell. Each assumed clause gets a planned empirical check written as a Given/When/Then scenario before the test exists.
People review the intent artifact, not the proof. The agent writes the proof and Verus checks every step; if any clause could fail for even one input, the build fails at that clause. In the Pet Store case, Verus hardened the code, uncovered existing bugs and proved the absence of login bugs with respect to the specification, and the developer never read the generated code line by line.
In practice, this suggests PDD is strongest where properties are crisp and security-relevant, like authentication and authorization, and weaker where correctness depends on external services or human judgment. A likely trade-off is effort: proofs still require enabling annotations, wrappers and explicit trust decisions, so the cost shifts from reading code to specifying and auditing the trusted boundary. Microsoft Research recommends starting with the most sensitive parts of an application and verifying incrementally.
Why it matters: Teams relying on coding agents now face a review gap that tests alone do not close, because agent-written tests tend to validate what was built rather than what was requested. PDD Kit points at a workflow where the human reviews a short spec and an explicit list of trust assumptions instead of a large diff. For developers, that likely means new skills around writing formal-ish intent and deciding what to trust; the proof still stops at Verus-visible Rust, so non-Rust components and world-state remain test territory.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
AI agents can generate code at a scale that’s hard for humans to review line-by-line. PDD Kit helps ensure the code is doing what the developer intended by creating formal specifications and testing against them. It converts developer intent into a Verus specification, proves AI-generated code meets it for every input, and uses tests where proofs aren't practical. Developers review intent, not every line. The post Formally verifying agent-written full-stack web apps with PDD Kit appeared first on Microsoft Research