LLM Wiki — Andrej Karpathy
The gist that named the pattern — deliberately an idea file, meant to be handed to your own agent to instantiate.
An LLM Wiki is a directory of interlinked markdown pages that your agent writes and maintains — a persistent knowledge layer between you and your raw sources. Knowledge is compiled once and kept current, not re-derived on every query. Paniolo builds it for projects, not just personal notes.
The pattern comes from Andrej Karpathy's LLM Wiki gist: instead of retrieving from raw documents at query time (RAG), the LLM incrementally builds and maintains the wiki itself. When a new source arrives, it reads it, extracts the key information, and integrates it — updating entity pages, revising summaries, flagging contradictions against older claims. The cross-references are already there; the synthesis already reflects everything read so far. It compounds.
Karpathy's framing: the editor is the IDE; the LLM is the programmer; the wiki is the codebase. You source and ask questions; the agent does the summarizing, cross-referencing, filing, and bookkeeping — the maintenance work that used to kill every wiki anyone started.
For the reading side: everything is plain markdown, so any wiki-aware
editor browses it. Karpathy uses Obsidian; in VS Code the
Foam extension
gives the same [[wikilink]] navigation,
backlinks panel, and graph view over the same directory — nothing to
convert or export. (Paniolo's cross-wiki [[other-wiki:page]]
form is our own convention the linter resolves; editors follow the
same-wiki links.)
A coding project was the obvious first fit, but nothing about the pattern is code-specific. Decisions, plans, research notes, vendor evaluations, business context — any body of knowledge that outlives a chat window belongs somewhere an agent can actually traverse, not in a chat transcript or a folder of unlinked PDFs.
It also happens to be a complete agent-memory architecture without any special infrastructure. Mapping the standard memory taxonomy (Angie Jones, Agentic AI Foundation), the wiki covers every long-term type:
| Memory type | Where it lives in the wiki |
|---|---|
| Semantic | Concept and synthesis pages — what things mean, distilled once |
| Entity | One page per named thing — project, vendor, system, person |
| Episodic | log.md — what was ingested, decided, superseded, and when |
| Summary | Source pages — each raw document compressed into its page |
| Procedural | AGENTS.md — the schema the agent writes against |
Conversational and working memory stay in-session by design — the wiki is the part that survives.
The gist that named the pattern — deliberately an idea file, meant to be handed to your own agent to instantiate.
Maps the pattern onto the agent-memory taxonomy — five of seven memory types, no specialized infrastructure.
Zettelkasten-style linked notes for agent memory: new notes re-link and re-summarize old ones — the living-KB fork of the design space.
Anchors for calibrating written context — the paper behind paniolo scan's measurement anchors.
Query-driven wiki refinement — the corpus restructures in response to what gets asked.
Filesystem-backed agent memory applied to searching a harness — full history over summaries.
The unified review of Memory / Skills / Protocols / Harness — where the wiki sits in the landscape.
Evidence on what context files actually change for agent performance.
Everything on this page ships in @paniolo/cli —
deterministic, local, no model calls in the validator itself.
| Command | What it does |
|---|---|
paniolo wiki | Lints the wiki — page shape, frontmatter, wikilinks, orphan references, near-duplicates. --config validates every registered wiki at once; --fail-on gates by severity; --format json for CI. |
paniolo wiki --fix | The one write surface in validation — safe mechanical fixes only (BOM, blank lines, trailing newline). |
paniolo wiki init | Stamps a new wiki repo from the embedded template — conventions, index, and log included. |
paniolo wiki register | Registers an existing wiki in paniolo.config.json so validation and page ops know it. |
paniolo wiki new <slug> | Creates a page with correct frontmatter, a log.md entry, and index links. --kind (or the slug prefix) supplies the type, starting status, verb, and indexes. |
paniolo wiki rename <slug> <new> | Renames a page and rewrites every reference that points at it. |
paniolo wiki move <slug> --to <wiki> | Moves a page to another registered wiki, carrying its raw/ sources and fixing references on both sides. |
paniolo wiki delete <slug> | Plans by default, writes only with --apply — and holds back while prose still references the page. |
Pages carry frontmatter (title,
type, tags,
sources, updated,
optional status) and kind-prefixed slugs —
plan-, decision-,
paper-, blog-,
article-, business-,
ai-vendor-, 3rd-party-repo- —
each kind declaring its own type, status ladder, verb, and indexes.
Cross-wiki references like [[other-wiki:page]]
resolve and validate across repos.
| Surface | How the wiki plugs in |
|---|---|
paniolo init | The interview asks whether the new harness wants a wiki — --wiki/--no-wiki non-interactively — and stamps or skips it accordingly. |
paniolo.config.json | A repo is a wiki when its node carries "wiki": {}; wiki.root, pagePrefixes, domains, and allowUnknownWikis tune it. Shared wiki policy lives in a repoTypes.wiki layer — see the config reference. |
verify.onStop | Wiki lint runs as a post-edit gate on the repo, so a broken wikilink or missing status fails the edit, not the next person. |
paniolo qmd | The retrieval layer over the corpus — agents search the wiki instead of reading it front to back. |
| Agent skills | The paniolo-wiki skill teaches agents the conventions — installed with the rest of the catalog. |
Our own wikis run on this: two corpora, ~1,500 pages, zero lint findings — validated the same way yours will be.
# a wiki inside a new harness — the interview asks
npx @paniolo/cli init --wiki
# or stamp a standalone wiki repo
npx @paniolo/cli wiki init