Handbook
Product teams re-glue paste, IME, undo, and AI cards. Agents stream text into a DOM they don’t own. markloom collapses those into one document model with a fixed concept budget.
Most editors pick one of two compromises:
Tiptap / ProseMirror are powerful, but every major feature often pulls a new concept stack (Schema, NodeView, Plugin, Transaction, ResolvedPos…). Complexity grows with the feature list. AI tooling usually sits on top as an overlay, then pastes back — a second history.
The entire worldview, in one sentence:
The document is a list of blocks; blocks hold inline sequences; every change is a reversible Step.
| Layer | Budget |
|---|---|
| Data | Doc · Block · Inline · Mark · Point · Selection |
| Change | Step (insert / delete / replace / splice) |
| Verbs | apply · invert |
New features must compress into Block.type / Mark / Step / attrs.
If they force a new lifecycle or paradigm, they don’t ship.
MD is not a late export. Tree ↔ Markdown is an isomorphic projection (mdast + clean-block spans). Humans and agents can speak Markdown; the document remains a real tree.
apply ∘ invert = identity. Undo, history, and AI discard share one stack.
Stable block ids let agents address structure while paths move.
Stream into real draft blocks; accept commits; discard undoes.
No parallel “AI history.” Headless kernel APIs (appendText, diffById) work without a browser.
Not every ProseMirror superpower is free. Tables are atoms (full grid inside, not free nesting in the prose grammar). Collab is centralized OT with honest limits (see the collab guide). Columns as a separate container type were cut — tables already cover multi-column layouts without breaking the MD linear model.