/sdd:formal-verificationfrom sdd
Guides formal verification workflows: writing/checking design models (TLA+, Alloy, Quint), proving code against contracts (Dafny, Verus, Lean, Rocq), model checking, invariants, liveness, and counterexamples. Helps decide if formal methods fit a design or requirement.
Ships in sdd. 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.
A formal check proves that a model or code satisfies the statement it was given, under the stated assumptions and bounds. It cannot show that the statement is what the user wanted. In the documented failures of verified systems, the cause was a wrong specification, an unstated assumption, or a model that did not match the code. Agents make this gap wider: they prove a given statement well, and they write the statement poorly. In one benchmark, agent-written specifications passed their proofs in almost every run, and only 46 to 61 percent of them said what the issue required.
This skill guides one lifecycle with seven stages. Each stage is an entry point: a job can start at any stage, and it enters only the stages it needs. Every job carries a recorded purpose and a record of four alignment gaps, so that a later session can see what the work is for and what it has established.
sdd or other "spec-driven development" methods.
This skill reads SDD specs when they exist and never replaces them.writing-tests.formal-verification.
Skip the notice when the user asked for the skill by name or slash command; spelling and spacing need not match.
A phrase from this skill's own trigger list is not a name — naming the work is not naming the skill.These rules hold at every stage and for every tool. They exist because each one blocks a failure observed in agent-led verification.
references/checking-and-proving.md.
A rule written in a prompt does not stop an agent that has found a way around it.These instructions admit no exceptions. "This is a quick model" or "I followed the intent" does not license skipping a step. Small jobs stay small because they enter fewer stages, not because a stage gets skipped.
The four alignment gaps. Each stage works on one or more of these, and the report states the status of each.
| Gap | Question |
|---|---|
| user:agent | Does the agent understand what the user wants verified, and why? |
| user:spec | Does the formal statement say what the user's requirements mean? |
| spec:code | Does the thing that was checked or proved match the code that runs? |
| user:code | Does the running code do what the user requires? The report answers this from the other three. |
Purpose. Every job records three things before work starts:
The mode changes only what the report can claim. The procedure is the same in both modes. A find-bugs job reports findings with reproductions and never claims correctness. If the user later asks "so it is correct?", that is a new assurance pass over the existing evidence: re-enter at the report stage in assurance mode and run any step the assurance claim needs that the first pass did not run. Never switch the mode in the middle of a pass.
The verified object. A check or proof is about one of three things, and the report names which:
The alignment file.
One file per verification effort holds the purpose, the requirements trace, approvals, results, and stage history.
It grows by stage: each stage adds only its own section when the job enters it.
See assets/alignment-template.md for the sections and references/alignment-file.md for where it lives and how stages use it.
Run this at every entry, including a return in a new session.
references/alignment-file.md.
If a file exists for this effort, read all of it before anything else.HEAD over its covered paths and the requirement source.
See references/reporting-and-maintenance.md.| Stage | Gaps | Entry check | Reference |
|---|---|---|---|
| 1. Decide | user:agent | User requirements exist, or the user agrees to state them now | references/deciding.md |
| 2. Specify | user:spec | Purpose recorded; tool chosen; requirements listed | references/specifying.md |
| 3. Validate the spec | user:spec | Statement files exist in a freezable layout | references/validating-the-spec.md |
| 4. Check or prove | soundness of the result | Every statement approved, with an approved commit recorded | references/checking-and-proving.md |
| 5. Connect to code | spec:code | A result about a model or translation exists | references/connecting-to-code.md |
| 6. Report | all four | At least one result with saved output | references/reporting-and-maintenance.md |
| 7. Maintain | all four | A prior result exists | references/reporting-and-maintenance.md |
Read the stage's reference before you start the stage. Do not work a stage from memory: each reference holds checks that the table does not.
Stage 5 applies only when the verified object is a model or a translation. For a proof about the shipped code, the proof is the connection; record the remaining trusted gap (compiler, extraction, axioms) in the report and skip to stage 6.
Stages loop. A counterexample often sends the job back to stage 2 or 3. A loop back to a statement change goes through the user (constraint 2) and a new approval (stage 3).
references/tools.md lists, per tool, the commands for vacuity checks, assumption listing, escape hatches, and gates.
Read the row for the chosen tool before stages 3 and 4.
Two steps judge another step's work, and each must run in a fresh context that did not produce that work:
Use a subagent for each when the harness has a subagent-dispatch tool (for example, Agent in Claude Code; substitute the harness's equivalent).
Without one, tell the user and ask them to run the step in a new session.
For long checking or proving runs, advise the user to start a separate session. The alignment file is the handoff between sessions.
The floor in each stage always runs. Offer these as extra depth, recommend based on the cost of failure, and let the user choose:
Record which elective checks ran and which did not.
assets/alignment-template.md (opens in a new tab)references/alignment-file.md (opens in a new tab)references/checking-and-proving.md (opens in a new tab)references/connecting-to-code.md (opens in a new tab)references/deciding.md (opens in a new tab)references/reporting-and-maintenance.md (opens in a new tab)references/specifying.md (opens in a new tab)references/tools.md (opens in a new tab)references/validating-the-spec.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ahgraber/skills --plugin sdd10 skills in this plugin
/sddUse when the user wants any spec-driven development action — exploring before speccing, deriving specs from code or translating specs from another system, proposing a change, applying or implementing, verifying, syncing delta specs, or archiving. Triggers: 'spec this out', 'create a change', 'apply tasks', 'verify implementation', 'sync specs', 'archive change', or any mention of 'specs' or 'sdd'./sdd-applyUse when implementing tasks from a change's tasks.md. Triggers: "apply tasks", "implement the change", "work through tasks", "start implementing", "continue implementing", "apply the change"./sdd-archiveUse when completing and archiving a change after all tasks are done and specs are synced. Triggers: "archive the change", "complete this change", "close out the change", "finish the change", "archive".