Tag Archives: 形式化验证

Proof-Driven Development: Making AI Coding Agents Keep to the Plan with Formal Proofs

Original author: Brenda Potts

Microsoft Research has introduced PDD Kit, a research prototype that applies formal verification to code written by AI coding agents. The motivation is that agents now produce changes of tens or even hundreds of thousands of lines, so reading every line in review no longer scales. Plans are supposed to be the contract between a developer and an agent, but nothing forces the agent to follow them, and the tests it writes often confirm what it built rather than what was requested.

The toolkit works inside GitHub Next's collaborative planning environment. It first asks the developer clarifying questions in plain language and records the answers in an intent document. Parts of that intent that can be formalized become specifications in Verus, a proof language for Rust. The rest become informal specifications backed by unit, end-to-end and browser tests. An agent then writes the code and the proof, and Verus deterministically checks that the code meets the spec for every possible input.

As a demonstration, the team verified the login logic of a roughly 5,000-line Rust storefront called Pet Store. The developer's request was two sentences: only the right password yields a token, and only admin accounts get admin tokens. PDD Kit turned this into eight contract clauses, including the often-missed converse that the right password must always succeed. It also made explicit the six pieces that must be trusted rather than proved, such as the bcrypt password check, database lookups and the clock, and wrote tests for each one.

To avoid weak specifications that verify but constrain nothing, the system plants one deliberate bug per clause and requires the verifier to reject it. Two reviewer agents also critique the spec. The resulting pull request labels each requirement as formally verified or empirically tested, and the proof check is added to continuous integration.

The authors are candid about limits. The tool only handles Rust today, proofs still take effort, a wrong spec is still possible, and the guarantees are only as strong as the trusted components. For engineers, the work points to a future where reviewing intent, not code, becomes a core skill, which matters for careers as AI-generated software spreads.


Source: Microsoft Research
Original title: Formally verifying agent-written full-stack web apps with PDD Kit – Microsoft Research
Original link: https://www.microsoft.com/en-us/research/blog/formally-verifying-agent-written-full-stack-web-apps-with-pdd-kit/
Published: 2026-11-05

This is a summary written by our Editorial Team, not the full original text. Copyright remains with the original author and publisher; see the original link for the full article.

Disclaimer: The views and opinions expressed in this article are solely those of the original author(s) and do not necessarily reflect the views or positions of Overseas Chinese (overseaschinese.org). We republish, translate or summarize it for informational purposes only.