impossible → unrepresentable
fsl is a tiny DSL for JavaScript and TypeScript. Draw your program as a graph of states and arrows; the parser emits JSON, jssm runs it, and every move not on the picture is refused.
Write the picture
An fsl file is the graph you'd draw. States, arrows, named actions. The compiler reads what you wrote, not what you meant.
Bad moves stop at the door
If there's no edge from `at` to where you want to go, jssm refuses — when the graph is loaded, and again at runtime.
Always exactly one
`m.state()` returns a single declared state. No nullable enum, no half-loaded transition. Render off it without defensive code.
One package. No runtime, no codegen.
jssm ships as one library. Write your graph inline as a tagged template — sm`...` — or keep long graphs in a .fsl file. No codegen, no build step.
Drive a real machine.
Each example is a real jssm machine, written inline as a tagged template. Send events to the running machine; rejected events show what jssm refuses when the graph is loaded.
A linear cycle. red → green → yellow → red, on a single shared verb.
View full recipe →Five ideas. That's the main language.
fsl is small on purpose. Read these five pages and you'll know enough to ship a machine in production.
Errors that point at the bug.
Diagnostics are written for the engineer who has to fix them. Name the problem, point at the location, suggest the next move.
Talk it through on Discord.
Questions, design feedback, machines you've built. The fsl & jssm server is the one place to find the people working on this.