Microsoft's PDD Kit Makes Formal Math Proofs a Gate for AI Rust Code
Microsoft Research and GitHub Next release the Proof-Driven Development Kit in research preview, pairing LLM agents with Verus to formally verify Rust code against specs.
- Microsoft Research unveils PDD Kit, bringing formal verification to AI-generated code via Verus for Rust.
- Integrates with GitHub Next's Chopin planner, turning plans into formal specs that proofs must satisfy.
- Goal: ship agent-written code without line-by-line human review, backed by mathematical guarantees.
- Built on Verus, an SMT-based verifier using Rust's linear types and borrow checker.
- Available now as a research preview; live demo at GitHub Universe in San Francisco.
- Open challenge: translating developer intent to specs, and making failed proofs legible to non-experts.
Microsoft Research has released the Proof-Driven Development Kit in research preview, a workflow that converts a developer’s plan into a formal specification and checks AI-generated Rust with a theorem prover. The announcement addresses a growing review problem: coding agents can produce more code than humans can inspect carefully. PDD Kit aims to prove that an implementation satisfies its specification for every input allowed by the specification’s preconditions.
PDD Kit connects Verus, a verifier for Rust, with Chopin, GitHub Next’s prototype for repository-grounded planning documents. The proposed workflow could reduce line-by-line review for properties covered by a proof, while leaving architecture, specification quality, dependencies, security boundaries, and deployment behavior under human review. Microsoft Research and GitHub plan to demonstrate the integration at GitHub Universe in San Francisco.
Proof becomes a merge condition
Tests exercise selected examples, and code review depends on people spotting defects in a diff. Those methods lose coverage as an agent’s output grows across files and subsystems. Formal verification adds a different check: it converts expected behavior into logical claims and asks a solver whether those claims hold across every modeled program state.
- Plan: A developer records the intended behavior in Chopin. The document can take the form of an implementation plan, technical specification, RFC, proposal, or decision record.
- Formalize: PDD Kit translates that plan into Verus contracts, including preconditions, postconditions, and invariants.
- Implement: An agent generates Rust code and the annotations needed for verification.
- Verify: Verus creates proof obligations and sends them to an SMT solver.
- Gate: The workflow accepts the implementation only when the required obligations are discharged.
A failed verification run can expose an implementation defect, an incomplete invariant, a contradictory contract, an unsupported Rust construct, or a solver timeout. Teams therefore need diagnostics that distinguish code errors from proof-engineering problems. A passing result has a precise meaning: the implementation satisfies the stated properties under the verifier’s model and declared assumptions.
Inside the Verus check
Verus extends Rust with specifications, proof annotations, and ghost state, which exists for reasoning but disappears from the compiled program. Developers can define conditions that must hold before a function runs, results that must hold when it returns, and invariants that remain true through loops or state changes. The verifier translates those conditions into formulas that an SMT solver can evaluate without enumerating every input.
Rust’s compiler already enforces ownership and memory-safety rules for safe Rust. Verus can express higher-level properties such as sorted output, preservation of data, bounds on state transitions, and consistency after a modeled crash. Writing those contracts and auxiliary proofs usually requires specialist effort. PDD Kit assigns more of that work to language models, while Microsoft’s Verus-Bench and VeruSAGE-Bench suites measure how well models synthesize proofs.
What the proof covers
| Area | Properties a specification can express | Boundary |
|---|---|---|
| Algorithms | Output correctness, ordering, bounds, and preservation of inputs | The contract must define the intended result completely |
| Data structures | Representation invariants, legal state transitions, and index safety | Every mutating operation must preserve the invariant |
| Systems code | Modeled crash consistency, corruption detection, and protocol rules | The guarantee depends on the accuracy of the hardware and failure model |
| Product behavior | Measurable rules encoded as formal properties | Subjective UX goals and ambiguous requirements require separate evaluation |
| External components | Behavior represented through explicit assumptions or verified interfaces | Foreign code, unsafe blocks, services, compilers, and runtime environments remain part of the trust boundary |
The formal specification becomes the core review artifact because a verifier checks only the properties it contains. An LLM can produce a valid specification that omits an important requirement or misreads the original plan. The resulting proof may be logically sound while covering the wrong behavior. Effective use therefore requires developers to compare the generated contract with the product requirements, threat model, and operational assumptions.
The road from demo to CI
GitHub’s Spec Kit uses written requirements to guide Copilot, while Chopin explores durable planning documents shared by people and repository-aware agents. PDD Kit adds machine-checked acceptance criteria to that broader spec-driven workflow. Its research-preview status leaves several production questions unresolved:
- Specification accuracy: Teams need a reliable way to detect missing, mistranslated, or contradictory requirements.
- Diagnostic quality: Rust developers need actionable explanations when proofs fail, without requiring a verification specialist for routine changes.
- Code coverage: Real repositories contain unsafe Rust, macros, foreign interfaces, asynchronous code, and dependencies that may sit outside the verified model.
- Maintenance cost: Contracts and proofs must evolve with implementations without turning ordinary refactoring into prolonged proof repair.
- CI performance: Verification must complete predictably enough to serve as a practical merge gate.
The planned GitHub Universe demonstration will show the workflow running end to end with Chopin. Broader production use will require evidence that generated specifications match developer intent, proof failures remain understandable, and the verifier can handle representative Rust codebases at CI scale.