Catalog
Yeachan-Heo/maintain-formal-verification-skill

Yeachan-Heo

maintain-formal-verification-skill

Re-sync an existing formal verification skill after the covered code changed: re-check every assumption, update cited lines, rerun the tool; formally-verified only after a green rerun.

v1.0LATEST
NewUpdated Nov 8, 2026

Maintain Formal Verification Skill

A formal spec that cites lines that no longer exist is stale, and a stale spec's green is worthless. This skill re-syncs an existing verify-formal-* project skill (created by create-formal-verification-skill) to the code it models.

When to use

  • the modeled protocol, arithmetic, or invariant changed shape
  • cited file:line anchors drifted after refactors
  • before trusting a green run that predates recent changes to the covered code

Workflow

  1. Inventory the model's bindings: every cited file:line, every named function, every assumption on the skill's assumption list.
  2. Re-check each binding against current code: does the cited line still contain the modeled step? Does the assumption still hold (pid reuse, atomicity, integer width, timing)? A binding that no longer matches is drift; record it, do not silently absorb it.
  3. Update the model where drift is real: move citations, adjust steps to the new protocol shape, and rewrite the assumption list to match reality. The property itself does not weaken — if the new code violates the property, that is a finding to report, not a model edit.
  4. Rerun the tool (TLC/apalache, lake build, cargo kani) and capture real output.
  5. Update the project skill in place: new citations, new assumption list, same run command — and record the resync through the ledger's locked writer (appendLedgerEntry and defaultLedgerPath from the installed package's dist/features/verification-ledger/index.js; babysit's ledger step demonstrates the exact invocation — never append raw rows): formally-verified with the rerun command as evidence only when the rerun is green; a counterexample during resync records verifier-failed with the counterexample as evidence and is reported before any model change.

Rules

  • A counterexample found during resync is reported before any model change; verify whether the code shares the flaw.
  • Never mark a resync done with an unrerun tool; the rerun is the resync.
  • If more than half the bindings drifted, say so — the model may have been modeling an implementation that no longer exists, and regeneration via create-formal-verification-skill is the honest path.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

82

Quality

84

Clarity

85

Completeness

76

Summary

This skill guides an AI agent to maintain and re-sync an existing formal verification model after the underlying code changes. It provides a structured workflow: inventory the model's bindings (file:line citations, functions, assumptions), re-check each against current code, update the model where drift occurred, rerun the verification tool, and record results in a ledger. The skill emphasizes that formal verification is only valid after a green rerun, and that counterexamples discovered during resync must be reported before any model changes.

Detected Capabilities

read verification model filesread source code filesanalyze code structure and line numbersrun formal verification tools (TLC, Apalache, Kani, lake build, cargo kani)update verification skill metadata and citationswrite ledger entries to tracking systemparse counterexamples and error output

Trigger Keywords

Phrases that agents use to match this skill to user intent.

resync formal verificationupdate verification modelverify after refactorformal verification maintenancererun formal verificationcheck verification assumptionsverify protocol changes

Risk Signals

INFO

Reads and modifies verification skill files and source code

Step 2-3 (re-check bindings, update model)
INFO

Executes formal verification tools (TLC, Apalache, Kani) as subprocess

Step 4 (rerun the tool)
INFO

Writes to verification ledger via installed package methods (appendLedgerEntry)

Step 5 (record resync via ledger)
WARNING

References external ledger API from installed package (verification-ledger/index.js)

Step 5

Referenced Domains

External domains referenced in skill content, detected by static analysis.

github.com

Use Cases

  • Update formal verification specs after code refactors
  • Re-validate formal verification models after protocol changes
  • Reconcile stale file:line citations in verification specs
  • Re-run formal verification tools (TLC, Apalache, Kani) after model drift
  • Audit and document verification state changes in a ledger

Quality Notes

  • Workflow is well-structured and follows a clear 5-step process
  • Rules section explicitly addresses edge cases (counterexamples during resync, drift detection, model regeneration thresholds)
  • Skill properly scopes itself to maintenance of existing specs, not creation — references create-formal-verification-skill for new skills
  • Clear guidance on what 'done' means: green rerun with recorded ledger entry
  • Assumption check emphasis (pid reuse, atomicity, integer width, timing) demonstrates deep domain knowledge
  • Ledger integration reference is specific but assumes availability of installed package methods — could benefit from more detail on error handling if package is missing
  • When-to-use section clearly states the conditions that trigger this skill
  • Assumption list weighting (>50% drift triggers regeneration) provides clear decision boundary
Model: claude-haiku-4-5-20251001Analyzed: Nov 8, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use Yeachan-Heo/maintain-formal-verification-skill in your dev environment

Command Palette

Search for a command to run...