diff --git a/README.md b/README.md index 0e4f30b..05da52d 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,26 @@ **Proof-Driven Development for Go.** -When a change touches who can sign in, what can be authorized, or when a balance can be debited, examples alone leave cases unchecked. Write the rule as a contract on the production Go function. `pdd` runs Gobra to check it, runs Go tests for the surrounding code, and writes a receipt you can bring to code review. +ProofSteer checks decision rules in production Go code, runs tests for the surrounding behavior, and writes a receipt you can bring to code review. Start with one decision in an existing Go project. The core workflow works without an LLM account. [View live report examples](https://proofsteer-demo.cruskell.chatgpt.site) · [Try the login example](#try-it) · [Use it in your project](#use-it-in-your-project) · [Download pdd](https://github.com/cruskell/proofsteer-go/releases/tag/v0.4.0) +## Why proof-driven development? + +AI agents can write code quickly. Human review can become the bottleneck when someone has to trace each branch of an authorization or payment rule and check it against the intended behavior. Passing tests confirm the cases they exercise. + +Start by describing the rule in plain language. An agent can draft a Go contract, and a human reviewer approves the contract and its assumptions. After implementation, `pdd` runs Gobra to verify that the Go function satisfies the contract for every input it covers. + +Consider a withdrawal rule with a balance of 100. Two authentication states, two lock states, and four withdrawal amounts (0, 1, 100, and 101) give **16 cases**. + +| Review task | Manual code review | Proof-driven review | +| --- | --- | --- | +| Is this the intended rule, and are its assumptions sound? | Reviewer checks the specification | Reviewer checks the specification | +| Does the Go function make the right decision for these 16 inputs? | Reviewer traces the code | Gobra checks the contract | +| Do HTTP handling and the browser flow behave as expected? | Reviewer checks test coverage and results | Reviewer checks test coverage and results | + ## What a proof catches Suppose the requirement is **allow a login exactly when the account exists, the password matches, and the account is unlocked**. The specification lives beside the production code in a Go comment that Gobra reads.