claude·wiki-pages

Karpathy's LLM Wiki · for Claude Code

An agent-operable wiki that heals itself.

You curate the sources. The plugin maintains the wiki. Hooks enforce the schema at every write — and a deterministic Bun engine auto-heals the graph under a git checkpoint, so every change is reversible.

How it works

One verb routes through the orchestrator to the right skill. The Bun engine does the exact work; a git checkpoint makes every auto-heal reversible. Bash for the reflexes, Bun for the brain.

flowchart TD
    U([You]) -->|/claude-wiki-pages:wiki| O[orchestrator agent]
    O -->|fresh vault| INIT[init]
    O -->|raw/ pending| ING[ingest agent]
    O -->|question| ANA[analyst agent]
    O -->|drift| CUR[curator agent]
    ING & CUR -->|call| ENG[["Bun engine: verify · fix"]]
    ENG -->|checkpoint then auto-heal| HEAL{{"verify → fix → re-verify"}}
    HEAL -->|clean| VAULT[("Vault: raw/ → wiki/")]
    HEAL -.->|rollback| GIT[(git revert)]
            

Four layers, each catching a different failure

Data is passive. Skills are single verbs. Agents compose them. Orchestration — hooks, scripts, rules — enforces the schema at every tool call.

Layer 1 · Data

An Obsidian vault

Immutable raw/ sources, an LLM-maintained wiki/, and a schema in vault/CLAUDE.md that wins every conflict.

Layer 2 · Skills

12 short verbs

init, ingest, query, lint, fix… thin orchestrators over the engine, plus onboarding and agent-teaching skills.

Layer 3 · Agents

7 executors

Orchestrator routes to onboarding, ingest, curator, analyst, polish, maintenance.

Layer 4 · Orchestration

Hooks that enforce the contract

SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, SubagentStop — frontmatter, wikilinks, and raw-immutability gated at every write, with path-scoped rules.

The deterministic engine

Anything with one correct answer — the wikilink graph, frontmatter, MOC integrity — runs in typed, tested Bun. The LLM only makes judgment calls, grounded in what the engine computes. Every write-path closes with verify.

Bash · the reflexes

Hot-path hooks

Zero startup cost, no runtime dependency. They gate every Write/Edit and degrade gracefully when Bun is absent.

Bun · the brain

verify · fix · heal · doctor

Structured --json output, ported faithfully from the bash verifiers and pinned by a parity test. Self-heal checkpoints in git, loops to clean, commits — reversible with git revert.