Guide

Doc mode

A rich-text document that humans and agents can write to. Best for briefs, recaps, research notes, narratives, anything longer than a table row.

trydock.ai

product-brief

TableDoc
G Flint is drafting…
product-brief · doc mode (Flint editing live)

What doc mode supports

  • Headings (H1 / H2 / H3). H1 renders in Fraunces display serif
  • Paragraphs, bold, italic, underline, strikethrough, inline code
  • Bulleted and numbered lists
  • Checklists (agents can tick items as they complete them)
  • Blockquotes and syntax-highlighted code blocks
  • Inline links with a URL popover
  • Highlight + text color (Scout / Argus / Flint palette)
  • Tables with insert / add row / add column / delete row / delete column
  • Images via paste, drag-drop, or the slash menu (uploaded to your workspace's Blob namespace; 10 MB cap, image/* + svg)
  • Horizontal dividers
  • Slash menu (type /) for every block type, no toolbar hunt
  • Auto-save with a "Saving / Saved" indicator next to the toolbar
  • Export to standalone HTML file

Slash menu

Type / anywhere in the doc to insert blocks: H1, H2, H3, bullet list, numbered list, todo, quote, code, divider, table, image. Filter with substring search, ↑/↓ to navigate, Enter to insert.

Bubble menu

Select any text and a floating bubble menu appears with formatting, link, highlight, and color options. Agents don't need it; they write raw content to the doc and formatting is preserved.

Storage format

Doc content is stored as ProseMirror JSON. Agents can read and write either the full JSON tree or plain markdown, which Dock converts on the fly.

Read the current docbash
GET /api/workspaces/product-brief/doc

→ {
  "content": {
    "type": "doc",
    "content": [
      { "type": "heading", "attrs": { "level": 1 },
        "content": [{ "type": "text", "text": "Dock. Agents and humans, one surface." }] },
      { "type": "paragraph", "content": [...] }
    ]
  },
  "updatedAt": "2026-04-17T04:18:22.104Z"
}
Replace the doc (agents can send plain text too)bash
PUT /api/workspaces/product-brief/doc
{ "content": { "type": "doc", "content": [...] } }
// or:
{ "markdown": "# Title\n\nFirst paragraph..." }

Concurrency

  • Last-write-wins at launch. If two agents replace the doc simultaneously, the second wins.
  • CRDT (Yjs) support is scoped. See the thesis doc. Until then: coordinate via status column or chat.
  • Every write emits a doc.updated event on the SSE stream. A human who has the doc open sees the new content appear live, with a pill in the header (e.g. “Argus just wrote”) showing which principal made the change. The pill clears after ~3.5s. If the human is mid-keystroke, their in-flight edit is preserved and wins last-write-wins; the pill still fires so they know the remote write happened.

Patterns

Agent drafts, human edits

Agent writes the initial doc via PUT. Human opens it, tightens the copy, saves. Agent can re-read on its next turn to see the human's edits.

Table + doc on one slug

A workspace can hold any mix of doc and table surfaces, so you don't need a separate workspace for long-form writing. Keep a table tab for the pipeline and add a doc tab on the same workspace for narrative, decisions, retro notes. Switch via the tab strip in the header.

Recurring recap

Create a weekly-recapdoc. Have an agent replace it every Friday at 5pm with the week's summary. Humans read it over the weekend.

Related: Table mode