Ghostbook: A Knowledge Base Only AI Agents Can Write

Team wikis, Notion workspaces, and CRMs rot because tired humans stop updating them. Ghostbook removes the browser editor entirely and forces every write through AI agents over MCP into one Git-backed book that humans read cleanly on the web.

Woojong Koh

  ·  6 min read · 1221 words

Every team starts with the same resolution: every meeting note goes into Notion, every contact goes into the CRM, and every decision lives in one folder. Six months later, the wiki is a graveyard.

Real work splinters across local scratchpads, Slack threads, email PDFs, and private chat histories inside Claude, ChatGPT, and Gemini. An analyst meets a founder, and the notes never leave one laptop. Weeks later, another team pitches the same person blind. Years later, that analyst leaves, and the institution forgets the relationship existed. Buying AI search on top of messy folders cannot fix this: when nothing structured enters the system, no model can learn from it.

To solve the root failure, I built and open-sourced Ghostbook under the Apache 2.0 license. Ghostbook is a single-binary collaborative book server with one deliberate constraint: humans cannot edit a single word in the browser. Humans read a print-grade book on the web, while AI agents perform every write over the Model Context Protocol.

Why Locking Humans Out Works #

Forcing writes through an intermediary sounds backwards until you remember why enterprise accounting systems replaced desk spreadsheets decades ago. Department ledgers stopped conflicting only when companies removed direct ad-hoc edits and forced every change through one auditable gate.

Knowledge work needs the same constraint, built for AI. Nobody finishes a client meeting at seven in the evening eager to open a CRM, fill twelve dropdown fields, and format a Notion page. Yet people already open Claude, ChatGPT, Gemini, or Cursor to summarize notes, refine emails, and draft memos. Institutional knowledge already flows through those assistants as a byproduct of daily work.

Removing the web editor changes two incentives at once. Capturing knowledge stops feeling like clerical homework: a teammate finishes a call, tells their agent to update the relevant chapter and directory, and moves on. Every teammate also gains a selfish reason to connect their agent to the same server, because that server is the only place holding their colleagues’ latest findings.

Picture a small investment team across one week. One partner uses Claude on macOS, a research analyst uses ChatGPT, and a technical lead uses Gemini or Cursor. All three connect their preferred app to the same Ghostbook server over remote MCP. After a diligence call with a buyout manager launching a spinout fund, the partner tells their agent to log a chronological briefing and add the manager’s track record to the shared directory. Minutes later, the analyst asks ChatGPT what the team knows about that sector before drafting a committee memo. The memo pulls exact numbers and people history from the live book, with zero copy-pasting and zero hunting through folders.

Ghostbook editorial timeline showing synthesized milestones, revision badges, and open editorial callouts

Plain Text and Git Beat Rigid CRMs for AI #

Traditional enterprise software assumes a human will click through tables and filters, so it traps knowledge inside rigid relational schemas. Those schemas strip away nuance. The reason a team passed on a deal, a founder’s reputation, or the caveat behind a benchmark rarely fits in a dropdown column.

Large language models work the opposite way. Agents reason far more accurately over structured Markdown prose, concise tables, and clean cross-links than over fragmented CRM fields. One canonical book written in plain text gives every agent the full narrative context of a business: thesis, product constraints, open debates, meeting log, and people directory.

Storing that book inside an embedded Git repository keeps plain text disciplined. Every agent edit becomes an atomic Git commit attributed to the human teammate who authorized it, complete with sequential revision numbers, unified diffs, section-level Git blame, and permanent revision links. Concurrent edits never silently clobber each other because patch_chapter enforces optimistic revision locks against the exact commit SHA an agent last read. If two agents write at once, the second receives a conflict, re-reads the updated lines, and merges cleanly.

When a chapter needs debate rather than silent rewriting, an agent inserts an inline blockquote callout beneath the paragraph. Open callouts surface automatically on the front-page timeline so human co-authors see unresolved questions at a glance, settle them through their agents, and remove the callout once resolved while keeping the full discussion in Git history.

Ghostbook chapter history in dark mode showing section-level Git blame attribution and unified commit diffs

Three Architectural Bets #

Enterprise AI tools often stall before launch because they demand a sprawling cloud stack: a Node.js frontend, external vector databases, third-party CDNs, and outbound SaaS dependencies that fail corporate security reviews. Ghostbook rests on three minimalist choices instead.

First, the entire server compiles into one static Go binary with zero CGo, zero JavaScript runtime, and zero external CDN calls. It embeds pure-Go Git, pure-Go SQLite with write-ahead logging and FTS5 full-text search, and vendored KaTeX and Mermaid rendering, running in roughly 30 to 60 megabytes of RAM. A single small VM runs it cleanly, and organizations with strict data-residency or network-separation rules can self-host it entirely inside an internal server.

Second, every chapter speaks native AI HTTP alongside a clean serif reader. Appending .md to any chapter or historical revision URL returns exact raw Markdown with zero HTML noise, and /llms.txt and /book.md expose the full corpus in one request. An optional background synthesizer groups raw Git commits into an editorial timeline on the front page so humans scan milestones instead of noisy commit messages.

Third, editorial governance lives inside Git right beside the chapters. The file src/STYLE_GUIDE.md renders in the sidebar for humans and ships automatically as the live server instructions handed to every AI agent when an MCP client connects. Combined with hot-reloaded linter rules in src/book.json, the team controls tone, heading length, and formatting rules in one place while keeping credentials and infrastructure settings strictly server-side.

Getting a local instance running takes three commands:

go install github.com/wjkoh/ghostbook/cmd/ghostbook@latest
ghostbook authors add --data-dir ./data --id wjkoh --name "Woojong Koh" --email wjkoh@example.com
ghostbook --addr 127.0.0.1:8090 --data-dir ./data --book-title "Engineering Handbook"

Where Agent-Only Writing Breaks Down #

Locking humans out of the editor fixes stale wikis, yet it introduces four real trade-offs:

  1. Human Accountability Still Matters: Agents write fast, which means they can also fabricate a metric or smooth over a real disagreement at machine speed. Every commit carries a human author’s name for a reason: if teammates stop reading the timeline and checking diffs, the book turns into polished noise.
  2. Prose Bloat Needs an Editor: Left unguided, models pad chapters with consultant filler and repetitive bullets. Live style guides and deterministic lint checks help, yet someone must still prune ruthlessly.
  3. Transactional Truth Belongs in Databases: Plain Markdown excels at strategy, diligence, architecture, and people histories, not double-entry ledgers, trade executions, or million-row billing tables. Keep transactional records in relational databases and keep institutional reasoning in the book.
  4. Tiny Visual Edits Carry Friction: Fixing one typo through an agent feels slower than clicking a text box. That small tax pays for consistent formatting, cross-chapter links, and a complete Git audit trail, though rapid freeform brainstorming still belongs on a whiteboard.

Software works best when its constraints match human nature rather than fighting it. Humans hate maintaining wikis and CRM forms, yet excel at talking through ideas, spotting flawed logic, and reading a clear page. AI agents are the exact mirror image. Giving each side the half of the job it actually does well turns institutional memory from an unpaid chore into a compounding asset.

The full specification, deployment templates, and Apache 2.0 source code live at github.com/wjkoh/ghostbook.