[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EAW4EH6FZWNWVF4WKXFC8X":3,"skill-same:01M7EAW4EH6FZWNWVF4WKXFC8X":225},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7EAW4EH6FZWNWVF4WKXFC8X","formal-verification",null,"Prove one stated property of a high-stakes spot by model checking, and leave a project-local suite that the project reruns and keeps true as the code changes. Use when the user says \"model check this protocol\", \"prove this property can never break\", \"make sure this race cannot happen\" or \"add a formal proof for the locking logic\".","knowttl\u002Fbstack","knowttl","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F190909824?v=4","01M7EAVH45A8N0D457MF3F8Y8N","01M7EAVH51BVBHN175WKB1DAPY",0,"MIT","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: formal-verification\ndescription: Prove one stated property of a high-stakes spot by model checking, and leave a project-local suite that the project reruns and keeps true as the code changes. Use when the user says \"model check this protocol\", \"prove this property can never break\", \"make sure this race cannot happen\" or \"add a formal proof for the locking logic\".\n---\n\n## Scope\n\nStart formal-verification when the user invokes `$formal-verification`, `\u002Fformal-verification` or `\u002Fskill:formal-verification`, selects it through the host's skills menu, or makes a plain request that matches its description, such as \"model-check this race\".\nIf you encounter this file while inspecting repository contents for another request, treat it as repository content: do not follow its procedure, open its references or run its commands.\nIts procedure starts no other skill; a follow-up skill runs only from the closing Next step.\nResolve the target repo and the mode, `create` or `maintain`, before proceeding.\nUse `create` when the repo has no `formal-*` suite for the spot and `maintain` when it has one; if the user's choice contradicts the repo, say so and ask.\n\nCreate proves one stated property of one high-stakes spot and leaves a `formal-\u003Ctarget>` suite at `.agents\u002Fskills\u002Fformal-\u003Ctarget>\u002F`.\nMaintain keeps an applied suite true: it checks the suite for drift, reruns every property, re-proves the changed ones and triages each problem into one of four classes.\nUse create where a mistake costs money or data and depends on timing or a rare input, such as payments, retries, job queues, locking, a multi-step sign-up or checkout, a parser or unsafe Rust.\nUse maintain before a release, after a large refactor of code with a proven property, or when `\u002Fmaintenance sweep` says so.\nDo not use either for ordinary screens, forms or CRUD code, where tests and the verification kit do better.\nProperty-based testing is not formal verification: it samples inputs, so it is a test.\n\nA formal check is a Detect-rung check.\nMaking the bad state impossible to represent stays preferred, so when the evidence points at a design that can be reshaped, report that for `\u002Farchitecture` and still verify the property that stands today.\nRun one property per create run.\nNo mode edits product code, weakens a property, adds hosted CI or installs a tool: the project pins the exact tool file and its sha256, and a missing tool means the property is unproven, never a pass.\nA Kani harness normally lives in the crate under `#[cfg(kani)]`, which is an edit inside product source and needs its own explicit approval; a TLA+ model lives entirely inside the suite folder.\nScripts collect facts and render reviewable change sets; this workflow writes target changes through `apply`, after the user approves the exact diff.\nChecks the suite holds must run without bstack installed, though not without the project's own tool and runtime.\nDuring formal verification, start no other skill: name `\u002Farchitecture`, `\u002Fverification` or `\u002Fmaintenance` as a next step.\n\nState these limits in every report, because the result is easy to read as stronger than it is.\n\n- A pass covers the model or the bound, not the whole system.\n- A TLA+ model stays true to the code only through the coverage gate and review, because no tool connects the model to the code mechanically; a scratch break in the real code does not change the model, so the model checker alone never catches it.\n- The gate notices changes to declared source paths only.\n- Atomicity assumptions, such as an atomic `compareAndSet`, are trusted from documentation and not verified.\n- Whether a fresh agent follows the generated suite correctly is unproven until a model-run evaluation exists.\n- A team without the tool's runtime gets an unproven result, not a pass.\n- Choosing the strongest target is a judgement call that scripts cannot check.\n\n## Create checklist\n\nCopy this checklist and tick a step only when its Done when criterion is met.\n\n- [ ] Step 1: Interview the repo and choose the target\n- [ ] Step 2: State the property and choose the tool\n- [ ] Step 3: Plan the suite\n- [ ] Step 4: Review and apply\n- [ ] Step 5: Run on the current code\n- [ ] Step 6: Prove it can fail\n- [ ] Step 7: Propose the wiring\n- [ ] Step 8: Report\n\n### Step 1: Interview the repo and choose the target\n\nAnswer from the codebase and ask the user only what the repo cannot show: which promise the code makes whose break costs the most, and what the user already knows broke.\nIf the user named an area or a bug, start there; otherwise choose the strongest target in the repo, not the easiest to verify.\nRecord each finding as a file citation in scratch following `schemas\u002Fresearch-report.json`, binding every cited file to the SHA-256 of the exact bytes read with state kind `sha256`, then run `node scripts\u002Fformal-verification.mjs cite-check --repo \u003Ctarget> --report \u003Cfile> --json`.\nOpen each cited source to confirm it supports the claim, because the checker establishes only locations and byte freshness.\nFind the design section that states the behaviour; when the repo has no design document, cite the nearest authoritative statement of it, say so, and name `\u002Farchitecture` as a next step for the user to run.\nUse the [create guide](references\u002Fcreate.md) for the interview questions and the target criteria.\n\nDone when: One target is chosen with citations that `cite-check` resolves, each unanswerable question is asked or named as a blocker, and the design section the property guards is cited.\n\n### Step 2: State the property and choose the tool\n\nState the property in one plain sentence and the harm of breaking it in one plain sentence, in the code's own nouns and without the verification language.\nChoose the tool by the kind of question: whether steps can happen in a bad order suits a model checker over a small model of the design, and whether the code itself behaves for every input within a bound suits a verifier that runs on the code.\nPrefer a tool the project's developers can install and run, and tell the user why you chose it.\nLoad the [tool recipes](references\u002Ftools.md) for the two worked recipes and the tools named as guidance only.\nObtain the user's selection of the property, the harm and the tool.\n\nDone when: The property, its harm and the tool are stated, the tool choice names the kind of question it answers, and the user has selected them.\n\n### Step 3: Plan the suite\n\nWrite the suite plan in scratch following `schemas\u002Fformal-plan.json` and writing its prose by the [writing reference](references\u002Fwriting.md): the pinned tool with its exact file path, sha256 and version, the evidence directory, and for the property its source paths, sync commit, bounds, assumptions, check command, violation diagnostic, model files and transition table.\nThe sync commit is `git rev-parse HEAD` once the source paths have no uncommitted change.\nEvery model step names the one atomic code step it stands for as `path:line`, inside the property's source paths, and says why that step is atomic.\nShow the user the property, its bounds and assumptions, and the transition table before anything is written.\nThe project pins the tool: if the tool file is not already in the project's agreed location, ask the user to put it there and give its sha256; never fetch, install or commit it.\n\nDone when: The plan names a pinned tool file with its sha256, every model step cites one atomic code step, the bounds and assumptions are written down, and the user has selected the plan.\n\n### Step 4: Review and apply\n\nRun `node scripts\u002Fformal-verification.mjs formal scaffold --repo \u003Ctarget> --plan \u003Cfile> --json` to render the change set in scratch.\nIt rejects a model step that cites no atomic code step, cites code outside the property's source paths or cites a line that does not exist.\nPresent its exact diff with `apply --repo \u003Ctarget> --plan \u003Cchange-set> --dry-run --json`, then run the unchanged change set without `--dry-run` only after the user approves those bytes.\nThe change set creates the suite at `.agents\u002Fskills\u002Fformal-\u003Ctarget>\u002F`, a thin `.claude\u002Fskills\u002Fformal-\u003Ctarget>\u002FSKILL.md` pointer and one `AGENTS.md` pointer line, so every host finds the same suite.\nUse `state show` to inspect an interrupted apply, and repeat the unchanged plan to resume.\nNever write suite files directly or bypass a missing command.\n\nDone when: Only the approved change set has been applied, with unchanged hash preconditions and recoverable originals.\n\n### Step 5: Run on the current code\n\nRun `node scripts\u002Fformal-verification.mjs formal check --repo \u003Ctarget> --suite \u003Ctarget-name> --json`, which confirms the suite matches its plan and the pinned tool's sha256, then run the property's check command exactly as the suite shows it.\nWhen the tool file is missing, report the property as unproven and stop; do not substitute another tool or version.\nA property violation on the current code stays a finding: report the counterexample in the code's terms, never weaken the property or the model until it passes, and change no product code unless the user asks.\nA nonzero exit without the violation diagnostic is a modeling error or a harness problem: correct the plan and run `formal scaffold --update`, and do not report it as a finding.\n\nDone when: `formal check` passed, and the property check either passed within its bounds or its violation is recorded as a finding with its counterexample.\n\n### Step 6: Prove it can fail\n\nProve the check can fail in two ways, and restore everything afterwards.\nFirst, run `rule-proof` on the property check with a clean copy and a broken copy of the code and model, expecting the property's violation diagnostic, following the [create guide](references\u002Fcreate.md) for the check plan and the fixtures.\nThen do the walkthrough on a disposable copy of the repo, never the user's working tree: follow the generated suite, break the real code at a declared source path, confirm the coverage gate flags the change, update the model to match the break, confirm the check now fails with the violation diagnostic, then restore the code and the model and confirm the result is back where it started.\nSay plainly that the model checker alone cannot see a code change; what the walkthrough proves is that the gate flags it, the agent updates the model and the check then fails.\nA Kani check runs on the code, so a break in the code is caught directly.\nReport a proof that could not run as unproven.\n\nDone when: `rule-proof` passed with the expected diagnostic or is reported unproven, and the walkthrough shows the gate flagging the break, the check failing on the updated model and the restored result matching the original, or is reported not run with its reason.\n\n### Step 7: Propose the wiring\n\nPropose each upkeep change as a selected edit with its exact diff, and never apply an unselected one.\nWire the property check into the project's one maintained check command, so a failure fails that command: a check slower than about a minute runs only when a change touches its source paths, while the coverage gate always runs.\nIgnore the tool file and the evidence directory in version control so neither enters the suite, and tell the user the one command that gets the tool when the project's own instructions name one.\nAdd no hosted CI workflow unless the user asks, and name `\u002Fverification` for no-mistakes wiring instead of restating it.\nLoad the [create guide](references\u002Fcreate.md) for the wiring and the slower-check condition.\n\nDone when: Each wiring change is a selected edit with its exact diff and its effect timing stated, or the user has declined it.\n\n### Step 8: Report\n\nOptionally read a TLA+ result with `formal chart`, following the [chart guide](references\u002Fchart.md) for local Mermaid output and reader-word labels.\nState the target, the property and its harm in plain words, the tool and why it fits, the bounds and assumptions, what the check found, how to run it, and what it does not cover.\nSeparate applied changes, proof evidence, findings, unproven checks and limitations, and include the honest limits above.\nName `maintain` as the later pass that keeps the suite true, and suggest a second target only when a close one was found.\n\nDone when: The report separates applied changes, proof evidence, findings and limitations, and states what the suite does not cover.\n\n## Maintain checklist\n\nCopy this checklist and tick a step only when its Done when criterion is met.\nMaintain needs an applied suite; without one, run `create`.\nLoad the [maintain guide](references\u002Fmaintain.md) for the passes, triage classes and outcomes.\n\n- [ ] Step M1: Check the suite for drift\n- [ ] Step M2: Read each property's source\n- [ ] Step M3: Rerun every property\n- [ ] Step M4: Triage\n- [ ] Step M5: Correct and re-prove\n- [ ] Step M6: Move the sync commit and report\n\n### Step M1: Check the suite for drift\n\nRun `node scripts\u002Fformal-verification.mjs formal check --repo \u003Ctarget> --suite \u003Ctarget-name> --json`.\nIt compares every suite file, the transition tables, the `AGENTS.md` pointer, each property's source paths, its design citation and the pinned tool's sha256 with what `suite.json` renders and with the repo, and reports one problem per finding.\nIt also reports `source-changed-since-sync` when a property's source paths changed between its sync commit and `HEAD`, which the coverage gate cannot see once the change is on the base branch, and `sync-commit-missing` when the commit is absent or orphaned by a rebase or squash.\nA missing tool is reported as unproven and blocks the passes that need it.\n\nDone when: Every `formal check` problem is recorded for triage, or the check passed.\n\n### Step M2: Read each property's source\n\nWhere the host supports subagents, give each property one read-only reader; otherwise read the properties one at a time.\nEach reader compares one property file and its transition table with the code at its declared source paths and reports disagreements with file and line evidence, without editing or running anything.\nIts input includes the diff since the property's sync commit, from the fallback commit that `formal check` names when the sync commit is absent or orphaned.\nIts checklist includes covered functions that were renamed, split or moved, even outside the declared source paths, and new writers of the state the property guards; give it the repo-wide `git diff -M -C --stat` since the sync commit as the maintain guide describes, because the source-path diff cannot show them.\nAlso re-check each `No-proof-impact: \u003Cid>: \u003Creason>` trailer in the commits since that sync commit against the model and the transition table, as the maintain guide's trailer audit describes; inspect each commit's repo-wide diff and relevant moved functions, helpers and guarded-state writers, including outside declared source paths, before judging whether the edit changes modeled behaviour, bounds or assumptions.\nTouching modeled code alone does not break the claim, and the message is never the evidence.\n\nDone when: Every property has a reader report, or sequential reading covered every property and says so, and every such trailer is recorded as holding or broken with its commit and evidence about modeled behaviour, bounds and assumptions.\n\n### Step M3: Rerun every property\n\nRun each property's check command exactly as the suite shows it, one at a time, and record its exit and whether the violation diagnostic appeared.\nA property that cannot run is reported with the attempted command and the unmet prerequisite, never counted as passing.\n\nDone when: Every property has a recorded result, or a named unmet prerequisite.\n\n### Step M4: Triage\n\nOptionally use `formal chart` and the [chart guide](references\u002Fchart.md) to read a TLA+ counterexample before replaying it against the real code.\nFirst replay each failing property's counterexample against the real code, one step at a time, as the maintain guide's replay describes: a step that cannot happen in the code means model drift or a modeling error, and a trace whose every step can happen is a real bug, for which you name the commit that made the complete failing sequence reachable, searching before sync when necessary.\nThen sort each problem from the earlier steps, including a broken trailer claim, into exactly one class: model drift, modeling error, real bug or harness gap.\nA replayed step impossible both now and at sync (or the fallback commit) is a modeling error even with a violation diagnostic; a step possible then but impossible now is model drift.\nUse an agreed source such as the design section the property cites as the tie-breaker when the replay is unclear, never the code's current behaviour, and ask the user when no agreed source exists.\nA failure that first appears after the Step M5 correction returns here, and a broken trailer claim and a failure from the same commit are separate problems.\nKeep any scratch reproduction of a bug as report evidence, outside product code.\n\nDone when: Every problem has exactly one class and its evidence, and every real bug names its introducing commit, even when it predates sync, and carries a replayed counterexample.\n\n### Step M5: Correct and re-prove\n\nEdit a copy of the suite plan in scratch, run `formal scaffold --repo \u003Ctarget> --plan \u003Cfile> --update --json`, present its exact diff with `apply --dry-run`, and apply the unchanged change set only after the user approves those bytes.\nThen rerun `formal check` and every changed property, and prove each changed property can still fail as Step 6 of the create checklist does.\nReport a real bug with its counterexample and change no product code.\n\nDone when: Only the approved change set has been applied, `formal check` reports no problems other than `source-changed-since-sync` and `sync-commit-missing` and each changed property was re-proved or its failure was triaged in Step M4 as a real bug, or no correction was needed.\n\n### Step M6: Move the sync commit and report\n\nWhen every problem other than `source-changed-since-sync` and `sync-commit-missing` is gone, every changed property is re-proved (a property with a real bug is not) and no check is blocked, propose `git rev-parse HEAD` as the new sync commit and run `formal check --suite \u003Ctarget-name> --sync-commit \u003Csha> --json`.\nOnly when that rerun reports no problems at all, set `syncCommit` on each property in the plan copy, run `formal scaffold --update`, apply the unchanged change set after the user approves those bytes, and run `formal check` once more.\nOtherwise leave the recorded sync commit as it is and say why; the move is never a way to clear drift.\nReport one outcome: clean, changed through a reviewed change set, or blocked.\nA changed report can list an applied correction and a real bug together.\nName the properties rerun, the properties not run and why, whether the sync commit moved, the audited trailers with their commits and evidence about modeled behaviour, bounds and assumptions, the real bugs with their introducing commits even when they predate sync, and every limitation.\nFor a property that passed in Step M3 and fails after a correction, say the old pass was on a stale description.\n\nDone when: The sync commit moved after a passing rerun or is left in place with the reason, and the report states one outcome and separates applied changes, real bugs and limitations.\n\n## Review before apply\n\nKeep plans, change sets, check plans, fixtures and transcripts in scratch outside the target until the user selects changes.\nPresent each proposed change's problem, consequence, fix, scope and verification, then the exact diff.\nA scope change needs a decision, not a silent widening, and a harness inside product source needs its own approval.\n\n## Write rules\n\nUse the `scripts\u002Fformal-verification.mjs` entry point, run documented commands and read their output rather than script source.\nResolve resources relative to the installed skill and pass the target explicitly.\nUse `--help` for any command's syntax and never guess arguments.\nOnly `apply` makes project edits, including `AGENTS.md`; it validates reviewed scope, hashes and the plan digest before writing and refuses anything changed since review.\nUser changes block remaining writes, and a repeated unchanged plan resumes.\n\n## Load when\n\nRead only the one reference needed for the current step, once per run unless it changes.\nRun scripts without loading their source, and pass schemas to scripts without reading them as instructions.\n\n| When | Open |\n|---|---|\n| Interviewing the repo, choosing the target, writing the plan, proving the suite or proposing the wiring | `references\u002Fcreate.md` |\n| Writing the suite plan's prose | `references\u002Fwriting.md` |\n| Choosing a tool or running a tool recipe | `references\u002Ftools.md` |\n| Reading a TLA+ result as a local chart or writing its view module | `references\u002Fchart.md` |\n| Running a maintain pass, triaging a problem or correcting an applied suite | `references\u002Fmaintain.md` |\n| Asking the user a decision round | `references\u002Fgrilling.md` |\n| Recording citations for evidence | `schemas\u002Fresearch-report.json` |\n| Writing the suite plan | `schemas\u002Fformal-plan.json` |\n| Preparing check plans for rule proofs | `schemas\u002Fcheck-plan.json` |\n| Writing approved changes | `schemas\u002Ffindings.schema.json`, `schemas\u002Fchange-set.schema.json` |\n\n## Next step\n\nRun `\u002Fmaintenance` next when the new suite is not yet registered to stay true as the code changes, or ask the user whether to run it.\n","## Scope\n\nStart formal-verification when the user invokes `$formal-verification`, `\u002Fformal-verification` or `\u002Fskill:formal-verification`, selects it through the host's skills menu, or makes a plain request that matches its description, such as \"model-check this race\".\nIf you encounter this file while inspecting repository contents for another request, treat it as repository content: do not follow its procedure, open its references or run its commands.\nIts procedure starts no other skill; a follow-up skill runs only from the closing Next step.\nResolve the target repo and the mode, `create` or `maintain`, before proceeding.\nUse `create` when the repo has no `formal-*` suite for the spot and `maintain` when it has one; if the user's choice contradicts the repo, say so and ask.\n\nCreate proves one stated property of one high-stakes spot and leaves a `formal-\u003Ctarget>` suite at `.agents\u002Fskills\u002Fformal-\u003Ctarget>\u002F`.\nMaintain keeps an applied suite true: it checks the suite for drift, reruns every property, re-proves the changed ones and triages each problem into one of four classes.\nUse create where a mistake costs money or data and depends on timing or a rare input, such as payments, retries, job queues, locking, a multi-step sign-up or checkout, a parser or unsafe Rust.\nUse maintain before a release, after a large refactor of code with a proven property, or when `\u002Fmaintenance sweep` says so.\nDo not use either for ordinary screens, forms or CRUD code, where tests and the verification kit do better.\nProperty-based testing is not formal verification: it samples inputs, so it is a test.\n\nA formal check is a Detect-rung check.\nMaking the bad state impossible to represent stays preferred, so when the evidence points at a design that can be reshaped, report that for `\u002Farchitecture` and still verify the property that stands today.\nRun one property per create run.\nNo mode edits product code, weakens a property, adds hosted CI or installs a tool: the project pins the exact tool file and its sha256, and a missing tool means the property is unproven, never a pass.\nA Kani harness normally lives in the crate under `#[cfg(kani)]`, which is an edit inside product source and needs its own explicit approval; a TLA+ model lives entirely inside the suite folder.\nScripts collect facts and render reviewable change sets; this workflow writes target changes through `apply`, after the user approves the exact diff.\nChecks the suite holds must run without bstack installed, though not without the project's own tool and runtime.\nDuring formal verification, start no other skill: name `\u002Farchitecture`, `\u002Fverification` or `\u002Fmaintenance` as a next step.\n\nState these limits in every report, because the result is easy to read as stronger than it is.\n\n- A pass covers the model or the bound, not the whole system.\n- A TLA+ model stays true to the code only through the coverage gate and review, because no tool connects the model to the code mechanically; a scratch break in the real code does not change the model, so the model checker alone never catches it.\n- The gate notices changes to declared source paths only.\n- Atomicity assumptions, such as an atomic `compareAndSet`, are trusted from documentation and not verified.\n- Whether a fresh agent follows the generated suite correctly is unproven until a model-run evaluation exists.\n- A team without the tool's runtime gets an unproven result, not a pass.\n- Choosing the strongest target is a judgement call that scripts cannot check.\n\n## Create checklist\n\nCopy this checklist and tick a step only when its Done when criterion is met.\n\n- [ ] Step 1: Interview the repo and choose the target\n- [ ] Step 2: State the property and choose the tool\n- [ ] Step 3: Plan the suite\n- [ ] Step 4: Review and apply\n- [ ] Step 5: Run on the current code\n- [ ] Step 6: Prove it can fail\n- [ ] Step 7: Propose the wiring\n- [ ] Step 8: Report\n\n### Step 1: Interview the repo and choose the target\n\nAnswer from the codebase and ask the user only what the repo cannot show: which promise the code makes whose break costs the most, and what the user already knows broke.\nIf the user named an area or a bug, start there; otherwise choose the strongest target in the repo, not the easiest to verify.\nRecord each finding as a file citation in scratch following `schemas\u002Fresearch-report.json`, binding every cited file to the SHA-256 of the exact bytes read with state kind `sha256`, then run `node scripts\u002Fformal-verification.mjs cite-check --repo \u003Ctarget> --report \u003Cfile> --json`.\nOpen each cited source to confirm it supports the claim, because the checker establishes only locations and byte freshness.\nFind the design section that states the behaviour; when the repo has no design document, cite the nearest authoritative statement of it, say so, and name `\u002Farchitecture` as a next step for the user to run.\nUse the [create guide](references\u002Fcreate.md) for the interview questions and the target criteria.\n\nDone when: One target is chosen with citations that `cite-check` resolves, each unanswerable question is asked or named as a blocker, and the design section the property guards is cited.\n\n### Step 2: State the property and choose the tool\n\nState the property in one plain sentence and the harm of breaking it in one plain sentence, in the code's own nouns and without the verification language.\nChoose the tool by the kind of question: whether steps can happen in a bad order suits a model checker over a small model of the design, and whether the code itself behaves for every input within a bound suits a verifier that runs on the code.\nPrefer a tool the project's developers can install and run, and tell the user why you chose it.\nLoad the [tool recipes](references\u002Ftools.md) for the two worked recipes and the tools named as guidance only.\nObtain the user's selection of the property, the harm and the tool.\n\nDone when: The property, its harm and the tool are stated, the tool choice names the kind of question it answers, and the user has selected them.\n\n### Step 3: Plan the suite\n\nWrite the suite plan in scratch following `schemas\u002Fformal-plan.json` and writing its prose by the [writing reference](references\u002Fwriting.md): the pinned tool with its exact file path, sha256 and version, the evidence directory, and for the property its source paths, sync commit, bounds, assumptions, check command, violation diagnostic, model files and transition table.\nThe sync commit is `git rev-parse HEAD` once the source paths have no uncommitted change.\nEvery model step names the one atomic code step it stands for as `path:line`, inside the property's source paths, and says why that step is atomic.\nShow the user the property, its bounds and assumptions, and the transition table before anything is written.\nThe project pins the tool: if the tool file is not already in the project's agreed location, ask the user to put it there and give its sha256; never fetch, install or commit it.\n\nDone when: The plan names a pinned tool file with its sha256, every model step cites one atomic code step, the bounds and assumptions are written down, and the user has selected the plan.\n\n### Step 4: Review and apply\n\nRun `node scripts\u002Fformal-verification.mjs formal scaffold --repo \u003Ctarget> --plan \u003Cfile> --json` to render the change set in scratch.\nIt rejects a model step that cites no atomic code step, cites code outside the property's source paths or cites a line that does not exist.\nPresent its exact diff with `apply --repo \u003Ctarget> --plan \u003Cchange-set> --dry-run --json`, then run the unchanged change set without `--dry-run` only after the user approves those bytes.\nThe change set creates the suite at `.agents\u002Fskills\u002Fformal-\u003Ctarget>\u002F`, a thin `.claude\u002Fskills\u002Fformal-\u003Ctarget>\u002FSKILL.md` pointer and one `AGENTS.md` pointer line, so every host finds the same suite.\nUse `state show` to inspect an interrupted apply, and repeat the unchanged plan to resume.\nNever write suite files directly or bypass a missing command.\n\nDone when: Only the approved change set has been applied, with unchanged hash preconditions and recoverable originals.\n\n### Step 5: Run on the current code\n\nRun `node scripts\u002Fformal-verification.mjs formal check --repo \u003Ctarget> --suite \u003Ctarget-name> --json`, which confirms the suite matches its plan and the pinned tool's sha256, then run the property's check command exactly as the suite shows it.\nWhen the tool file is missing, report the property as unproven and stop; do not substitute another tool or version.\nA property violation on the current code stays a finding: report the counterexample in the code's terms, never weaken the property or the model until it passes, and change no product code unless the user asks.\nA nonzero exit without the violation diagnostic is a modeling error or a harness problem: correct the plan and run `formal scaffold --update`, and do not report it as a finding.\n\nDone when: `formal check` passed, and the property check either passed within its bounds or its violation is recorded as a finding with its counterexample.\n\n### Step 6: Prove it can fail\n\nProve the check can fail in two ways, and restore everything afterwards.\nFirst, run `rule-proof` on the property check with a clean copy and a broken copy of the code and model, expecting the property's violation diagnostic, following the [create guide](references\u002Fcreate.md) for the check plan and the fixtures.\nThen do the walkthrough on a disposable copy of the repo, never the user's working tree: follow the generated suite, break the real code at a declared source path, confirm the coverage gate flags the change, update the model to match the break, confirm the check now fails with the violation diagnostic, then restore the code and the model and confirm the result is back where it started.\nSay plainly that the model checker alone cannot see a code change; what the walkthrough proves is that the gate flags it, the agent updates the model and the check then fails.\nA Kani check runs on the code, so a break in the code is caught directly.\nReport a proof that could not run as unproven.\n\nDone when: `rule-proof` passed with the expected diagnostic or is reported unproven, and the walkthrough shows the gate flagging the break, the check failing on the updated model and the restored result matching the original, or is reported not run with its reason.\n\n### Step 7: Propose the wiring\n\nPropose each upkeep change as a selected edit with its exact diff, and never apply an unselected one.\nWire the property check into the project's one maintained check command, so a failure fails that command: a check slower than about a minute runs only when a change touches its source paths, while the coverage gate always runs.\nIgnore the tool file and the evidence directory in version control so neither enters the suite, and tell the user the one command that gets the tool when the project's own instructions name one.\nAdd no hosted CI workflow unless the user asks, and name `\u002Fverification` for no-mistakes wiring instead of restating it.\nLoad the [create guide](references\u002Fcreate.md) for the wiring and the slower-check condition.\n\nDone when: Each wiring change is a selected edit with its exact diff and its effect timing stated, or the user has declined it.\n\n### Step 8: Report\n\nOptionally read a TLA+ result with `formal chart`, following the [chart guide](references\u002Fchart.md) for local Mermaid output and reader-word labels.\nState the target, the property and its harm in plain words, the tool and why it fits, the bounds and assumptions, what the check found, how to run it, and what it does not cover.\nSeparate applied changes, proof evidence, findings, unproven checks and limitations, and include the honest limits above.\nName `maintain` as the later pass that keeps the suite true, and suggest a second target only when a close one was found.\n\nDone when: The report separates applied changes, proof evidence, findings and limitations, and states what the suite does not cover.\n\n## Maintain checklist\n\nCopy this checklist and tick a step only when its Done when criterion is met.\nMaintain needs an applied suite; without one, run `create`.\nLoad the [maintain guide](references\u002Fmaintain.md) for the passes, triage classes and outcomes.\n\n- [ ] Step M1: Check the suite for drift\n- [ ] Step M2: Read each property's source\n- [ ] Step M3: Rerun every property\n- [ ] Step M4: Triage\n- [ ] Step M5: Correct and re-prove\n- [ ] Step M6: Move the sync commit and report\n\n### Step M1: Check the suite for drift\n\nRun `node scripts\u002Fformal-verification.mjs formal check --repo \u003Ctarget> --suite \u003Ctarget-name> --json`.\nIt compares every suite file, the transition tables, the `AGENTS.md` pointer, each property's source paths, its design citation and the pinned tool's sha256 with what `suite.json` renders and with the repo, and reports one problem per finding.\nIt also reports `source-changed-since-sync` when a property's source paths changed between its sync commit and `HEAD`, which the coverage gate cannot see once the change is on the base branch, and `sync-commit-missing` when the commit is absent or orphaned by a rebase or squash.\nA missing tool is reported as unproven and blocks the passes that need it.\n\nDone when: Every `formal check` problem is recorded for triage, or the check passed.\n\n### Step M2: Read each property's source\n\nWhere the host supports subagents, give each property one read-only reader; otherwise read the properties one at a time.\nEach reader compares one property file and its transition table with the code at its declared source paths and reports disagreements with file and line evidence, without editing or running anything.\nIts input includes the diff since the property's sync commit, from the fallback commit that `formal check` names when the sync commit is absent or orphaned.\nIts checklist includes covered functions that were renamed, split or moved, even outside the declared source paths, and new writers of the state the property guards; give it the repo-wide `git diff -M -C --stat` since the sync commit as the maintain guide describes, because the source-path diff cannot show them.\nAlso re-check each `No-proof-impact: \u003Cid>: \u003Creason>` trailer in the commits since that sync commit against the model and the transition table, as the maintain guide's trailer audit describes; inspect each commit's repo-wide diff and relevant moved functions, helpers and guarded-state writers, including outside declared source paths, before judging whether the edit changes modeled behaviour, bounds or assumptions.\nTouching modeled code alone does not break the claim, and the message is never the evidence.\n\nDone when: Every property has a reader report, or sequential reading covered every property and says so, and every such trailer is recorded as holding or broken with its commit and evidence about modeled behaviour, bounds and assumptions.\n\n### Step M3: Rerun every property\n\nRun each property's check command exactly as the suite shows it, one at a time, and record its exit and whether the violation diagnostic appeared.\nA property that cannot run is reported with the attempted command and the unmet prerequisite, never counted as passing.\n\nDone when: Every property has a recorded result, or a named unmet prerequisite.\n\n### Step M4: Triage\n\nOptionally use `formal chart` and the [chart guide](references\u002Fchart.md) to read a TLA+ counterexample before replaying it against the real code.\nFirst replay each failing property's counterexample against the real code, one step at a time, as the maintain guide's replay describes: a step that cannot happen in the code means model drift or a modeling error, and a trace whose every step can happen is a real bug, for which you name the commit that made the complete failing sequence reachable, searching before sync when necessary.\nThen sort each problem from the earlier steps, including a broken trailer claim, into exactly one class: model drift, modeling error, real bug or harness gap.\nA replayed step impossible both now and at sync (or the fallback commit) is a modeling error even with a violation diagnostic; a step possible then but impossible now is model drift.\nUse an agreed source such as the design section the property cites as the tie-breaker when the replay is unclear, never the code's current behaviour, and ask the user when no agreed source exists.\nA failure that first appears after the Step M5 correction returns here, and a broken trailer claim and a failure from the same commit are separate problems.\nKeep any scratch reproduction of a bug as report evidence, outside product code.\n\nDone when: Every problem has exactly one class and its evidence, and every real bug names its introducing commit, even when it predates sync, and carries a replayed counterexample.\n\n### Step M5: Correct and re-prove\n\nEdit a copy of the suite plan in scratch, run `formal scaffold --repo \u003Ctarget> --plan \u003Cfile> --update --json`, present its exact diff with `apply --dry-run`, and apply the unchanged change set only after the user approves those bytes.\nThen rerun `formal check` and every changed property, and prove each changed property can still fail as Step 6 of the create checklist does.\nReport a real bug with its counterexample and change no product code.\n\nDone when: Only the approved change set has been applied, `formal check` reports no problems other than `source-changed-since-sync` and `sync-commit-missing` and each changed property was re-proved or its failure was triaged in Step M4 as a real bug, or no correction was needed.\n\n### Step M6: Move the sync commit and report\n\nWhen every problem other than `source-changed-since-sync` and `sync-commit-missing` is gone, every changed property is re-proved (a property with a real bug is not) and no check is blocked, propose `git rev-parse HEAD` as the new sync commit and run `formal check --suite \u003Ctarget-name> --sync-commit \u003Csha> --json`.\nOnly when that rerun reports no problems at all, set `syncCommit` on each property in the plan copy, run `formal scaffold --update`, apply the unchanged change set after the user approves those bytes, and run `formal check` once more.\nOtherwise leave the recorded sync commit as it is and say why; the move is never a way to clear drift.\nReport one outcome: clean, changed through a reviewed change set, or blocked.\nA changed report can list an applied correction and a real bug together.\nName the properties rerun, the properties not run and why, whether the sync commit moved, the audited trailers with their commits and evidence about modeled behaviour, bounds and assumptions, the real bugs with their introducing commits even when they predate sync, and every limitation.\nFor a property that passed in Step M3 and fails after a correction, say the old pass was on a stale description.\n\nDone when: The sync commit moved after a passing rerun or is left in place with the reason, and the report states one outcome and separates applied changes, real bugs and limitations.\n\n## Review before apply\n\nKeep plans, change sets, check plans, fixtures and transcripts in scratch outside the target until the user selects changes.\nPresent each proposed change's problem, consequence, fix, scope and verification, then the exact diff.\nA scope change needs a decision, not a silent widening, and a harness inside product source needs its own approval.\n\n## Write rules\n\nUse the `scripts\u002Fformal-verification.mjs` entry point, run documented commands and read their output rather than script source.\nResolve resources relative to the installed skill and pass the target explicitly.\nUse `--help` for any command's syntax and never guess arguments.\nOnly `apply` makes project edits, including `AGENTS.md`; it validates reviewed scope, hashes and the plan digest before writing and refuses anything changed since review.\nUser changes block remaining writes, and a repeated unchanged plan resumes.\n\n## Load when\n\nRead only the one reference needed for the current step, once per run unless it changes.\nRun scripts without loading their source, and pass schemas to scripts without reading them as instructions.\n\n| When | Open |\n|---|---|\n| Interviewing the repo, choosing the target, writing the plan, proving the suite or proposing the wiring | `references\u002Fcreate.md` |\n| Writing the suite plan's prose | `references\u002Fwriting.md` |\n| Choosing a tool or running a tool recipe | `references\u002Ftools.md` |\n| Reading a TLA+ result as a local chart or writing its view module | `references\u002Fchart.md` |\n| Running a maintain pass, triaging a problem or correcting an applied suite | `references\u002Fmaintain.md` |\n| Asking the user a decision round | `references\u002Fgrilling.md` |\n| Recording citations for evidence | `schemas\u002Fresearch-report.json` |\n| Writing the suite plan | `schemas\u002Fformal-plan.json` |\n| Preparing check plans for rule proofs | `schemas\u002Fcheck-plan.json` |\n| Writing approved changes | `schemas\u002Ffindings.schema.json`, `schemas\u002Fchange-set.schema.json` |\n\n## Next step\n\nRun `\u002Fmaintenance` next when the new suite is not yet registered to stay true as the code changes, or ask the user whether to run it.\n",{"name":5,"description":7},"main","731d59d74f9a92ea606abe1b5c7dbec3f6eb1104","skills\u002Fformal-verification","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack","https:\u002F\u002Fgithub.com\u002Fknowttl","2026-11-15 07:36:30",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add knowttl\u002Fbstack --skill formal-verification",{"tool":35,"command":36},"bunx","bunx skills add knowttl\u002Fbstack --skill formal-verification",{"tool":38,"command":39},"pnpm","pnpm dlx skills add knowttl\u002Fbstack --skill formal-verification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002FSKILL.md",true,[43,49,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147,151,155,159,163,167,173,177,181,185,189,193,197,201,205,209,213,217,221],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"agents\u002Fopenai.yaml","REFERENCE","参考文档",42,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fagents\u002Fopenai.yaml",{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fmap-coverage.mjs","SCRIPT","脚本",5409,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fassets\u002Fmap-coverage.mjs",{"path":56,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fchart.md",4889,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Fchart.md",{"path":60,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fcreate.md",10333,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Fcreate.md",{"path":64,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fgrilling.md",2746,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Fgrilling.md",{"path":68,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fmaintain.md",13637,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Fmaintain.md",{"path":72,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Ftools.md",7102,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Ftools.md",{"path":76,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fwriting.md",3785,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Freferences\u002Fwriting.md",{"path":80,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":81,"sourceHtmlUrl":82},"schemas\u002Fchange-set.schema.json",2411,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fchange-set.schema.json",{"path":84,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":85,"sourceHtmlUrl":86},"schemas\u002Fcheck-plan.json",2837,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fcheck-plan.json",{"path":88,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":89,"sourceHtmlUrl":90},"schemas\u002Fevidence.schema.json",4012,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fevidence.schema.json",{"path":92,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":93,"sourceHtmlUrl":94},"schemas\u002Ffindings.schema.json",6374,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Ffindings.schema.json",{"path":96,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":97,"sourceHtmlUrl":98},"schemas\u002Fformal-plan.json",3978,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fformal-plan.json",{"path":100,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":101,"sourceHtmlUrl":102},"schemas\u002Fresearch-report.json",2353,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fresearch-report.json",{"path":104,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":105,"sourceHtmlUrl":106},"schemas\u002Fresume-state.schema.json",1603,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fschemas\u002Fresume-state.schema.json",{"path":108,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fformal-verification.mjs",197201,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fformal-verification.mjs",{"path":112,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":113,"sourceHtmlUrl":114},"scripts\u002Fstatechart\u002Fbackends\u002Fcfg.ts",1230,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fbackends\u002Fcfg.ts",{"path":116,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fstatechart\u002Fbackends\u002Fmermaid.ts",7437,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fbackends\u002Fmermaid.ts",{"path":120,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":121,"sourceHtmlUrl":122},"scripts\u002Fstatechart\u002Fbackends\u002Fplain-text.ts",2343,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fbackends\u002Fplain-text.ts",{"path":124,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":125,"sourceHtmlUrl":126},"scripts\u002Fstatechart\u002Fbackends\u002Freport.ts",7060,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fbackends\u002Freport.ts",{"path":128,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":129,"sourceHtmlUrl":130},"scripts\u002Fstatechart\u002Ffrontends\u002Fconfig.ts",10698,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fconfig.ts",{"path":132,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":133,"sourceHtmlUrl":134},"scripts\u002Fstatechart\u002Ffrontends\u002Fdot.ts",2484,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fdot.ts",{"path":136,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":137,"sourceHtmlUrl":138},"scripts\u002Fstatechart\u002Ffrontends\u002Fmarks.ts",3257,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fmarks.ts",{"path":140,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":141,"sourceHtmlUrl":142},"scripts\u002Fstatechart\u002Ffrontends\u002Fmessages.ts",1842,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fmessages.ts",{"path":144,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":145,"sourceHtmlUrl":146},"scripts\u002Fstatechart\u002Ffrontends\u002Fspec.ts",4198,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fspec.ts",{"path":148,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":149,"sourceHtmlUrl":150},"scripts\u002Fstatechart\u002Ffrontends\u002Ftrace.ts",988,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Ftrace.ts",{"path":152,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":153,"sourceHtmlUrl":154},"scripts\u002Fstatechart\u002Ffrontends\u002Fvalue.ts",4757,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fvalue.ts",{"path":156,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":157,"sourceHtmlUrl":158},"scripts\u002Fstatechart\u002Ffrontends\u002Fverdict.ts",1756,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fverdict.ts",{"path":160,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":161,"sourceHtmlUrl":162},"scripts\u002Fstatechart\u002Ffrontends\u002Fview.ts",4354,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Ffrontends\u002Fview.ts",{"path":164,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":165,"sourceHtmlUrl":166},"scripts\u002Fstatechart\u002Fir.ts",15141,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fir.ts",{"path":168,"resourceType":169,"resourceTypeDesc":170,"sizeBytes":171,"sourceHtmlUrl":172},"scripts\u002Fstatechart\u002FLICENSE","LICENSE","许可证",1067,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002FLICENSE",{"path":174,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":175,"sourceHtmlUrl":176},"scripts\u002Fstatechart\u002Fpasses\u002Fannotate.ts",3738,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Fannotate.ts",{"path":178,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":179,"sourceHtmlUrl":180},"scripts\u002Fstatechart\u002Fpasses\u002Flabel.ts",8555,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Flabel.ts",{"path":182,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":183,"sourceHtmlUrl":184},"scripts\u002Fstatechart\u002Fpasses\u002Flift.ts",2888,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Flift.ts",{"path":186,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":187,"sourceHtmlUrl":188},"scripts\u002Fstatechart\u002Fpasses\u002Floop-check.ts",2149,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Floop-check.ts",{"path":190,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":191,"sourceHtmlUrl":192},"scripts\u002Fstatechart\u002Fpasses\u002Fpaths.ts",1900,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Fpaths.ts",{"path":194,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":195,"sourceHtmlUrl":196},"scripts\u002Fstatechart\u002Fpasses\u002Freach.ts",4063,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Freach.ts",{"path":198,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":199,"sourceHtmlUrl":200},"scripts\u002Fstatechart\u002Fpasses\u002Fregion-check.ts",3525,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Fregion-check.ts",{"path":202,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":203,"sourceHtmlUrl":204},"scripts\u002Fstatechart\u002Fpasses\u002Fregions.ts",9475,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpasses\u002Fregions.ts",{"path":206,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":207,"sourceHtmlUrl":208},"scripts\u002Fstatechart\u002Fpipeline.ts",2931,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fpipeline.ts",{"path":210,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":211,"sourceHtmlUrl":212},"scripts\u002Fstatechart\u002Frun.ts",17319,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Frun.ts",{"path":214,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":215,"sourceHtmlUrl":216},"scripts\u002Fstatechart\u002Fstatechart",991,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fstatechart",{"path":218,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":219,"sourceHtmlUrl":220},"scripts\u002Fstatechart\u002Fstatechart.ts",6044,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fstatechart.ts",{"path":222,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":223,"sourceHtmlUrl":224},"scripts\u002Fstatechart\u002Fworker.ts",1095,"https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fskills\u002Fformal-verification\u002Fscripts\u002Fstatechart\u002Fworker.ts",[226,233,240,247,254,261],{"skillNo":227,"name":228,"nameZh":6,"description":229,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":230,"categories":231,"keywords":232,"publishedAt":18},"01M7EB391NDZSYCJ9CTJ3VNC1S","vision","Draft and stress-test a VISION.md for a repository, then iterate with the author on an interactive review board until approved. Use on \u002Fvision or when asked to create or refine a project vision.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fvision\u002Fskills\u002Fvision\u002FSKILL.md",[],[],{"skillNo":234,"name":235,"nameZh":6,"description":236,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":237,"categories":238,"keywords":239,"publishedAt":18},"01M7EB35262G99XXG48461E4FC","principle-sequence-verifiable-units","Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fpstack\u002Fpstack\u002Fskills\u002Fprinciple-sequence-verifiable-units\u002FSKILL.md",[],[],{"skillNo":241,"name":242,"nameZh":6,"description":243,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":244,"categories":245,"keywords":246,"publishedAt":18},"01M7EB31DJX4XRXAXES3G6XMPR","principle-separate-before-serializing-shared-state","Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fpstack\u002Fpstack\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[],[],{"skillNo":248,"name":249,"nameZh":6,"description":250,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":251,"categories":252,"keywords":253,"publishedAt":18},"01M7EB2YZQCT7EKH3MK9YRT47J","principle-model-the-domain","Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fpstack\u002Fpstack\u002Fskills\u002Fprinciple-model-the-domain\u002FSKILL.md",[],[],{"skillNo":255,"name":256,"nameZh":6,"description":257,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":258,"categories":259,"keywords":260,"publishedAt":18},"01M7EB2SRZBFMDPVFXHSMFY0QS","principle-minimize-reader-load","Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fpstack\u002Fpstack\u002Fskills\u002Fprinciple-minimize-reader-load\u002FSKILL.md",[],[],{"skillNo":262,"name":263,"nameZh":6,"description":264,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":265,"categories":266,"keywords":267,"publishedAt":18},"01M7EB2PG2M04BXCN1JD77SVGC","principle-encode-lessons-in-structure","Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.","https:\u002F\u002Fgithub.com\u002Fknowttl\u002Fbstack\u002Fblob\u002Fmain\u002Fupstream\u002Fpstack\u002Fpstack\u002Fskills\u002Fprinciple-encode-lessons-in-structure\u002FSKILL.md",[],[]]