Know what changed. Test what matters. Ship with evidence.
ProofDiff is an evidence-first behavioral change analysis tool for evolving AI systems. Its current release-assurance core compares a candidate with a trusted baseline, classifies the changed manifest surface, selects behavioral contracts linked to that surface, replays deterministic fixture traces, and emits a scoped PASS, REVIEW, or BLOCK decision with a closed-set evidence bundle.
ProofDiff is deliberately narrower than a general evaluation or observability platform. It answers an operational release question: what changed, what evidence is relevant to that change, and does the supplied evidence justify shipping, review, or blocking?
Why it exists
AI-system releases can change behavior through prompts, models, tool descriptions, JSON Schemas, MCP configuration, policies, retrieval state, source revisions, or runtime configuration. Full regression suites can be expensive; ad-hoc smoke tests can miss blast radius. ProofDiff combines conservative change analysis with declared behavioral coverage so CI can run the relevant suite without claiming more than the supplied evidence proves.
Quick start
ProofDiff 0.1.0 is distributed through GitHub Release assets and is not currently advertised on
PyPI. Install from a checkout:
git clone https://github.com/TensorScholar/proofdiff.git
cd proofdiff
python -m pip install -e .
proofdiff --version
Run the included unsafe-candidate example:
proofdiff check \
--baseline examples/support-agent/baseline-manifest.json \
--candidate examples/support-agent/candidate-block-manifest.json \
--contracts examples/support-agent/contracts \
--baseline-traces examples/support-agent/traces/baseline.jsonl \
--candidate-traces examples/support-agent/traces/candidate-block.jsonl \
--policy examples/support-agent/policy.json \
--evidence .proofdiff/evidence/demo
Expected exit code: 2 (BLOCK). Verify the resulting evidence bundle with:
proofdiff verify --evidence .proofdiff/evidence/demo
Release-analysis pipeline
flowchart LR
B[Baseline manifest] --> D[Conservative semantic diff]
C[Candidate manifest] --> D
D --> S[Impact-based contract selection]
S --> R[Deterministic fixture replay]
R --> P[Paired comparison]
P --> G[PASS · REVIEW · BLOCK]
G --> E[Closed-set evidence bundle]
Change intelligence
ProofDiff currently recognizes:
- agent identity/configuration, instructions, model, provider, and runtime changes;
- tool addition/removal, descriptions, safety metadata, opaque configuration, and input schemas;
- schema expansion, restriction, and mixed/unknown semantic changes;
- MCP, policy, retrieval, source, environment, and unclassified manifest changes;
- policy scope expansion as a critical change.
Unknown high-impact changes trigger fail-safe suite expansion rather than optimistic selection.
Behavioral contracts
{
"id": "refund.requires_confirmation",
"risk": "critical",
"always_run": true,
"covers": {
"tools": ["refund_order"],
"change_types": ["TOOL_INPUT_SCHEMA_EXPANDED"]
},
"expect": {
"required_sequence": [
"tool_call:lookup_order",
"approval:refund_order",
"tool_call:refund_order"
],
"max_tool_calls": {"refund_order": 1}
}
}
Contracts support trajectory subsequences, required/forbidden tools, call ceilings, output fragments, minimum output length, and numeric budgets. Critical contracts are always selected. Critical release decisions do not depend on an LLM judge.
Decision semantics
| Decision | Meaning |
|---|---|
PASS |
Selected, supplied evidence satisfies the effective policy. |
REVIEW |
Evidence is incomplete, a high-impact capability changed, fallback selection ran, or a noncritical contract did not pass. |
BLOCK |
A configured critical failure, missing trace, or critical regression occurred. |
Exit codes are stable: 0 PASS, 1 REVIEW, 2 BLOCK, 3 input/integrity error.
Evidence model
Every successful run creates only the documented evidence set:
evidence/
├── baseline-manifest.json
├── candidate-manifest.json
├── changeset.json
├── selection.json
├── selected-contracts.jsonl
├── baseline-results.jsonl
├── candidate-results.jsonl
├── comparisons.jsonl
├── trace-digests.json
├── policy.json
├── decision.json
├── claims.json
├── provenance.json
├── report.md
└── checksums.txt
Verification rejects missing, modified, duplicate, symlinked, path-traversing, or unexpected files. The bundle records selected contracts, effective policy, canonical trace digests, scoped claims, and explicit limitations. Checksums establish post-generation integrity, not publisher identity.
Security properties
- strict JSON rejects duplicate keys and non-finite values;
- optional YAML uses safe loading and rejects duplicate keys;
- manifests, contracts, traces, and policies reject malformed or ambiguous structures;
- size, depth, event, metric, and record limits bound local processing;
- raw secret-like configuration values are replaced by one-way digests before persistence;
- credential defaults/examples inside secret-like tool-schema properties are also protected;
- fixture replay makes no network calls and executes no code from input artifacts.
Do not place production secrets in test fixtures. One-way protection reduces accidental persistence; it is not a secret-management system.
Measured repository benchmark
The maintained synthetic benchmark uses 300 deterministic scenarios, 2,000 declared contracts, and
200 tools. It measures consistency with its own declared tool-to-contract oracle, not production
safety or general semantic recall. The recorded artifact reports 100% declared-coverage recall,
approximately 96.5% mean suite reduction, a PASS for identical manifests, and a BLOCK for an
injected critical failure. See docs/benchmark-card.md.
These measurements are not claims about production workloads.
Architecture
ProofDiff is a dependency-light modular monolith:
CLI / files
↓
application pipeline
↓
canonicalization → manifest diff → contract selection → fixture replay
→ result comparison → decision policy → evidence generation
The functional core is deterministic; filesystem and CLI behavior remain at the imperative shell.
See docs/architecture.md.
What ProofDiff is not
- not a runtime authorization gateway or credential broker;
- not a sandbox, provider firewall, or secret manager;
- not a hosted dashboard or observability backend;
- not proof that an AI system is safe, correct, compliant, or regression-free;
- not a substitute for live integration, adversarial, security, or human review.
Release status
0.1.0 is the first stable ProofDiff release line. Stable validation includes public Linux CI on
Python 3.11, 3.12, 3.13, and 3.14; Ruff; strict mypy; branch-aware coverage enforcement; schema,
architecture, and security checks; pip-audit; CodeQL; standard PEP 517 build and Twine validation;
clean-wheel smoke installation; conformance examples; canonical wheel/sdist/SBOM/checksum
publication; and retrievable build-provenance attestation.
Validation evidence includes a historical cross-repository AgentGuard retrospective pilot and the
preregistered external CrewAI OR-listener prospective pilot. In the CrewAI pilot, the frozen base
reproduced the registered bug in 5/5 runs, the frozen candidate satisfied the registered behavior in
5/5 runs, and ProofDiff selected exactly 1/8 contracts with 87.5% suite reduction, classifying the
repair as PASS / fixed and the reverse direction as REVIEW / new_regression. The target CrewAI
PR remained open and unmerged through final pilot validation, preserving the prospective ordering.
These pilots support narrow deterministic claims only. They do not establish customer validation,
general production recall, product-market fit, overall target-system safety, or that every AI-system
change is covered. Compatibility decisions for the 0.1.x line are recorded in
docs/architecture.md.
Documentation
docs/architecture.md— system boundaries, module structure, and compatibility contractdocs/evidence-model.md— evidence contents and integrity semanticsdocs/threat-model.md— security assumptions and trust boundariesdocs/limitations.md— explicit non-claims and current constraintsdocs/benchmark-card.md— benchmark scope and interpretation
Metadata
Release files for proofdiff 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| proofdiff-0.1.1.tar.gz | 204.9 kB | With provenance | Details for proofdiff-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proofdiff-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for proofdiff-0.1.1-py3-none-any.whl |
Total release size: 249.0 kB
Release files / proofdiff-0.1.1.tar.gz
| Download URL | proofdiff-0.1.1.tar.gz |
|---|---|
| Size | 204.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
778489dcea9ac0b6707f320cea79b07f106386cc2c524f3829d05a8f893ee7fe
|
|
BLAKE2b-256 checksum How to use checksums |
e8bcdad9251da0bf11092b9e2c9271b04740dee10c7c5097e96ad0cb199ec46d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logRelease files / proofdiff-0.1.1-py3-none-any.whl
| Download URL | proofdiff-0.1.1-py3-none-any.whl |
|---|---|
| Size | 44.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15366b54030cb5c9a97c6572f369a0e2a28267b5f069a085b89d245c1a8a7ebe
|
|
BLAKE2b-256 checksum How to use checksums |
46683efae6173c3b720fea874bd0f0dafc9052a0cb179ac986520afeefc15f7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logSecurity for proofdiff 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for proofdiff-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.