statechart
Skill2.7k starsChanged 11 days agoMITView on GitHub
Draw how any system moves between states, such as a product flow, a protocol, or a service, as a Mermaid statechart from a TLA+ model. Each bug is a numbered path with blue borders to a state that breaks a rule. Use for /statechart, to show a bug as a path through states, or to turn an agreed chart into a TLA+ skeleton.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Use from-spec when a TLA+ model exists, or when the code or design is concrete enough to model.
- Very specific: line 24
If there is a proposed fix, model it and pass that model as --fixed.
- Very specific: line 31
Run from-chart. If a rule breaks, the agreed chart has a design bug.
- Very specific: line 32
Add the real code's guards and variables to the spec that from-chart wrote, and run from-chart again.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Statechart
The chart shows how a system moves between states, in the words of the person who reads it. The scripts call that person the reader, as in readerActions and reader steps. The reader decides whether the behavior is right. The reader can be a PM who reads a product flow, an engineer who reads a protocol or a service, or a reviewer who reads a design. Label each state with what the reader can observe or cares about, such as "Paying" in an app or "Lease held, write pending" in a lock service. Label each step with the event that moves the system, such as "tap Pay" in an app, "the request reads the count" in a service, or "the lease expires" in a lock service. Keep variable and action names out of labels.
Run node <skill dir>/scripts/statechart.mjs --help for the commands and for how to read a chart. Work in a scratch folder outside the repo. The command writes its files next to its input. The first run installs TLC and Java with mise, which downloads about 305 MB and needs the network. The help's TLC section tells how to use a TLC and Java that you have.
Pick the direction
Use from-spec when a TLA+ model exists, or when the code or design is concrete enough to model. Use from-chart when there is no model, and the people who own the behavior should agree on it before anyone builds or changes it.
If the code already has a TLA+ spec, start from a copy of that spec. Add the variables that the labels and rules need, and keep the spec's existing invariants. To audit the code against that spec, make the copy model what the code does, and pass the spec unchanged as --against. Check it with the config that its authors say it passes, and pass that config as --against-config unless it has the spec's file name. One mapping labels both models, so label states and steps from variables that both have. A label that reads a variable that only the copy has must test "name" in v first, and label the spec's states another way. When a model describes code, tie every variable and action to code that a reviewer can open, and take its name from that code. Make each action one indivisible step in the code. Put the file and line of the code that checks each condition of an action in a comment on that condition, as in \* pay.ts:120.
Spec to chart
- Choose the chart's states. When the reader cares about something that a label would hide, put it in the label, such as "Paying, charged twice" when the screen still says "Paying" after a second charge. Start with few states. Split a state when the split separates two bugs, or when the reader must see a step that leaves the label the same, such as a request that reads a count, because the chart does not draw such a step.
- Write each rule that the reader agrees to as one invariant, with the reader's sentence as its comment. A rule can be about any state in the model: what a screen shows, what a request returns, a stored value, or a message between parts. When the model describes code, the rule also names the code that can change that state. If the model has no variable for what a rule is about, add the variable. Do not drop the rule. For a rule that applies once everything settles, define
Settled == ~ENABLED System, whereSystemis the disjunction of the actions that happen without the reader. For a rule that applies at a narrower point, such as after each request finishes, write a predicate for that point and make the rule hold where it is true. For a goal that the system must be able to reach, write a rule that says the goal never happens, and pass that rule with--expect-broken. The path that breaks it is then a way to the goal. The chart still draws the goal as a state that breaks a rule, andstories.mdtells it as a bug, so name each goal rule in the hand-off. Report each other broken rule as a bug. Never weaken a rule to make the chart pass. - Run
from-spec, then fill in the mapping file it writes. Put the labels instateandstep. When the chart must separate what the reader does from what happens around the reader, list the reader's actions inreaderActionsby action name. Leave the list empty when every action counts the same. When the overview is too large to read, add--cover. The overview then keeps only the shortest path to each settled state, plus every bug path, and the command lists what it leaves out. When two bugs end in the same state for different reasons, addcauseand make it name each reason. To color the states by what the reader cares about, such as "Order shipped", return that group fromgroup. The legend names the groups, and in the PNG a state that breaks a rule is red in place of its group color. - If there is a proposed fix, model it and pass that model as
--fixed. - Render each chart with
--pngand look at every PNG. Check that each numbered path reads in order. If a label reads like code, fixstateorstepand run the command again. - When the model describes code, replay each bug's story against the real code, as a test or a live repro, one step per model action. Drive only entry points that a user, a client, or another part of the system reaches, and assert only what they can observe. A test that asserts a flag that it sets, or that searches the source text, proves nothing. When a run proves part of the story and reading the code proves the rest, say which part each proves. When the test copies code that it cannot import, give the commit and line range of the copy, and list what the copy leaves out. If a bug does not reproduce, assume the model is wrong until you show otherwise. Fix the model, not the rule. For a design with no code yet, the TLC trace is the evidence, and the hand-off must say so.
Chart to spec
- Draw the chart that the reader agrees to. Use one region for each part that changes independently, such as a device's connection and the job that the device runs. Add one
%% neverline per rule, with the reader's sentence. Draw an event that stops or restarts a part, such as "the app closes" or "the process restarts", as an edge to the state that comes next. Runrender CHART.mmdto get a PNG of the chart for the reader. - Run
from-chart. If a rule breaks, the agreed chart has a design bug. Take the bug to the people who agreed to the chart. - Add the real code's guards and variables to the spec that
from-chartwrote, and runfrom-chartagain. For each difference it prints, ask the reader whether the code is wrong or the chart needs a correction.
Hand off
Give the PNG and the Mermaid source of each chart to the person who must decide. Add one line per bug with the rule it breaks, its steps as the chart numbers them, whether it reproduced, and whether the proposed fix fixes it. A broken PROPERTY has no path on the chart, so give the TLC counterexample that stories.md names for it. With --against, also say whether the spec already lists it: in the configs that stories.md names, in the spec's notes on what the model leaves out, or not at all. When the model describes code, do not report that a rule holds while the command lists conditions with no file and line. Take every count you quote from summary.json. Attach stories.md and the command that regenerates everything. Say what the model leaves out.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about backnotprop/pstack
- minhnhatnguyen6297-a11y/systemdocs“feat(skills): added pstack interrogate and tdd as omp project skills”GitHub · Oct 30, 2026
- sudosubin/agents.nix“agent-plugins.github.backnotprop.pstack: 23707a3 → 25abb38”GitHub · Oct 29, 2026
- sudosubin/agents.nix“agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-27 → 0-unstable-2026-10-28”GitHub · Oct 28, 2026
- sudosubin/agents.nix“agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-27 → 0-unstable-2026-10-28”GitHub · Oct 28, 2026
- Djordje-Stojanovic/Sigmaskills“improve: review every pstack skill with the owner for possible Sigma adaptations”GitHub · Oct 27, 2026
The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 49
Talked about on GitHub and the web (49 times).
On GitHub · 45
- Oct 30, 2026feat(skills): added pstack interrogate and tdd as omp project skills — minhnhatnguyen6297-a11y/systemdocs0 reactions
- Oct 29, 2026agent-plugins.github.backnotprop.pstack: 23707a3 → 25abb38 — sudosubin/agents.nix0 reactions
- Oct 28, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-27 → 0-unstable-2026-10-28 — sudosubin/agents.nix0 reactions
- Oct 28, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-27 → 0-unstable-2026-10-28 — sudosubin/agents.nix0 reactions
- Oct 27, 2026improve: review every pstack skill with the owner for possible Sigma adaptations — Djordje-Stojanovic/Sigmaskills0 reactions
40 more on GitHub
- Oct 27, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-26 → 0-unstable-2026-10-27 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-25 → 0-unstable-2026-10-27 — sudosubin/agents.nix0 reactions
- Oct 26, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-25 → 0-unstable-2026-10-26 — sudosubin/agents.nix0 reactions
- Oct 26, 2026audit: Frontend maintainability, skills and documentation before growth — BlinovDev/rc-setup-hub-fe0 reactions
- Oct 26, 2026audit: Backend architecture, code simplification, skills and docs before growth — BlinovDev/rc-setup-hub0 reactions
- Oct 26, 2026explore: TLA+ checks for task claiming and the merge gate with pstack's create-formal-verification-skill — xiechimon/cairn0 reactions · 1 comment
- Oct 26, 2026agent-plugins.github.backnotprop.pstack: 02b59d7 → fad8d01 — sudosubin/agents.nix0 reactions
- Oct 25, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-24 → 0-unstable-2026-10-25 — sudosubin/agents.nix0 reactions
- Oct 25, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-24 → 0-unstable-2026-10-25 — sudosubin/agents.nix0 reactions
- Oct 25, 2026[Candidate] backnotprop/pstack - large collection (61 SKILL.md files) — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 24, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-20 → 0-unstable-2026-10-24 — sudosubin/agents.nix0 reactions
- Oct 24, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-20 → 0-unstable-2026-10-24 — sudosubin/agents.nix0 reactions
- Oct 23, 2026Can afk-loop pin only pstack's two verification skills, and what do they lack for the loop? — knn90/afk-loop0 reactions · 1 comment
- Oct 23, 2026What verification terms and roles does pstack use? — knn90/afk-loop0 reactions · 1 comment
- Oct 21, 2026Notes: analyse backnotprop/pstack (11 notes) — zelengeo/ai-knowledge0 reactions
- Oct 20, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-19 → 0-unstable-2026-10-20 — sudosubin/agents.nix0 reactions
- Oct 20, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-19 → 0-unstable-2026-10-20 — sudosubin/agents.nix0 reactions
- Oct 19, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-15 → 0-unstable-2026-10-19 — sudosubin/agents.nix0 reactions
- Oct 19, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-15 → 0-unstable-2026-10-19 — sudosubin/agents.nix0 reactions
- Oct 17, 2026[P01-general-tech] 調研 pstack — FATESAIKOU/LearnGhAgent0 reactions · 9 comments
- Oct 17, 2026調研 pstack — FATESAIKOU/LearnGhAgent0 reactions
- Oct 15, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-14 → 0-unstable-2026-10-15 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-14 → 0-unstable-2026-10-15 — sudosubin/agents.nix0 reactions
- Oct 14, 2026FinishUP 0.3 relaunch: handoff and remaining work (2026-10-14) — TheGaySupreme123/finishup0 reactions · 3 comments
- Oct 14, 2026agent-plugins.github.backnotprop.pstack: 0-unstable-2026-10-12 → 0-unstable-2026-10-14 — sudosubin/agents.nix0 reactions
- Oct 14, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-10-04 → 0-unstable-2026-10-14 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-plugins.github.backnotprop.pstack: init at 0-unstable-2026-10-12 — sudosubin/agents.nix0 reactions
- Oct 9, 2026idea-loop:docs/design/ 分 tmp / prod,维护产品状态图(页面 / 组件 / 状态 / flow / 动效),设计与验证共用 — guohaonan-shy/harold-skills0 reactions · 2 comments
- Oct 9, 2026Add unslop skill (credit: backnotprop/pstack) — Reybolt/reys-skills0 reactions
- Oct 8, 2026Integrate pstack as a rigor mode for tersio sessions — KurutoDenzeru/tersio0 reactions · 1 comment
- Oct 5, 2026Vendor pstack and run agent work in poteto-mode — 0xboris/invox0 reactions
- Oct 5, 2026Adopt pstack and run agent work in poteto-mode — 0xboris/invox0 reactions
- Oct 5, 2026agent-skills.github.backnotprop.pstack: 0-unstable-2026-09-14 → 0-unstable-2026-10-04 — sudosubin/agents.nix0 reactions
- Oct 2, 2026Add unslop skill from pstack. — seanjennings960/dotfiles0 reactions
- Sep 26, 2026SPEC: Dani-Dex product quality, full-duplex voice, prompt-driven skills and WhatsApp remote control — somdipto/dani-dex0 reactions
- Sep 26, 2026fix(verification): preserve targets across workflow checkpoints — kevinle128/Archon0 reactions
- Sep 25, 2026agent-skills.github.backnotprop.pstack: init at 0-unstable-2026-09-14 — sudosubin/agents.nix0 reactions
- Sep 19, 2026RFC: Agentic Runtime Verification Plane — FAB 5.1 + Wayfinder + CI Fabric — PanagiotisDrakatos/HCE_v33_final_allinone_ready0 reactions · 3 comments
- Aug 31, 2026Write-up: building a toy project with p-stack — dylanferguson/envp0 reactions · 8 comments
- Aug 24, 2026Review unslop: decide invocation mode and trim pattern list — francisko-rezende/skills0 reactions
On the web · 4
- Oct 18, 2026Poteto-Mode คืออะไร ใส่ระเบียบวิศวกรอาวุโสให้ AI เขียนโค้ดได้จริงไหม? — dev.to
- Oct 15, 2026backnotprop/pstack: +595 stars this week | Upstar — upstar.dev
- Sep 22, 2026AI로 구현 속도가 빨라져도 팀은 5배가 되지 않는다. '1인 1PBI' 개발 표준을 진지하게 설계했다|りょう|AI駆動開発 — note.com
- Sep 17, 2026Suhelmangera — linkedin.com
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- fullerzz/agent-skills★ 225% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- poteto-helpSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- setup-pstackSkill
- sharpenSkill
- show-me-your-workSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
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
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.

