statechart
Skill128 starsChanged 2 days agoMITView on GitHub
Model system states and render native Mermaid state diagrams and failure paths. Use for /statechart or complex state modeling.
Files
Statechart
Model system states, transitions, invariants, and failure modes using native Mermaid state diagrams. Use for complex lifecycle flows, state synchronization, distributed race analysis, or when validating stateful protocol behavior.
Core Modeling Invariants
- Enumerate Explicit States. Distinguish legitimate reachable states from illegitimate or zombie states.
- State Invariants. For each state, define the assertions that must hold true while the system remains in that state.
- Transitions and Triggers. Identify explicit events, timeouts, and inputs that trigger transitions between states.
- Identify Failure and Crash Paths. Model crashes, aborts, and retries at every transition boundary.
- Find Shortest Failure Path. Analyze the shortest sequence of events leading from the initial state to an invalid or unhandled failure state.
Native Mermaid State Diagram Artifacts
Render models directly as native Mermaid stateDiagram-v2 or flowchart TD blocks within Brain Artifacts (<appDataDir>/brain/<conversation-id>/statechart_<slug>.md). Avoid external compilers or heavyweight Java/TLC tooling.
Example Schema
```mermaid
stateDiagram-v2
[*] --> Idle
Idle --> InFlight : dispatch
InFlight --> Verifying : report_received
InFlight --> Stalled : timeout / no_signal
Verifying --> Merged : clean_verdict
Verifying --> FixForward : defect_proven
FixForward --> InFlight : patch_rebased
Stalled --> Terminated : watchdog_kill
Terminated --> [*]
Merged --> [*]
```Verification Checklist
- Are all error transitions terminal or explicitly handled by reconciliation?
- Is there any transition where an illegitimate state can reach steady state?
- Does the shortest failure path have an automated test reproducing it?
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- backnotprop/pstack★ 2.7ksame name
- umararshad4/honey-stack★ 4same name
- fullerzz/agent-skills★ 2same name
- DarthJonathan/guac-skills★ 0same name
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.
- rules/AGENTS.mdAGENTS.md
- agystackSkill
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- deslopSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- loopSkill
- maintain-verification-skillSkill
- no-commentsSkill
- 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-agystackSkill
- 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.
Reviews can't be read right now.
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.

