Repository navigation
feat(pstack): add /create-formal-verification-skill - #709
Merged
Merged
Conversation
Generates a project-local skill that formally verifies one property of the code where a bug costs the most and tests reach the least. The skill picks the verification tool from the question instead of prescribing one.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit feaf2fd. Configure here.
…ings The proof step said everything must pass again after the scratch change is dropped, and to fix the skill or the verification when a step fails. When the current code already breaks the property, that pointed the agent at weakening the check. Accept a baseline that fails only on findings the agent will report, and limit the fix-it fallback to a missed break or a step that does not run.
poteto
marked this pull request as ready for review
October 18, 2026 06:18
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
A test checks the cases that someone thought to write. Races, retries, state machines, parsers, and unsafe code often break on a case that nobody wrote. pstack already has
/create-verification-skill, which proves app behavior with scripted runs. It has no skill that checks a property across every case in a stated scope.What the skill does for you
Call
/create-formal-verification-skillin your repo. If you name an area or a bug, the skill starts there. The skill then does these steps in order:At handoff, the skill tells you what it verified, which tool it used and why, the bounds, what the check found, how to rerun it, and what it does not cover. If the current code breaks the property, you get the counterexample as a short sequence of steps in the code's words. The skill does not weaken the property or the model to get a pass, and it does not change product code unless you ask.
Why the skill stays goal-level
The skill says what a good result looks like. It leaves the choice of tool and model design to the agent, because the right choice depends on the question and the repo. A question about events in a bad order usually suits a model checker over a small model of the design. A question about the code for every input, such as memory safety or overflow, usually suits a verifier that runs on the code. A property that must hold at every size can need a proof. The tool must also be one that the repo's developers can install and run.
One prescribed tool or model shape fits some repos and gives the wrong check in the others. So the skill names the tool families, suggests TLA+ as a common start for concurrent and distributed designs, and asks the agent to explain its choice. What the skill fixes is the bar that every result must meet, whatever the tool:
What changed
pstack/skills/create-formal-verification-skill/SKILL.md. It setsdisable-model-invocation: true, so it runs only when you call it by name.pstack/README.mdand one line inpstack/skills/poteto-help/SKILL.md.harness/pstack/claude-code/.Blast radius
This PR changes only prompt text and docs. No script, runtime code, or existing skill changes.
Verification
node scripts/validate-plugins.mjs,node scripts/check-pstack-docs.mjs, andnode scripts/generate-pstack-harness-trees.mjs --checkpass on the head commit and on a merge with currentmain.pstack/and its copy underharness/pstack/claude-code/are identical.pstack/docs/guidedoes not name the new command yet. Three existing commands get the same note.SKILL.mdon six open-source repos that it never saw:timgit/pg-boss,vercel/swr,brettwooldridge/HikariCP,kubernetes/client-go,DaveGamble/cJSON, andbluss/arrayvec. It compared the skill with an earlier draft that prescribed TLA+ and came with file templates and a worked example. Blinded judges scored each attempt out of 30 on six criteria, such as target choice, tool fit, and checks.Note
Low Risk
Docs and prompt text only; no runtime, scripts, or changes to existing skills.
Reviewed by Cursor Bugbot for commit 3da6ed8. Bugbot is set up for automated code reviews on this repo. Configure here.