Using the playground
The playground is a live editor and graph view — the fastest way to see a ThoughtML document. It runs the exact same parser as the CLI, compiled to WebAssembly, so the two never disagree.
▶ Open the playground → fatin-ishraq.github.io/ThoughtML/playground
No install — it runs entirely in your browser. To run it locally instead, see
Installation: npm run wasm && npm run dev.
The playground is for authoring — live editing and examples. To share a finished document as a single self-contained interactive file (no server, opens anywhere), export it with the standalone viewer:
thoughtml doc.thml --html -o doc.html.
The layout
- Editor (left) — a code editor with ThoughtML syntax highlighting and a lint gutter. Diagnostics appear inline as you type.
- Graph (centre) — the document rendered interactively, in one of two
surfaces:
- Viewer (default) — a time-driven view: reasoning laid out along time
(earlier beliefs left, later right), vertical position emerging from a force
layout, with an as-of bar and replay. This is the same renderer the standalone
--htmlviewer uses. - Structural — the classic node-link graph: foci as nodes (shaped by kind), links as labelled arrows (styled by relation), stances attached to their targets.
- Viewer (default) — a time-driven view: reasoning laid out along time
(earlier beliefs left, later right), vertical position emerging from a force
layout, with an as-of bar and replay. This is the same renderer the standalone
- Detail panel — click any node to see its facts: body, fields, authored numbers, and the mirror’s derived values beside them (never merged).
- Example tray — load any bundled example to explore it.
The mirror is on by default
Unlike the CLI (where readings are opt-in), the playground turns the display-relevant mirror readings on, so you always see:
- derived confidence next to authored confidence,
- argument status on contested nodes,
- the conflict report when your structure disagrees with what you said.
This is why a document can look clean in the editor (no diagnostics) yet show a
conflict — exactly the ship-the-hotfix.thml case.
Lenses
On the Structural surface, a lens recolours the whole graph to foreground one reading:
- Type — colour by record/kind. The default, for reading structure.
- Argument — colour by
in/out/undecided, to see what survives.
Replay (the as-of bar)
For documents with timestamps, the Viewer carries an
as-of bar built into the timeline. Press play (or drag it back) and the
reasoning replays moment by moment: beliefs fade in as of when they were asserted,
and revised-away or abandoned branches dim — so you can watch a conclusion form (or
fall apart) as evidence arrived. Try it on
launch-readiness.thml or
launch-readiness.thml. The same projection is on the
CLI as --as-of.
Note. The playground curates a spine of ten examples and the two lenses above for v0.1.0. The compute and multi-document demos and additional lenses are parked, not deleted — the CLI exposes the full set of readings via flags.