rabbithole
AGENTS.md315 starsChanged 3 months agoMITView on GitHub
If you were sent here to install Rabbithole for a user, stop — you don't need to clone or build anything. Follow the Quick start in README.md (one claude mcp add / codex mcp add line). This file is for agents developing the repo. An MCP server (stdio) that opens a branching-document canvas in the browser. Plain ES modules, a small esbuild-based browser build, and script-driven tests. - bin/mcp-server.js — entry; just imports src/node/mcp/server.js - src/core/ — host-independent document engine,…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
If you were sent here to install Rabbithole for a user, stop — you don't need to clone or build anything.
- Very specific: line 48
Put every product-owned SVG icon or brand mark in src/core/html/icons.js and render it with iconSvg().
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Notes for agents working in this repo
If you were sent here to install Rabbithole for a user, stop — you don't
need to clone or build anything. Follow the Quick start in README.md
(one claude mcp add / codex mcp add line). This file is for agents
developing the repo.
What this is
An MCP server (stdio) that opens a branching-document canvas in the browser. Plain ES modules, a small esbuild-based browser build, and script-driven tests.
bin/mcp-server.js— entry; just importssrc/node/mcp/server.jssrc/core/— host-independent document engine, renderer, artifacts, and contractssrc/ui/— browser runtime shared by live pages and frozen snapshotssrc/node/— MCP wiring (server namerabbithole), filesystem storage, sessions, local HTTP/SSE transport, and Node PDF ingestionsrc/web/— static BYOK browser host, provider adapters, and IndexedDB storesrc/core/html/— shared self-contained shell, tokens, and stylesheet sourcesrc/core/html/icons.js— canonical repository for all product-owned SVG icons and brand marksdist/— ignored live and frozen UI bundles; built during install and packagingtest/— capability-oriented suites documented indocs/testing.mdwebsite/public/— live public assets copied bybuild:publish
Run / debug
npm install
RABBITHOLE_NO_BROWSER=1 node bin/mcp-server.js # speaks MCP on stdio
npm run build # regenerate package and web bundles
npm test # deterministic default suiteStorage is JSON files under ~/.rabbithole/ (RABBITHOLE_DIR overrides).
Logs go to stderr — stdout is reserved for the MCP protocol; never print to
stdout.
Conventions
- The product name is Rabbithole — one word, no space, in all copy.
- Node ≥ 18, ES modules everywhere.
- The canvas page must stay fully self-contained (one HTML response, no external assets) — that constraint is load-bearing for export/snapshots.
- stdout is reserved for MCP protocol messages; application logs go to stderr.
- Preserve old
.rabbitholefiles and snapshots according todocs/compatibility.md; future formats must fail clearly rather than truncate. - Put every product-owned SVG icon or brand mark in
src/core/html/icons.jsand render it withiconSvg(). Do not add inline icon geometry to shell, UI, web, settings, or website files. Structural/document SVG (for example the canvas edge layer or user-authored content) is not an icon and remains at its owning trust boundary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

