A figure is a fenced code block with the language figure whose body is one JSON object. In AFFiNE it shows as a code block, which is harmless. books/build.mjs turns it into an interactive widget in the OpenSentience theme. Use at most one or two per chapter, and only where stepping or toggling teaches something that prose can't. Every string is plain text (no Markdown inside JSON).
steps: a sequence you step through (Play / Next / Back)
{"type":"steps","title":"One door","steps":[ {"label":"seal check","text":"Is the runtime sealed? A sealed registry holds no authority and refuses with a named reason."}, {"label":"grant","text":"Does the actor hold a grant for this scope?"}, {"label":"receipt","text":"A durable record is written. The only durable objects are receipts."} ]}
Use it for pipelines, protocols and causal chains. 3–9 steps.
ladder: parts placed on the evidence ladder (click one for its note)
{"type":"ladder","title":"Where the substrate stands","items":[ {"name":"TRVM","rung":"live_local","note":"480/480 split runs byte-identical; no speedup claimed."}, {"name":"WRLM","rung":"spec","note":"Build steps 1–2 shipped; 3–10 on paper."} ]}
rung must be one of spec, in_tree, live_local, live_deployed, external.
atlas: the stack map with some parts lit
{"type":"atlas","title":"Where this chapter sits","focus":["wrl","trvm","trvs"]}
Node ids: sites books cloud locu graph wb stud super ampd wek bots amp box pulse prism wrlm wrl trvm trvs floor tr rr park lab ampharness.
compare: two ideas side by side, with a toggle that highlights the difference
{"type":"compare","title":"Why order matters","left":{"title":"Weighted score","points":["Adds benefits and risks","A big upside can buy back a forbidden action"]}, "right":{"title":"Floor, then gradient","points":["Asks feasible, then permitted, then best","A vetoed option scores zero, whatever its upside"]}}
numbers: figures that flip to show their caveat and source
{"type":"numbers","title":"What the measurements say","items":[ {"value":"7.1×","label":"compiled trvm.reduce through Super","caveat":"One-shot 129 ms vs resident 18 ms, median. Not the 439× executor span. Latency only.","source":"wek/b2/trvm/RESIDENT_TIMING.md, 2026-09-23"} ]}
Every number in a numbers figure must carry a caveat and a source. That is the point of the widget.
Video scripts keep the Book 0 format: each slide is a ### Slide N: Title heading, then the on-screen lines, then a > Narration: blockquote. The HTML Present mode turns each one into a 16:9 slide, with the narration in a presenter strip you can hide.