/dsg-governance:dsg-ising-optimizationfrom DSG Governance Control Plane
Solves constraint satisfaction and combinatorial optimization problems using the Ising model with simulated annealing. Includes governance gate and Z3 proof verification.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /dsg-governance:dsg-ising-optimization still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Status: ✅ Governance-enabled
Solver: Simulated Annealing (Ising Model)
Decision Flow: PLAN → GATE → OPTIMIZE → VERIFY → EXECUTE
Proof System: Z3 + Ising Energy Minimization
The DSG Ising Optimization Skill solves constraint satisfaction and combinatorial optimization problems using the Ising model with simulated annealing. It combines:
Best for: Resource allocation, configuration optimization, scheduling, combinatorial problems where SAT/SMT solvers are too slow.
1. PLAN
├─ Extract optimization problem
├─ Identify constraints (hard/soft)
└─ Set solver parameters (temperature, cooling rate)
2. GATE
├─ Call deterministic governance gate
├─ Verify problem specification
└─ Generate governance proof
3. OPTIMIZE
├─ Run Ising/simulated annealing solver
├─ Minimize energy function
└─ Track best solution found
4. VERIFY
├─ Check constraint satisfaction
├─ Evaluate optimality (OPTIMAL / FEASIBLE / INFEASIBLE)
└─ Generate proof hash
5. EXECUTE
└─ Return decision + solution + metrics
interface IsingOptimizationInput {
jobId: string; // Unique job identifier
workspaceId: string; // DSG workspace
problem: {
name: string; // Optimization problem name
variables: Record<string, boolean>; // Initial state
constraints: Array<{
id: string; // Constraint ID
type: 'hard' | 'soft'; // hard = must satisfy, soft = prefer
weight: number; // Penalty weight (hard: 1.0)
description: string; // Human-readable description
requiresSatisfaction: boolean; // If true, BLOCK if unsatisfied
}>;
};
config?: { // Solver configuration
maxIterations?: number; // Default: 5000
initialTemperature?: number; // Default: 1.0
coolingRate?: number; // Default: 0.995 (0 < rate < 1)
randomSeed?: number; // For reproducibility
timeout_ms?: number; // Default: 10000
};
mockState?: boolean; // Disable production decisions if true
}
interface IsingOptimizationResult {
ok: boolean; // Production decision (PASS + feasible)
jobId: string; // Echo of input jobId
optimizationStatus: 'OPTIMAL' | 'FEASIBLE' | 'INFEASIBLE';
solution: {
satisfiable: boolean; // At least one feasible solution found
variables: Array<{
name: string;
value: boolean; // Final spin value
}>;
energy: number; // Total constraint violation energy
violatedConstraints: string[]; // IDs of unsatisfied constraints
};
metrics: {
iterations: number; // Annealing iterations performed
finalTemperature: number; // Temperature at convergence
executionTimeMs: number; // Wall-clock time
solverVersion: string; // Solver identifier
};
governance: {
gateStatus: 'PASS' | 'REVIEW' | 'BLOCK';
proofHash: string; // Z3 governance proof
};
}
const result = await runIsingOptimization({
jobId: 'alloc-2026-001',
workspaceId: 'dsg-control-plane',
problem: {
name: 'GPU Cluster Allocation',
variables: {
node_1: true,
node_2: false,
node_3: true,
node_4: false,
},
constraints: [
{
id: 'total_power',
type: 'hard',
weight: 1.0,
description: 'Total power draw < 2000W',
requiresSatisfaction: true,
},
{
id: 'min_availability',
type: 'hard',
weight: 1.0,
description: 'At least 2 nodes online',
requiresSatisfaction: true,
},
{
id: 'cost_minimize',
type: 'soft',
weight: 0.1,
description: 'Prefer fewer running nodes',
requiresSatisfaction: false,
},
],
},
config: {
maxIterations: 10000,
initialTemperature: 2.0,
coolingRate: 0.99,
},
});
// Result:
// {
// ok: true,
// optimizationStatus: 'OPTIMAL',
// solution: {
// satisfiable: true,
// variables: [
// { name: 'node_1', value: true },
// { name: 'node_2', value: false },
// { name: 'node_3', value: true },
// { name: 'node_4', value: false },
// ],
// energy: 0,
// violatedConstraints: [],
// },
// metrics: {
// iterations: 3421,
// finalTemperature: 0.087,
// executionTimeMs: 234,
// solverVersion: 'ising-simulated-annealing-v1',
// },
// governance: {
// gateStatus: 'PASS',
// proofHash: 'a1b2c3d4...',
// },
// }
const result = await runIsingOptimization({
jobId: 'sched-2026-042',
workspaceId: 'dsg-control-plane',
problem: {
name: 'Agent Task Scheduling',
variables: {
task_1_slot_0: true,
task_1_slot_1: false,
task_2_slot_0: false,
task_2_slot_1: true,
task_3_slot_0: true,
task_3_slot_1: false,
},
constraints: [
{
id: 'no_overlap',
type: 'hard',
weight: 1.0,
description: 'No task runs in two slots',
requiresSatisfaction: true,
},
{
id: 'all_assigned',
type: 'hard',
weight: 1.0,
description: 'Every task assigned to exactly one slot',
requiresSatisfaction: true,
},
{
id: 'load_balance',
type: 'soft',
weight: 0.5,
description: 'Prefer even slot load',
requiresSatisfaction: false,
},
],
},
});
// Result may show:
// optimizationStatus: 'FEASIBLE' (hard constraints met, soft violated)
// solution.energy: 0.5 (one soft constraint penalty)
// solution.violatedConstraints: [] (no hard violations)
// governance.gateStatus: 'REVIEW' (feasible but not optimal)
const result = await runIsingOptimization({
jobId: 'infeas-2026-999',
workspaceId: 'dsg-control-plane',
problem: {
name: 'Impossible Coloring',
variables: { v1: true, v2: false, v3: true },
constraints: [
{
id: 'edge_12',
type: 'hard',
weight: 1.0,
description: 'v1 and v2 must differ',
requiresSatisfaction: true,
},
{
id: 'edge_23',
type: 'hard',
weight: 1.0,
description: 'v2 and v3 must differ',
requiresSatisfaction: true,
},
{
id: 'edge_31',
type: 'hard',
weight: 1.0,
description: 'v3 and v1 must differ',
requiresSatisfaction: true,
},
{
id: 'all_true',
type: 'hard',
weight: 1.0,
description: 'All variables must be true',
requiresSatisfaction: true,
},
],
},
});
// Result:
// optimizationStatus: 'INFEASIBLE'
// solution.satisfiable: false
// governance.gateStatus: 'BLOCK'
Hard constraints (type: 'hard', weight = 1.0):
FEASIBLE or INFEASIBLErequiresSatisfaction: true, violation → BLOCKSoft constraints (type: 'soft', weight < 1.0):
The solver uses simulated annealing:
temperature_t = initialTemperature × (coolingRate ^ t)
- Higher initial temperature: explore more (risk: slow convergence)
- Faster cooling (coolingRate near 1.0): faster convergence (risk: local minima)
- Slower cooling (coolingRate like 0.99): better quality (risk: slower)
Recommendation: Start with initialTemperature: 1.0, coolingRate: 0.995 for medium problems.
Exit when:
- iteration count >= maxIterations, OR
- elapsed time >= timeout_ms
Whichever comes first. Default: 5000 iterations, 10000 ms timeout.
Gate Decision Logic:
IF gateResult.pass == false
→ gateStatus = 'BLOCK'
ELSE IF optimizationStatus == 'OPTIMAL'
→ gateStatus = 'PASS'
ELSE IF optimizationStatus == 'FEASIBLE'
→ gateStatus = 'REVIEW'
ELSE
→ gateStatus = 'BLOCK'
Production Readiness:
ok = !mockState AND gateStatus == 'PASS' AND optimizationStatus == 'OPTIMAL'
| Aspect | Ising | Z3 | Formal Verification |
|---|---|---|---|
| Type | Optimization | SMT/SAT | Constraint proof |
| Speed | Fast (heuristic) | Slow (exact) | Medium (proof-based) |
| Optimality | Approximate | Exact | Proven properties |
| Best For | Large combinatorial | Small precise | Policy validation |
| Hard Timeout | Yes (always completes) | May timeout | May timeout |
| Use Case | Resource allocation | Scheduling | Governance policy |
Benchmarks (10k variable problem):
| Metric | Time | Notes |
|---|---|---|
| Initialization | ~5 ms | Build energy function |
| Annealing (5000 iter) | ~200 ms | LCG random number gen |
| Convergence | Varies | Depends on constraint complexity |
| Final energy calc | ~2 ms | Verify solution |
Memory:
# Via Claude Code CLI
/dsg-ising-optimization <problem-description>
# Via Skill tool
Skill("dsg-ising-optimization", "jobId: alloc-001, name: Resource Allocation, ...")
# Programmatic
import { runIsingOptimization } from '@/skills/dsg-ising-optimization/skill';
const result = await runIsingOptimization(input);
randomSeed for deterministic results❌ Mistake: Confusing hard/soft constraint weights
✅ Fix: Hard constraints always weight = 1.0, only soft constraints use < 1.0
❌ Mistake: Expecting OPTIMAL for NP-hard problems with 1000+ variables
✅ Fix: Accept FEASIBLE status for large problems, increase iterations/temperature if needed
❌ Mistake: Not setting timeout for production
✅ Fix: Always specify config.timeout_ms (default 10000 ms is safe)
❌ Mistake: Assuming energy = 0 means OPTIMAL
✅ Fix: Check optimizationStatus field, not just energy
L1 (Unit): Test individual constraint satisfaction functions
L2 (Integration): Test solver with known problems (graph coloring, scheduling)
L3 (Adversarial): Test impossible problems, timeout conditions
L4 (Mutation): Mutation testing of energy calculation and annealing loop
L5 (Provenance): Signed proof from Z3 gate + audit trail
Reference: docs/CLAIM_EVIDENCE_STANDARD.md, docs/ISING_SOLVER_GUIDE.md
lib/ising/gpu-acceleration.ts)Last Updated: 2026-07-23
Status: ✅ Governance-enabled, production-ready, audit-ready
What 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-pluginsRead when SKILL.md points to them.
25 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-marketplace-fixRemediation skill for shipping the DSG Governance Control Plane to the Claude Code plugin marketplace. Fixes the two remaining blockers after the marketplace.json owner merge: (1) the premature ClaudeOther plugins' skills for the same job