Software now changes faster than you can understand it.
DiffWitness is a local control layer for AI coding. It blocks dangerous agent actions, proves which parts of a change your tests actually need, explains it in plain language and keeps track of the debt it leaves behind.
Public alpha 0.4. Human testing in progress, interfaces may still change.
$ pipx install git+https://github.com/PaititeResearch/diffwitness.git
$ pipx ensurepath # then open a new shell
$ dw setup --agent auto
Open core, MIT licensed. Runs locally, no model API needed.
Native hooks for Claude Code and Codex. Proof for any CLI agent through dw guard.
AI increased the speed of software creation. It did not increase the speed of human understanding. DiffWitness is built to close that gap.
One instrument. Four moments.
Not four products. One loop that runs while the agent works, when you accept its change, and long after.
1
Protect
while the agent works
A small, deterministic rule set stops the actions you never want an agent to take by accident. Everything else stays with your agent's own permissions.
2
Witness
before you accept
Counterfactual runs on your own tests. Each hunk is removed and the same evidence runs again. Flaky runs are labeled inconclusive. What remains is the set of witnessed hunks.
3
Explain
when you ask
IdleProof says what the agent changed, where it lives in your project and what could go wrong. It keeps your real file names and says so when the evidence is thin.
4
Remember
after merge, for good
The Debt Ledger keeps every obligation a change left behind, the reason when you accept one, and whether a later fix really repaid it.
A diff tells you what changed. A record proves what was needed.
A simulated example of how a witness record is built: each hunk is removed in turn and the same evidence runs again. Real runs happen in your environment, on your tests. Nothing runs on this page.
if (isExpired(coupon)) throw new CheckoutError("coupon_expired")export const isExpired = (c) => c.expiresAt < Date.now()import { Cart, Coupon } from "./types" import type { Cart, Coupon } from "./types"
"dayjs": "^1.11.13",export const now = () => dayjs().valueOf()console.log("[checkout] coupon", coupon.code)Evidence
- rejects an expired couponpass
- accepts a valid couponpass
- total is unchanged without couponpass
full change applied. 3/3 pass. this is where most review stops.
unwitnessed: 3, 4, 5, 6. a review signal, not an order to delete.
one new dependency, backed by no evidence at all.
6 simulated counterfactual runs, 18 test results.
Let agents move fast. Not everywhere.
Protect watches the agent's tool calls through native hooks. It blocks a short list of high-confidence dangerous actions and leaves everything else to your agent's own permission system. It is optional: proof and the ledger work with or without it.
$ dw protect enable --policy standard policy behavior observe record findings, never block standard block dangerous actions strict same, and confirm installs $ dw protect log receipts keep the decision and the rule, never raw commands, prompts or source.
What we claim, and what we don't.
The open runner is the only thing that produces a verdict. An optional private planner can choose which experiments to try first. It is advisory, never authoritative.
- we claimEvery verdict comes from executing your own evidence on the real Git patch. No model reviews another model's work.
- we claimThe core runs locally, with no model API, no hosted account and no source upload. It is MIT licensed.
- we claimUnknown stays unknown. A flaky or timed-out run is labeled inconclusive, never witnessed.
- we don'tThat DiffWitness proves your software correct. A weak test suite still produces weak evidence.
- we don'tThat the private planner saves experiments in production yet. It must cut experiments by at least 20% with zero core mismatches on our benchmark before release, and real-repository measurements are still pending.
- we don'tThat DiffWitness replaces review. It tells you where to look first.
Accepted risk shouldn't disappear after merge.
Git keeps what happened. It does not keep why you accepted it. The ledger gives every obligation a stable DW- identity. Accepting one records your reason without deleting it, and it closes when a recheck shows the condition is gone.
Example ledger, illustrative data.
Free proves value. Paid removes friction.
The runner has no paywall. Paid plans are planned to add memory over time and team workflows. Early access opens during the alpha.
Community
0 open source
open source, local, MIT licensed
- proof gate and proof certificates
- Protect, all three policies
- local Debt Ledger
- IdleProof Local explanations
- GitHub Action for pull requests
Pro
Early access
planned, for individual developers and builders
- project history across weeks and devices
- proof and ledger history in one place
- understanding drift over time
Team
Early access
planned, for teams shipping with agents
- shared proof and ledger history
- team and ownership views
- multi-project visibility
Pro and Team are still being designed. Features above are planned and pricing is not set.
Documentation for humans, and for the agents they work with.
The documentation is plain Markdown in the repository. You read it on GitHub, your agent reads the same files, and the repo ships a skill so Claude Code and Codex know how to drive dw.
This site also publishes /llms.txt, a short index of those documents written for agents.
github.com/PaititeResearch/diffwitness ├── README.md overview, install ├── docs/ │ ├── 60_SECONDS.md first run │ ├── PROOF_PROTOCOL.md what proof means │ ├── PROTECT.md runtime policies │ ├── GUARD.md proof policies │ ├── DEBT_LEDGER.md obligations, recheck │ └── THREAT_MODEL.md limits and trust ├── skills/diffwitness/ │ └── SKILL.md for coding agents └── SECURITY.md reporting issues
More autonomy. More control.
$ pipx install git+https://github.com/PaititeResearch/diffwitness.git
$ pipx ensurepath # then open a new shell
$ dw setup --agent auto