# DiffWitness > DiffWitness is a local, open-core control layer for code written by AI coding agents such as Claude Code and Codex. It blocks a short list of high-confidence dangerous agent actions (Protect, optional), proves which hunks of a Git change the selected tests actually need through counterfactual runs (Proof), keeps a hash-chained Debt Ledger of the obligations a change leaves behind, and explains changes in plain language through IdleProof. The core runs locally with no model API, no hosted account and no source upload. Status: public alpha 0.4.0a1, made by Paitite Research. Install: `pipx install git+https://github.com/PaititeResearch/diffwitness.git`, then `pipx ensurepath` and open a new shell. Run `dw setup --agent auto` inside the Git repository to connect DiffWitness to your coding agent. Runtime protection is a separate opt-in: `dw protect enable`. ## Docs - [README](https://github.com/PaititeResearch/diffwitness/blob/main/README.md): overview, install, fast path, commands - [60-second guide](https://github.com/PaititeResearch/diffwitness/blob/main/docs/60_SECONDS.md): first run - [Proof protocol](https://github.com/PaititeResearch/diffwitness/blob/main/docs/PROOF_PROTOCOL.md): contrast, necessity, sufficiency, interaction and stability - [Protect](https://github.com/PaititeResearch/diffwitness/blob/main/docs/PROTECT.md): runtime policies observe, standard and strict - [Guard](https://github.com/PaititeResearch/diffwitness/blob/main/docs/GUARD.md): proof policies and the explicit before/after wrapper - [Gate](https://github.com/PaititeResearch/diffwitness/blob/main/docs/GATE.md): merge gate semantics - [Debt Ledger](https://github.com/PaititeResearch/diffwitness/blob/main/docs/DEBT_LEDGER.md): obligations, acceptance, recheck and repayment - [Threat model](https://github.com/PaititeResearch/diffwitness/blob/main/docs/THREAT_MODEL.md): trust boundaries and limits ## Agent integration - [DiffWitness skill](https://github.com/PaititeResearch/diffwitness/blob/main/skills/diffwitness/SKILL.md): how a coding agent should drive `dw` - [IdleProof](https://github.com/PaititeResearch/idleproof): the human-understanding layer, local cockpit ## Optional - [Security policy](https://github.com/PaititeResearch/diffwitness/blob/main/SECURITY.md) - [Changelog](https://github.com/PaititeResearch/diffwitness/blob/main/CHANGELOG.md) - [Paitite](https://paitite.com): the company behind Paitite Research