Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use for /statechart, or to show a bug as a path through states.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Statechart
The chart shows how a system moves between states, in the words of the person who reads it. That person, the reader, decides whether the behavior is right.
## Run
Work in a scratch folder outside the repo. Write a TLA+ spec and its config. Then run:
```sh
<skill dir>/scripts/statechart SPEC.tla [--config FILE] [--view FILE] [--out DIR]
```
`scripts/statechart.ts` is TypeScript, so run it with a runtime that can execute TypeScript.
The first run installs TLC and Java with mise and needs the network.
## Write the spec
- Write each rule that the reader agrees to as an INVARIANT. A rule can be about a screen, a result, a stored value, or a message. If the model has no variable for a rule, add the variable. Never weaken a rule to make it hold.
- Write `Next` as a disjunction of the actions, such as `YouPressPlay \/ YouPressStop`. If you do not, TLC names every step `Next`.
…
The line at the top of this page pins the label git:20261101.cefdc80, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_w6o2kzqxl2fkqvdn
GET https://markdownregistry.com/api/v1/resolve?ref=painhardcore/pstack/statechart
GET https://markdownregistry.com/api/v1/blob/64e507b62e14ce07982583e27851b78c704fae3f767bfb5be14c45016d397dff
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
painhardcore/pstack · .opencode/skills/architect/SKILL.md · Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use…
painhardcore/pstack · .opencode/skills/arena/SKILL.md · Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for…
painhardcore/pstack · .opencode/skills/benchmark-checklist/SKILL.md · Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened)…
painhardcore/pstack · .opencode/skills/blast-radius/SKILL.md · Find what a change could break somewhere else before it ships, beyond the diff, and prove the one fact it's safe…
painhardcore/pstack · .opencode/skills/correct/SKILL.md · Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types…
painhardcore/pstack · .opencode/skills/create-formal-verification-skill/SKILL.md · Generate a project-local skill that formally verifies the code where a bug costs the most and tests reach the least, in…
painhardcore/pstack · .opencode/skills/create-verification-skill/SKILL.md · Generate a project-local verification skill that drives your app the way a user does — any language, framework, or…
painhardcore/pstack · .opencode/skills/figure-it-out/SKILL.md · Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a…
painhardcore/pstack · .opencode/skills/how/SKILL.md · Explain how a subsystem works, trace a runtime flow, or determine where code and ownership belong before making a…
painhardcore/pstack · .opencode/skills/in-your-own-words/SKILL.md · Restate in your own words what you think the user's goals are and what problem they're trying to solve. Use for…
painhardcore/pstack · .opencode/skills/interrogate/SKILL.md · Use for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find…
cursor/plugins · harness/pstack/claude-code/skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
cursor/plugins · pstack/skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
michael-denyer/pstack-claude · plugins/pstack/skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
backnotprop/pstack · skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
theonlyfusioncube/potetos-for-everyone · skills/statechart/SKILL.md · Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still…
creedants/pstack-t3 · t3/overrides/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
painhardcore/pstack · skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…
creedants/pstack-t3 · skills/statechart/SKILL.md · Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it…