agentleFS
jtarorehjtaroreh/agystack/skills/maintain-formal-verification-skill/SKILL.md

maintain-formal-verification-skill

Skill142 starsChanged 9 days agoMITView on GitHub

Bring a project's formal verification back in line with the code after the code changes: find the commits that touched verified code, update the model, harness, or properties to describe the code as it is now, rerun, and say whether each failure is drift in the verification or a bug in the code. Use for /maintain-formal-verification-skill, \"is the model still true to the code\", or after merges and refactors that touched verified code without rechecking it.

47 other projects use a version of this, 42 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use make-bot-ui, setup-pstack and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 10 projects that use this

  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 12 projects that use this

  • AnasX7Skill

    show-me

    Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.

    Also in 4 projects that use this

  • MicrosoftSkill

    review-loop

    Iterative review loop using any lens agent against any target (plan, code, design). Use when you want to run a focused review cycle: spawn a fresh reviewer subagent with a specific lens, present findings and remediation to the user, apply fixes with user guidance, and repeat until clean.

    Also in 3 projects that use this

  • MicrosoftSkill

    council

    Convene the persona panel — six orthogonal review lenses — on a target. Cold independent fan-out, debate-to-consensus, synthesized verdict with recorded dissent and a roster manifest.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 1 is common, 1 is distinctive, and 3 are very specific to this project.

  • 1

    Common

    Most of the 47 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    in sync: No change since the last sync alters what the check describes, and the check passes.

    line 17
  2. Distinctive:

    Run it as it is: Run each check once before editing anything and record the result.

    line 32
  3. Very specific:

    Rerun and judge each result: If the check is a TLA+ model, inspect every result with /statechart.

    line 42
  4. Very specific:

    Write the full maintenance report to the Antigravity Brain Artifact <appDataDir>/brain/<conversation-id>/formal_verification_report.md …

    line 50
  5. Very specific:

    Keep verification updates in their own commit, separate from any product fix.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Maintain a formal verification skill

A formal check proves a property of what it describes. When the code changes and the verification does not, the check can keep passing while describing code that no longer exists. That pass is dangerous because it looks like a proof.

This skill is the upkeep loop for a project-local verify skill generated by /create-formal-verification-skill, or for any project-local skill that runs a model checker, prover, or code-level verifier against named code. The project-local skill handles a change made while using that skill. This skill handles changes that skipped it: merges, direct edits, and drift across many commits.

Outcomes

Assign each check one outcome, and state it directly:

  • in sync. No change since the last sync alters what the check describes, and the check passes.
  • updated. The code changed, the verification now describes the new code, and the check passes.
  • bug. The verification describes the current code, and the code breaks the property. This is a code finding, not drift.
  • blocked. The check could not be brought back in line or could not run. State why.

A check can be both updated and bug: updating the verification makes it describe the current code again, and then the property fails on it.

Edit scope

Edit only verification files: models, harnesses, property files, and the verify skill itself. Never edit product code during a run unless the user asks you to. When a property fails on the current code, do not weaken the property or the model to make it pass. Report the failure.

Pass

  1. Find the checks. A verify skill has no fixed name, so find each project-local skill (such as .agents/skills/verify-*/SKILL.md) that runs a model checker, prover, or verifier against named code. Read every check found, or the one the user named. Collect the property, the covered code, the bounds and assumptions, the run command, and the sync-commit SHA where the verification last matched the code. If no verify skill exists, stop and point to /create-formal-verification-skill. If the skill omits a sync commit, use the last commit that touched the verification files and record that fallback.
  2. Run it as it is. Run each check once before editing anything and record the result. A pass here proves only that the old description holds, not that the code holds. A failure here can be drift or a bug. Defer classification until step 5.
  3. Read every change to covered code. Diff the covered files from the sync commit to HEAD, and read every commit message. Inspect renamed, split, or relocated functions that came from covered code. Inspect new code that writes the same fields or enters the guarded state. Classify each change:
    • No effect. Formatting, comments, or paths outside what the verification models. Verify this against the model or harness, not the commit message alone.
    • The verification no longer describes the code. An indivisible step split into two, a branch changed, a guard moved, a new path reaches the guarded state, or a value's range changed. Update the model or harness.
    • The promise changed on purpose. The change alters intended behavior, backed by doc comments, tests, changelog notes, or commit messages. Update the property and cite that evidence.
    • The promise may be broken. Behavior changed without evidence of intent. Treat any resulting failure as a bug candidate.
  4. Update from the code, not from the result. Update the model or harness so every changed part maps back to code a reviewer can open, preserving indivisible-step fidelity so one indivisible step in code stays one step in verification. Write the update from the code before rerunning, and never shape the model around what makes the check pass. Change a property only when the promise changed on purpose, recording the old wording, new wording, and evidence. Keep existing bounds unless the code change invalidates them; if you must shrink a bound, explain why in the report.
  5. Rerun and judge each result. If the check is a TLA+ model, inspect every result with /statechart.
    • Pass. Prove the updated check can still fail. Introduce a temporary scratch break in the new code targeting what the property guards (such as removing a check or reordering a step), confirm the check catches it, and revert the scratch break.
    • Fail. Replay the counterexample step by step against the real code. If a step is impossible in code, the verification has a modeling error; fix the verification and document what was wrong. If every step is reachable, report a bug: name the introducing commit, state the counterexample as steps in the code's terms, and state the harm in one sentence. Include a non-committed reproduction if one cheaply demonstrates the bug.
  6. Update the verify skill. Update the coverage map (files and functions), commands, bounds, assumptions, and sync-commit SHA to the checked commit. Do not advance the sync commit for a blocked check, and note why. Run the verify skill once end to end as the next agent would to confirm its instructions still execute cleanly.

Report

Write the full maintenance report to the Antigravity Brain Artifact <appDataDir>/brain/<conversation-id>/formal_verification_report.md (ArtifactMetadata with UserFacing: true and RequestFeedback: false). Include for each check:

  • The outcome and the list of commits reviewed.
  • Each change made to the verification and why (code shape changed, or promise changed on purpose with cited evidence).
  • The rerun result and the scratch-break mutation receipt showing the updated check still catches failures.
  • Each code bug in plain words: counterexample steps in the code's terms, harm in one sentence, and introducing commit SHA.
  • Remaining coverage gaps, including new code that touches guarded state but stays unverified.

State explicitly which prior failures were verification drift and which were product bugs. If a check passed before your update and fails afterward, state that the earlier pass held only on a stale description.

Keep verification updates in their own commit, separate from any product fix. In chat, summarize the outcomes and link [formal_verification_report.md](file://<appDataDir>/brain/<conversation-id>/formal_verification_report.md) instead of pasting the full report.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.