formal-methods-drift-guard

Classify drift between specs, code, and formal models; translate machine results into domain-owner review questions.

416|6|Updated Apr 24, 2026
Ready to run
npx skills add https://github.com/mizchi/skills --skill formal-methods-drift-guard-mizchi
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: formal-methods-drift-guard
Source: https://github.com/mizchi/skills/tree/main/formal-methods-drift-guard
Command: npx skills add https://github.com/mizchi/skills --skill formal-methods-drift-guard-mizchi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When a formal model or verifier check already exists, product changes create drift across three surfaces: specification documents, implementation code/config/logs, and the formal model itself. Teams waste time debating whether to weaken the property, update code, or rewrite specs—without a structured way to classify and translate machine results (SAT/UNSAT, counterexample traces, proof failures) into actionable domain decisions. ## Core Features & Use Cases - Triplet Inventory: Map each domain claim across spec, code, and model surfaces with stable claim IDs. - Drift Classification: Categorize drift as spec-drift, code-drift, model-drift, harness-drift, decision-drift, or coverage-gap before proposing fixes. - Domain Translation: Convert SAT/UNSAT changes, counterexample traces, and CI failures into business-language questions (e.g., "Can Support read settings without write access?"). - Ledger Output: Generate structured drift ledger entries with epistemic status (machine-confirmed, log-confirmed, diff-inferred, not-run) to lock maintenance decisions. - Use Case: After an authorization model asserts "non-admins never reach Settings," docs change to allow Support read-only access. The skill maps the three surfaces, classifies this as model-drift (docs and code moved; model is stale), translates the SAT witness into domain language, and proposes updating the model while preserving the write-access prohibition. ## Quick Start Provide the drift-guard skill with the previous and current docs, implementation code changes, model file, CI result or check command, and any witness trace or log; ask it to classify the drift, translate the machine result into domain wording, and propose whether to update specs, code, model, or harness.

Frequently Asked Questions about formal-methods-drift-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use formal-methods-drift-guard instead of formal-methods-reconciler?▼

Use drift-guard when you already have a working model, CI check, or verifier job and need to keep it aligned as product changes happen. Use reconciler first if no useful formal model exists yet—it helps extract initial claims and choose modeling tools.

How do I classify whether drift is in the spec, code, or model?▼

Ask which surface currently diverges from the accepted domain rule, not which changed first. If docs and code both moved to a new rule while the model still encodes the old rule, primary drift is model-drift; the docs/code change is the driver. Record the choice and owner decision in the ledger so the next maintenance cycle reuses it.

What does the drift ledger contain and how do I maintain it?▼

Each ledger entry records claim_id, source_of_truth, spec/code/model deltas, check command, machine result, drift class, witness, domain wording, the owner's question, recommended fix target, and lock updates (CI path filters, expected-result changes, tool pins). Update it when domain decisions change; keep it in version control alongside model files and CI workflows.

How do I separate machine-confirmed from log-confirmed drift evidence?▼

Machine-confirmed means the verifier actually ran and produced the result. Log-confirmed means a real trace or log file matches or contradicts the model. Diff-inferred means you detected a change in source code or docs but have not run the verifier. Not-run means the check has not been executed yet. Separate these in the epistemic_status field so the owner knows what is proven versus inferred.

What should I do if the model is red but I do not know whether the behavior is intended?▼

Preserve the witness (counterexample, trace, log entry) and ask the domain owner a specific question: e.g., "Can Support read settings without write access?" or "Does a missing policy document cause a fail-close or allow temporary fallback?" Record the question in the ledger and wait for domain decision before changing specs, code, or model.

Why should I not silently weaken the property to make the model green?▼

Weakening the property without domain review defeats the purpose of formal methods—converting a discovery tool into a rubber stamp. Every red check, stale claim, or changed witness is a drift signal that requires translating into domain language first. The owner decides whether drift is acceptable, accidental, or a real gap to fix.