Your agent says it's done. okproof proves it, criterion by criterion.
okproof compares a pull request with the acceptance criteria in its issue. Each criterion is marked met, failed, unproven or untested, and the merge check fails until every one is met. It is for teams that let coding agents (or people) open pull requests and want evidence that the work does what the issue asked.
Install
npm i -D okproof
npx okproof check
No runtime dependencies. Node.js 20 or later (the browser driver and verifier need Node 22). Version 0.4.0, Apache-2.0.
Quick start (30 seconds)
npx okproof init --agents --workflow --runner playwright
Run that in your repo. It creates a .okproof/ folder with an example proof file, writes a GitHub Actions workflow that runs your tests and gates the merge, and teaches coding agents the loop (an AGENTS.md and CLAUDE.md section, a skill, and an MCP server entry). --runner is one of playwright, junit, ctrf, vitest, jest, pytest. It never overwrites a file.
- Edit the proof file: list the acceptance criteria for the issue.
- Tag tests with
[okproof:<id>]so each criterion has a test that claims it. - Push. The pull request gets one okproof comment, and the check fails until every criterion is met.
How it works
1. Write a proof file
Acceptance criteria live in .okproof/<issue>.md as a checklist, one line per criterion.
2. Claim by tag
Tests name the criterion they cover, for example member can upgrade [okproof:142.1].
3. Build the ledger
okproof reads your JUnit XML or CTRF JSON and marks each criterion met, failed, unproven or untested.
4. Gate the merge
The GitHub Action posts the ledger on the pull request and fails the check until every criterion is met.
A criterion is met only when a test tagged to it passed and, as far as okproof can tell, made a real assertion. That judgement uses the assertion counts your runner reports and okproof's own static lint, which is a heuristic: it catches common empty and trivial assertions, not every way to fool a test. okproof does not judge whether a test is a good test. Read the trust model for what is and is not guaranteed.
Evidence levels
"Met" is not all the same, so okproof grades the evidence behind each criterion and lets a proof file say how much a criterion needs.
| Level | Name | What it takes |
|---|---|---|
| E0 | claimed | The criterion exists. Nothing else. |
| E1 | a tagged test passed | At least one test tagged to the criterion passed. |
| E2 | solid test | Every tagged test passed cleanly, at least one made a real assertion, and lint does not call it unrelated. The default requirement. |
| E3 | survived adversarial verification | E2, plus a verifier run, a differential run or a revert check supports the criterion. |
| E4 | proven in CI | E3, produced in CI from the job's own results on a commit whose proof folder matches the base branch. |
Details, including differential proof (does the PR's change make the tests pass?) and the revert check, are in the reference.
Use with coding agents
okproof mcp runs an MCP server over stdio so Claude Code, Cursor and Codex can check the definition of done before they say a task is finished. The tools are okproof_criteria, okproof_status, okproof_ingest_junit, okproof_lint and okproof_add_criterion. A skill file for Claude Code ships in the package. See Use with coding agents.
Links
- Reference: proof files, ledger, gate, Action, evidence levels, verifier, MCP server
- Why okproof: the principles
- Trust model and stable criterion ids
- Changelog
- npm package · GitHub repository · Issues
- llms.txt for AI tools that read project summaries