A node per annotated Wikipedia article, created with its first annotation
under one container: a section of the library root flagged articles. It is
not a document (sections() and documents() skip it, it has no slug), its
nodes never go stale, the link scanner, the vector index, the title index
and the backlinks index leave it out, and a prompt about an annotation
carries its article's node rather than the whole container.
An annotation is an ordinary note under the article's node whose anchor is
a WikiAnchor (headings, exact words, context either side, revision) instead
of CRDT cursors. reanchor() finds it again in a later revision: its own
section, then anywhere, exactly, then tolerantly, never inside other words;
otherwise it is detached. Two replicas annotating a new article at once keep
both nodes; readers take annotations from all of them and write under the
first, so they read as one. The new fields hash only when set, so old
commits still verify. Property tests for re-anchoring, a convergence test,
and the tasks that write a note from an article's lead and section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab