Doc
A document in suggesting mode. People write in place; an agent's edits show up on the blocks they would change.
Installation
It brings the Sheet with it, since a doc can show one. Import both stylesheets, the Doc's after the Sheet's:
Usage
Data
A doc is blocks: one per paragraph, heading, list, quote, code block or table, each holding its own markdown. Every block has a key that never moves, so a model writes /blocks/b3/md, never /blocks/2. Order is a field, sorted when the Doc draws.
Agent
To rewrite a paragraph, the model replaces that block's markdown:
The Doc shows the old words struck through and the new ones beside them, in the block, until a person decides.
A sheet inside
A block of type sheet shows a live Sheet from the same store, and one proposal can change a cell and the paragraph that talks about it. Linking shows how.
API Reference
Doc
| Prop | Type | Description |
|---|---|---|
store | DocStore | The data, from docStore, or a workspace store holding the doc. |
at | string | Where the doc lives in the store, like /docs/plan. Leave it out when the store is the doc. |
docStore
name names the tools (${name}_read, ${name}_propose), about tells the agent what the doc is. Proposals that would break the doc are refused with the reason.