The AI Gazette

EvalsCoding agents

Making the agent keep the plan: Microsoft's proof-driven development

PDD Kit turns a two-sentence request into a formal spec, proves the agent's Rust code meets it, and plants bugs to catch specs that prove nothing.

The problem it targets is familiar: you agree a plan with a coding agent, the agent drifts, then writes tests that pass for what it built rather than what you asked for. Microsoft Research and GitHub Next built PDD Kit to hold the agent to the plan with proofs, using Verus, a verifier for Rust.

On a 5,000-line Rust storefront, the developer asked for two things about login: you only get a token with the right password, and only admin accounts get admin tokens. Before writing code, the planning step asked questions a reviewer would ask. One caught a real gap: "only with the right password" is also satisfied by a login that refuses everyone, so the developer chose to require both directions. The two sentences became eight checked clauses.

Code the verifier cannot see, such as bcrypt, the SQL lookups, token signing and the clock, is wrapped in small functions with stated assumptions. The developer signs off on each one, and each gets its own tests. Every result is labelled as proved or only tested.

The part worth copying even without formal methods is the guard against what the authors call vibe verification, specs that pass but rule out almost nothing. Two reviewer agents check the spec against the plan, then a mutation step plants one bug per clause in a scratch copy, such as refusing every login, and the verifier must reject each one. A bug that gets through means that clause checks nothing.

The developer reviewed the plain-language intent and the spec, not the generated code line by line, and the proof now runs in CI so any later change by a person or agent must keep passing. It is a research prototype and Rust only, and the guarantees are only as strong as the six trusted wrappers.

From other editions

Say hi.