cd /news/artificial-intelligence/linear-statechart-notation-state-mac… · home › topics › artificial-intelligence › article
[ARTICLE · art-180913] src=state-machine.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Linear Statechart Notation: State machine modeling for the AI era

A new Linear Statechart Notation keeps statechart diagrams editable as plain XML text by removing free geometry, so AI systems can read and write models as text while people still see a drawing. The notation ships with an interactive browser demo that loads three sample models, including a toaster oven and a PELICAN crossing, plus user-supplied .qmodel files, and syncs a drawing view with the underlying XML so hovering or clicking an element in one view highlights it in the other. Every edit, whether made in the drawing or the XML, is one step of a single Undo/Redo stack, and the demo is read-only on phones.

key takeaway

Statechart models stored as geometry-free XML let an AI read and write them as text while the drawing is regenerated from that text, with drawing and XML edits sharing one Undo/Redo stack.

read3 min views2 publishedDec 3, 2026
Linear Statechart Notation: State machine modeling for the AI era
Image: source

AI Statechart: Linear Statechart Notation (interactive demo)

Linear Statechart Notation: State machine modeling for the AI era

Conventional statechart diagrams tie the behavior to geometry: every box position and arrow route is stored with the model. For an AI that reads and writes models as text, that geometry is noise; for people, it is the essence. The Linear Statechart Notation keeps the drawing and removes the free geometry.

Pick a model from the drop-down box (the toaster oven, the PELICAN crossing, or a test model with every kind of transition), or open your own .qmodel file.

Hover over the drawing: each state or transition lights up, together with its lines in the XML, so you can see exactly which text produces which part of the drawing.

Click an element in the drawing or in the XML, and the other view follows; a selected transition lights the states it exits and the state it enters. Then move it (Up/Down), delete it, or edit the XML: the drawing redraws instantly, and Undo takes back any step.

Open the Quick guide for folding, outline levels, keyboard shortcuts, and all the ways to edit in the drawing.

On a phone the demo is read-only; open this page in a desktop browser to edit models.

Read the drawing

Each state is a row with a red rail; substates are indented under it, with a vertical nesting guide.

Under each state: entry/exit, initial transition (filled ball), history (H or H*) and one row per trigger.

Each transition runs in a vertical lane and ends with an arrowhead on its target's rail. A dot is a junction; a square end means an internal transition. Diamonds are choices.

Explore

Click a row to select it: a state lights its transitions; a transition lights the states it exits and the state it enters.

Click a triangle or diamond to fold. Level buttons (keys 1...9, 0 = all) show the machine down to that depth.

Up/Down move between rows. Actions shows the action code (or its brief: a leading // comment).

Edit in the drawing

Up/Down buttons (Alt+Up/Alt+Down): move a state among its siblings, a transition within its state, a choice segment among its siblings.

Delete (Del): delete a state with its substates (transitions into it become internal), a transition, a choice segment, an entry/exit action or a history.

F2 rename a state or trigger, or edit a guard. t new transition. Tab/Shift+Tab move a state under its previous sibling / out of its superstate.

Drag an arrowhead onto another state's rail to retarget it; drop it elsewhere (or i) to make it internal. Drag a square end onto a rail to attach it.

c adds a choice segment to a square end (a guard, or else).

Shift+H cycles a state's history (none, shallow, deep); drop an arrowhead on an H row, or press h, to enter through history.

Edit the text

Show XML displays the model file: the only copy of the model. Select in either view; the other follows.

Type in the XML: the drawing follows every edit. Changed lines flash; problems are listed below the drawing. Every edit, in the drawing or in the text, is one step of a single Undo/Redo stack (Ctrl+Z/Ctrl+Y).

Open your own .qmodel file from the model list, and Download the edited one.

More

The paper specifies the notation and the QModel file format.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @linear statechart notation 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/linear-statechart-no…] indexed:0 read:3min 2026-12-03 · —