/jstack:statechartfrom jstack
Check a finite TLA+ model and explain its paths and rule failures as a statechart.
Ships in jstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill when explicitly asked to model-check a stateful flow, draw its statechart, or create or maintain a project-local formal check. A model result describes the supplied model and bounds. Establish a separate connection to product behavior before making a claim about the implementation.
Work in a scratch directory unless the project already owns the model. Write a finite SPEC.tla and a TLC config that names the intended invariants and properties. Use the public launcher from this skill directory:
scripts/statechart SPEC.tla --config SPEC.cfg --view view.mjs --out NEW_OUTPUT_DIR --timeout-ms 60000
--config defaults to the adjacent SPEC.cfg; --view is optional; --out defaults to SPEC-chart and must be new or empty. The deadline defaults to 60,000 ms and can be raised to at most 600,000 ms. Run scripts/statechart --help, --capabilities, and --doctor for the installed command's exact contract. The launcher supports POSIX systems with Node 22.18+ or 23.6+, Bun 1.1.5+, or Deno 2+. Java 11+ and the pinned TLC jar are prerequisites. Follow setup when they are missing; the check does not install dependencies.
Stdout is one JSON receipt with kind: formal-model-check and status: PASS | FAIL | INCONCLUSIVE. Exit 0 means a complete, nonvacuous model pass; exit 1 means a complete check found a broken rule; exit 2 means an incomplete check, including unchecked rules even when another rule broke. Handled signals return 130 or 143. Completed checks save receipt.json in the output directory with report.md, TLC traces, and chart.mmd when a chart is available. Startup errors, timeouts, and interruptions emit an inconclusive receipt on stdout without an output directory, so capture stdout. The receipt identifies input hashes, tools, limits, rules, and check state.
Read every rule outcome and the report before concluding anything. A PASS is bounded model evidence. A FAIL is a model counterexample to replay against real code. An INCONCLUSIVE result supports no pass claim. Share chart.mmd as Mermaid text when available, with the rule, the shortest reported path, assumptions, bounds, and omitted behavior. The chart is a local artifact; rendering and uploading are separate choices.
UPSTREAM.json (opens in a new tab)agents/openai.yaml (opens in a new tab)references/formal-authoring.md (opens in a new tab)references/formal-maintenance.md (opens in a new tab)references/render.md (opens in a new tab)references/setup.md (opens in a new tab)scripts/backends/cfg.ts (opens in a new tab)scripts/backends/mermaid.ts (opens in a new tab)scripts/backends/plain-text.ts (opens in a new tab)scripts/backends/report.ts (opens in a new tab)scripts/frontends/config.ts (opens in a new tab)scripts/frontends/dot.ts (opens in a new tab)scripts/frontends/marks.ts (opens in a new tab)scripts/frontends/messages.ts (opens in a new tab)scripts/frontends/spec.ts (opens in a new tab)scripts/frontends/trace.ts (opens in a new tab)scripts/frontends/value.ts (opens in a new tab)scripts/frontends/verdict.ts (opens in a new tab)scripts/frontends/view.ts (opens in a new tab)scripts/ir.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gutierrezje/jstack --plugin jstackOther plugins' skills for the same job
33 skills in this plugin
/architectUse when asked to design module boundaries, types, or interfaces before implementation./arenaUse when asked to compare parallel candidate implementations or designs and combine the strongest results./automate-meCreate or revise a personal mode skill when asked to capture working preferences as agent instructions./babysit-prBabysit a PR to ready: review, repairs, CI, and a current-head verdict. Merging belongs to ship.