/dsg-governance:z3-formal-solver-verificationfrom DSG Governance Control Plane
Verifies governance policies and deterministic gates using a hybrid Ising optimization + Z3 SMT formal solver pipeline. Coordinates parallel agent processing and generates CCVS evidence proofs.
Ships in DSG Governance Control Plane. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 │
│ Generate candidate assignments │
│ for 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 only proven decisions │
│ Generate CCVS evidence │
└──────────────────────────────────────┘
Ising/QUBO is an advisory candidate generator and optimizer only. It may rank or propose assignments for Z3 to verify, but it is never the final execution authority and must never override an unproven solver outcome.
Final gate semantics are fail-closed:
No proof means no execution authorization.
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 generates candidate assignments that:
These outputs are advisory and must be verified by Z3 before they can authorize execution.
Agent processes candidate assignments:
Z3 performs formal verification:
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 candidate + 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):
WAITING_VERIFICATION or BLOCK according to the calling gate contractIf Z3 returns UNKNOWN or the verifier errors:
WAITING_VERIFICATION for a retryable UNKNOWN condition, or BLOCK for a hard solver failureIf Ising cannot find a candidate 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 detailsWhat SKILL.md sets; muted values are Claude Code's defaults
claude plugin marketplace add tdealer01-crypto/tdealer01-crypto-dsg-control-plane && claude plugin install dsg-governance@dsg-plugins25 skills in this plugin
/dsg-action-layer-gedExecute user goals through the existing DSG Spacetime production MCP connection. Use for plan alignment, governance gates, owner approvals, provider execution, and signed evidence verification./dsg-aws-agent-toolkitUse AWS Agent Toolkit as the AWS inspection/execution adapter for DSG ONE while preserving plan alignment, approval, least privilege, and evidence capture./dsg-github-marketplace-action-controllerUse this skill when creating, packaging, validating, publishing, or maintaining DSG GitHub Marketplace Actions. It turns DSG control-plane, action-layer permission gates, deterministic GO/NO-GO valida/dsg-hybrid-agentDSG Hybrid Agent - Multi-agent workflow executor with ROM DOM simulation + real browser fallback for DSG Control Plane/dsg-infrastructure-deployerDeploy and manage DSG ONE / ProofGate control plane infrastructure on AWS using CDK. Automate the complete deployment pipeline: CloudFormation stack creation, resource validation, Secrets Manager inte/dsg-ising-optimizationDSG Ising Optimization Skill**Status:** ✅ Governance-enabledOther plugins' skills for the same job