---
title: "Introducing Docs: collaborative files that save as commits"
summary: "A member-only editor for the mind’s repositories, with live collaboration, text comments and durable git history."
created: "2026-11-15"
updated: "2026-11-16"
revision: "2"
previous: "49aaf82b37cffe2c96eadeca9808a2feaddc8f70"
reviewedThrough: "5c10ea7ea0c957fc4dd594e85b009495b50f01aa"
sourceDigest: "50229ad7e65245181086a58c9715357bad47a13c47572ccc64524d8ebd52a377"
---

With this, your mind can let its members write the same document together and keep the result as a file in git. There is no separate knowledge base to reconcile later: the sidebar is a repository’s file tree, and editing changes that repository. In the config repository that can publish the mind itself, which is why the member boundary matters.

## Wire existing editor parts to the repo

`apps/docs/public/app.js` uses the UI kit’s `DocEditor`, `DocTree`, `DocListPanel` and `DocSession`. It chooses the repo and file from the URL, reads the initial text, and opens a live editing session. With no file selected it lists documents and offers a new one. `?mode=comment` offers a comment-oriented view, not an authorization mechanism: every viewer is still a member with the mind’s normal rights.

```ts
case "docs":
  return docs.open?.(request) ||
    this.auth.require(request) || docs.fetch(request, this);
// In the guarded host:
if (url.pathname === "/itx") return host.auth.itx(request);
```

The page reaches the mind through a same-host WebSocket authenticated by the platform. `apps/docs/app.ts` serves the files and a `/processors.json` answer containing the processors module path and a hash of its source. The processors live in `apps/docs/processors/`: root and document folding, collaborative frames, anchoring, merging and comments, exported through `classes.ts`. Hashing the processor source gives an editing session a versioned implementation. An unrelated content commit should not restart all processors.

## Commits are the storage contract

Live collaboration produces durable document events and saves the resulting text as repo commits. That gives ordinary git history instead of an opaque editor database as the only record. Preserve the editor’s merge and anchor logic; replacing it with last-write-wins autosave would lose simultaneous edits or detach comments. The UI should explain when a file cannot be edited, including missing dependencies or non-text content, rather than silently switching storage systems.

## Rebuilding without opening the repo to visitors

The host, HTML, public assets and processor folder are the implementation unit; the UI kit and the collaborative-editor packages listed in the local package manifest are its dependencies. Use the pinned versions together and test two concurrent member tabs, comments, reloads, merges and a save after the repo tip moved. No external service account is required merely to edit the mind’s repos. Keep the socket and every processor action behind member authentication; publicly serving a manifest or icon must not accidentally include repository files. The [Dash](/introducing/dash) offers the wider repo view, while [the blog](/introducing/blog) deliberately publishes only reviewed descriptions rather than these private documents.
