# Phase 3 — Cataloging Desk (plan) Status: **draft — recorded 2026-06-14 (Fritz + Opus). Important.** Not yet scheduled, but flagged high among the forward phases. This is the detailed plan behind the roadmap's "Phase 3 cataloging desk" bullet. ## One-line Add the **write side**: create and edit documents *in markdown source* from the Reading Room — a projection of the broker's write protocol (`mark_publish` / `mark_append`), the same way reads project the read protocol (ADR 0005 decision 11). Markdown in, rendered out. No WYSIWYG, no rich text, no comments. ## Why (the gap) The room is **read-only today**. The library `WorldGateway` port has read verbs only (`Fetch`/`List`/`Versions`/`Lookup`/`Worlds`); there is no write path through the hexagon. The write *protocol* already exists at the broker — this phase is the room's surface onto it, so a human edits a document the same way an agent does, and both pass through the same authz + write gate. ## What the broker already gives us (verified 2026-06-14) - **Writes** use "a long-lived per-world token the broker provisions on first write" (broker `MCPConfig` doc). The write token's op is hardcoded to `["publish"]` (#163) and its `Paths` are world-config globs. - **`mark_publish`** carries metadata OUT OF BAND — `title`, `tags`, `importance` in a `metadata` object; the body is pure markdown. A body that opens with a `---` frontmatter fence is stored as literal content (the recurring publisher bug). `expected_version` is required (0 to create); `on_conflict` defaults to a structural-merge candidate the caller re-verifies. - **`mark_append`** appends to a body and CANNOT carry metadata — tags/importance stay frozen at the doc's last publish; a materially new subject means re-publish with extended tags. - A **write-time gate** enforces tags/importance at the system's chosen severity (warn / block / ask). The desk should satisfy it on the first submit. ## Design decisions (recommendations — settle before building) ### D1. Editor surface — RECOMMEND htmx-pure textarea + live server preview first The room is htmx-hard, no client state (ADR 0003). An editor is the natural place to break that, so be deliberate: - **Recommended:** a plain `