A Claude Code plugin that maintains docs/wiki/ as a self-healing DAG of LLM-authored pages, automatically kept in sync as your codebase evolves.
llm-wiki turns your Claude Code sessions into a living documentation engine. Every time you edit a source file, a hook logs the change. When enough changes accumulate, a background agent reconciles them into structured wiki pages — automatically and without interrupting your flow.
The wiki is a directed acyclic graph — each page tracks its raw source files in frontmatter, and all cross-references are bidirectional. Pages are typed: entity, feature, endpoint, story, eis. The graph can be linted, spidered, and reconciled on demand.
Everything you need to bootstrap, maintain, and explore your wiki.
docs/wiki/ from existing codebase sources — Prisma models, API routes, user stories, and EIS documents. Runs phases in parallel and cross-links all results..pending/changes.jsonl into wiki pages. Use after a large refactor or when you want to sync changes without waiting for the threshold hook to fire.The plugin ships five agents, five commands, three skills, two hooks, and three shell scripts.
docs/wiki/ ├── index.md # auto-rebuilt master index ├── log.md # append-only drain history ├── schema.md # wiki contract (frontmatter spec, link rules) ├── .pending/ │ └── changes.jsonl # hook-written pending queue ├── entities/ # one page per Prisma model ├── features/ # synthesized feature areas ├── endpoints/ # one page per API route ├── stories/ # user story summaries └── eis/ # executable implementation specs
llm-wiki uses Claude Code's PostToolUse hook to track every file change without interrupting your flow.
Whenever Claude edits a file in src/, docs/, or prisma/, log-change.sh appends a timestamped JSON entry to docs/wiki/.pending/changes.jsonl. Then threshold-check.sh counts the queue — when it crosses a configurable threshold (default: 10 changes), it automatically spawns the wiki-maintainer agent to drain the queue and update wiki pages.
The drain is idempotent — safe to run at any queue depth. It reads changed raw sources, reconciles them into existing wiki pages, handles contradictions by flagging rather than silently overwriting, and truncates the queue only after full success.
llm-wiki is an extension of Andrej Karpathy's original idea for using language models to maintain living documentation alongside code. The core insight — that LLMs should be first-class authors of a project's knowledge graph, not just consumers of it — comes directly from his work.
Original idea: gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
Add the plugin to your Claude Code project, bootstrap once, and let the hooks keep it current.
/plugin marketplace add esxr/product-wiki
/plugin install product-wiki@pranav.com.au
/reload-plugins
Then bootstrap from your existing codebase:
/init
Hooks maintain the wiki automatically after that. Run /audit any time to health-check the graph.