pstack's /statechart Is Now Stable: Draw State Machines and Run mini TLC to Find Bugs While You're at It
The /statechart skill in pstack v0.15.36 has reached stable. It has a built-in mini TLC compiler that lowers state machines and distributed systems to a small IR and then outputs Mermaid diagrams. Combined with /create-formal-verification-skill, it can model systems abstractly to find bugs. lauren posted a screenshot saying it just found two real bugs. Diagram rendering uses Pele; CSS variables handle theming, and it is 6x smaller and up to 500x faster than Mermaid.js. The community is discussing TLA-ts, state-space explosion, and Windows compatibility.
The /statechart skill in pstack v0.15.36 has reached stable. Drawing state machines is only the surface. Internally it packs a mini TLC compiler: it parses, lowers to a small IR, and then a backend emits mmd syntax. Combined with /create-formal-verification-skill, you can abstractly model state machines and distributed systems to find bugs. lauren said in a tweet that she just used it to find two real bugs. The tweet includes the /statechart skill diagram.
Usage is not complicated. Have the agent generate diagrams in your preferred style, and the skill will suggest using Pele. Pele is a lightweight open-source library from Obsidian that renders Mermaid syntax to SVG, uses CSS variables for theming, so changing colors does not require re-rendering. Official numbers: 230 kB gzipped versus 1.6 MB for Mermaid.js; rendering 0.05 to 0.3 ms versus 6 to 82 ms; zero direct dependencies versus 23; on small screens it adjusts the layout, while Mermaid.js scales the entire diagram. It supports the diagram types built into Mermaid 12.1.0. If you want styles like blueprint or hand-drawn encyclopedia illustrations, you can customize the theme yourself.
Under this tweet, the discussion quickly turned to TLA-ts. TLC is the model checker in the TLA+ ecosystem and used to run on the JVM. Aiden Bai released TLA-ts, a 100% TypeScript replacement for TLC that claims to be 2x faster and able to run in the browser. Some asked how state fingerprints and symmetry reduction are handled; others asked whether the 2x speedup is for large state spaces or for small-spec scenarios like JVM startup. lauren replied that she would look into supporting tla-ts.
Some people also poured cold water. ShadowAguy said the mini TLC compiler is great until state-space explosion comes knocking. Baron asked whether there are POSIX issues on Windows. Marcell asked whether it can be used for bot routines. This feedback is more useful than the launch itself. Formal verification has been hyped for years, and what often blocks people is not TLA+ syntax but the environment friction before running TLC: the JVM, logs, and integration with various agent sandboxes. Putting model checking into a skill makes running a check close to generating a diagram, which lowers the friction by a notch.
Someone in the replies just dropped a video.
Others posted images in support.
Don't rush to replace every flowchart with a state machine. Start by trying it on things like concurrency logic, retries, cancellation, and distributed locks. The tool's value is making model checking convenient to run, not turning everyone into a formal-methods expert. Someone in the replies has already thanked them and posted a screenshot; the rest depends on when Windows and state-space explosion get solved.
发布时间: 2026-10-30 22:49