From DSG Governance Control Plane
Verify deterministic gates and governance policies using hybrid Ising + Z3 formal solver pipeline. Use this skill whenever you need to: verify policy constraints formally, generate deterministic proofs for audit trails, detect violations and counterexamples, integrate formal proofs into CCVS evidence pipeline, or validate gate decisions using Z3 SMT solver. The skill coordinates a three-stage verification workflow: (1) Ising solver finds safe assignments matching policy requirements, (2) Agent processes results in parallel, (3) Z3 performs formal verification to detect violations. Triggers on: "verify policy", "formal proof", "check constraint", "Z3", "gate verification", "proof generation", "violation detection", "CCVS evidence", "deterministic proof", "counterexample", "satisfiability".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dsg-governance:z3-formal-solver-verificationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill coordinates a **hybrid verification pipeline** combining Ising optimization, parallel agent processing, and Z3 formal verification to prove governance policies are sound and safe.
This skill coordinates a hybrid verification pipeline combining Ising optimization, parallel agent processing, and Z3 formal verification to prove governance policies are sound and safe.
┌──────────────────────┐
│ Policy Constraint │
│ + Requirement │
└──────────┬───────────┘
│
↓
┌──────────────────────────────────────┐
│ 1. Ising Solver │
│ Find safe values satisfying │
│ policy + requirement │
└──────────┬───────────────────────────┘
│
↓
┌──────────────────────────────────────┐
│ 2. Agent (Parallel Processing) │
│ Process assignments concurrently │
│ Build candidate set │
└──────────┬───────────────────────────┘
│
↓
┌──────────────────────────────────────┐
│ 3. Z3 Formal Verification │
│ Prove satisfiability │
│ Detect violations │
│ Generate counterexamples │
└──────────┬───────────────────────────┘
│
↓
┌──────────────────────────────────────┐
│ 4. Action Layer │
│ Execute gate decision │
│ Generate CCVS evidence │
└──────────────────────────────────────┘
Goal: Prove a governance policy is satisfiable and sound.
Example:
Policy: "Approve action if risk_score < 50 AND user_role IN ['admin', 'operator']"
Task: Generate formal proof that this policy is satisfiable with example values.
Skill handles:
Goal: Generate replay-deterministic proofs for audit trails.
Example:
Gate Input: {policy_id: "gov-policy-v1", threshold: 50, action: "APPROVE"}
Task: Generate proof that proves same input → same output (deterministic).
Skill handles:
Goal: Detect unsatisfiable constraints and generate minimal counterexamples.
Example:
Policy: "Approve if risk < 50 AND risk >= 100" (contradiction)
Task: Prove policy is UNSAT and show why.
Skill handles:
Provide a policy specification with constraints:
{
"policy_id": "gov-policy-v1",
"description": "Governance policy for action approval",
"constraints": [
"risk_score >= 0 AND risk_score <= 100",
"action_approval => risk_score < threshold",
"user_role IN ['admin', 'operator', 'viewer']",
"admin_approval => user_role == 'admin'"
],
"variables": {
"risk_score": {"type": "integer", "min": 0, "max": 100},
"threshold": {"type": "integer", "min": 0, "max": 100},
"user_role": {"type": "enum", "values": ["admin", "operator", "viewer"]},
"action_approval": {"type": "boolean"},
"admin_approval": {"type": "boolean"}
},
"goal": "Verify satisfiability and generate proof"
}
The skill produces audit-ready evidence:
{
"proof_status": "SATISFIABLE",
"proof_hash": "sha256:abc123...",
"model": {
"risk_score": 35,
"threshold": 50,
"user_role": "admin",
"action_approval": true,
"admin_approval": true
},
"solver_calls": 3,
"execution_time_ms": 8.88,
"replay_deterministic": true,
"ccvs_evidence": {
"level": "L1",
"schema": "z3-proof-v1",
"proof_object": {...},
"timestamp": "2026-07-23T12:58:00Z"
}
}
Provide policy constraints in SMT-LIB or JSON format.
Ising solver finds safe value assignments that:
Agent processes candidate assignments:
Z3 performs formal proof:
Based on Z3 result:
Produce CCVS-compatible evidence:
POST /api/dsg/v1/gates/evaluate
├─ Input: policy_id, constraints, variables
├─ Use Skill: z3-formal-solver-verification
└─ Output: proof_hash, proof_status, ccvs_evidence
L1 (Unit): Z3 proof object
L2 (Integration): Ising + Agent + Z3 trace
L3 (Replay): Determinism verification
L4 (Mutation/Proof): Formal property invariants
L5 (Provenance): Build artifacts + signatures
DSG Brain: Credential Lease
├─ Generate proof of credential access
├─ Use Skill: z3-formal-solver-verification
└─ Attach proof to audit trail
Input:
Policy: "Approve if risk < 50 AND role == admin"
Variables: risk [0-100], role [admin|user|guest]
Goal: Prove satisfiability
Output:
Status: SATISFIABLE ✅
Proof Hash: z3:abc123...
Model: {risk: 35, role: "admin"}
Execution: 8.88ms
Evidence: CCVS L1 + L3 (replay verified)
Input:
Policy: "Approve if risk < 50 AND risk >= 100" (contradictory)
Goal: Detect UNSAT and show why
Output:
Status: UNSATISFIABLE ❌
Proof Hash: z3:def456...
UNSAT Core: [risk < 50, risk >= 100]
Execution: 2.14ms
Evidence: CCVS L1 + violation core + counterexample
Input:
Same policy and assignment as Example 1
Goal: Verify proof determinism (same input → same hash)
Output:
Status: SATISFIABLE ✅
Proof Hash: z3:abc123... (SAME as Example 1)
Replay Deterministic: TRUE ✅
Consistency: 100%
Evidence: CCVS L3 (replay verification)
If Z3 solver times out (typically >30s):
If Ising cannot find assignment:
If constraint space is very large:
lib/dsg/deterministic/ — Deterministic gate scaffoldlib/dsg/brain/ — Credential broker integration/api/dsg/v1/gates/evaluate — DSG gate evaluation endpointlib/ccvs/ — CCVS evidence pipelineZ3_FORMAL_SOLVER_README.md — Complete Z3 implementation detailsnpx claudepluginhub tdealer01-crypto/tdealer01-crypto-dsg-control-plane --plugin dsg-governanceDeterministic formal verification for DSG ONE.
Generates mechanically verified proofs from Narya event logs, checking queue consistency, replay determinism, non-leakage, and GF(3) conservation for event-sourced system invariants and audits.
Assists with formal verification of Sui Move smart contracts using the Sui Prover. Useful for ensuring contract correctness and security.