"We don't trust the AI. We trust the Math."
DOF evolved from trust-by-scoring to trust-by-proof. Every trust score is now backed by a mathematical guarantee, not just a probabilistic assessment.
| Phase | Version | What it does |
|---|---|---|
| State Verification | v0.3.0 | Proves governance is mathematically inviolable |
| Z3 Gate | v0.3.1 | LLM proposes → Z3 approves or rejects with proof |
| Auto-Test Gen | v0.3.2 | Z3 discovers edge cases → generates regression tests |
| Proof Attestations | v0.3.3 | On-chain proof hash, verifiable by anyone |
Tests: 986 PASS (0 failures)
Z3 new tests: 207/207 PASS
verify-states: 8/8 PROVEN (107.7ms)
verify-hierarchy: PROVEN — 42 patterns (4.9ms)
New modules: 10 in core/
New files: 15 total
New contract: DOFProofRegistry.solcore/state_model.py— Agent state as Z3 symbolic variablescore/transitions.py— Transition verifier with 8 proven invariantscore/hierarchy_z3.py— 42 hierarchy patterns as Z3 constraintscore/z3_gate.py— Neurosymbolic gate: validates before executioncore/agent_output.py— Output protocol with Z3 constraint translationcore/boundary.py— Boundary case discovery enginecore/z3_test_generator.py— Auto-generates tests from counterexamplescore/z3_proof.py— Attestation with keccak256 proof hashcore/proof_hash.py— Deterministic proof serializationcore/proof_storage.py— Local (default) + optional IPFS storage
| ID | Invariant | Status |
|---|---|---|
| INV-1 | Threat detected → publish blocked | ✅ PROVEN |
| INV-2 | Low trust → no attestation | ✅ PROVEN |
| INV-3 | No hierarchy jumps without auth | ✅ PROVEN |
| INV-4 | Trust score always in [0,1] | ✅ PROVEN |
| INV-5 | Cooldown prevents re-publish | ✅ PROVEN |
| INV-6 | Governor requires trust > 0.8 | ✅ PROVEN |
| INV-7 | SS(f) = 1-f³ consistency | ✅ PROVEN |
| INV-8 | Governance violation → auto-demote | ✅ PROVEN |
None. Fully backward-compatible. Existing 21 on-chain attestations remain valid. Existing contracts untouched — DOFProofRegistry.sol is a new companion contract.
pip install dof-sdk==0.3.3from dof import TransitionVerifier, Z3Gate, Z3ProofAttestation
# Verify all governance invariants
verifier = TransitionVerifier()
results = verifier.verify_all() # 8/8 PROVEN
# Gate an LLM decision
gate = Z3Gate(constitution_rules)
result = gate.validate_trust_score("agent-1686", 0.95, evidence)
# result.result == GateResult.APPROVED → safe to execute
# Create proof attestation
proof = Z3ProofAttestation.from_gate_verification(result, "agent-1686", 0.95)
print(proof.z3_proof_hash.hex()) # keccak256, verifiable on-chainFull Changelog: v0.2.8...v0.3.3