§00 / Manifest pre-implementation

The editor for products where AI agents are co‑authors, not assistants.

weaver is a TypeScript Notion-style block editor with first-class CRDT collaboration — for humans, and for agents. Loro under the hood. Local-first, OPFS-persisted, edge-native on Cloudflare. Server-enforced access control with cryptographic attribution on every op.

§01 / Tenets in prose

What we mean by "first-class."

  1. §01.01

    An agent is a peer, not an API client.

    It holds its own capability token. It opens its own WebSocket. Its edits land as Loro ops with origin: agent-N. Cursor, presence, undo scope — same primitives as a human.

  2. §01.02

    The CRDT is the document.

    No parallel editor state. No bridge to keep in sync. History runs through Loro's peer-scoped UndoManager. Forks, snapshots, time travel — built in.

  3. §01.03

    Every edit is cryptographically attributable.

    Origin is server-rewritten to the authenticated subject. The audit log is hash-chained on R2. A regulator asks "who did this," there's a one-line answer.

  4. §01.04

    Trust your own server. Scope your users' data.

    weaver is for orgs that run their own sync — cooperative users on a trusted backend, not zero-trust insider defense. Access control is per-tier data scoping at the sync surface. Audit-grade attribution carries the compliance load.

  5. §01.05

    Confidentiality is a sync surface, not a CSS class.

    Tiered content lives in separate LoroDocs. Restricted streams literally never reach unauthorized peers. No op-level redaction; no fragile filter that one bug can break.

  6. §01.06

    The core has no React, no DOM.

    Headless by construction. React renders chrome. The editing surface is imperative DOM patched from Loro diff events. The pattern every serious editor arrives at the hard way.

§02 / Decisions on file

Eighteen decisions. Four ADRs. Read them.

D1

LoroDoc is the single source of truth

No parallel editor state. History runs through Loro's peer-scoped UndoManager. Time travel and forks are first-class.

D6

Loro as the CRDT core

Rust-native, WASM build, native rich-text marks, peer-scoped undo. Same engine in browser and Durable Object.

D9

AI agents are CRDT peers

Token streams become Loro inserts. Presence, cursors, undo origin, scoped grants — same primitives as humans.

D7

Subdoc partitioning for tiers

Confidentiality tiers as separate LoroDocs. Restricted updates never reach the wire of unauthorized clients. Org-level data scoping done right.

D11

Cloudflare DO per document

Stateful WebSocket hub with hibernation. R2 for snapshots. D1 for ACL. KV for revocations.

D19

Trust the server you run

Cooperative-org trust model. Access control is data scoping, not zero-trust insider defense. Audit-grade attribution carries the compliance load.

§03 / Positioning

Other editors miss one of three things. weaver is built around all three.

Today's serious rich-text editor options force a trade-off where one of these is always missing. weaver fills the gap — open-source, in TypeScript, deployable on the org's own Cloudflare edge.

Editor AI agents as CRDT peers CRDT as document model Local-first by default
Lexical
ProseMirror + Y.js
Tiptap + Hocuspocus partial
BlockSuite / AFFiNE
weaver
§04 / Read on

Pre-implementation. The specs are the contract.