LLM Wiki

The wiki is the codebase

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

Compiled, not retrieved

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.)

Why projects, not just coding

Institutional memory an agent can read

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 typeWhere it lives in the wiki
SemanticConcept and synthesis pages — what things mean, distilled once
EntityOne page per named thing — project, vendor, system, person
Episodiclog.md — what was ingested, decided, superseded, and when
SummarySource pages — each raw document compressed into its page
ProceduralAGENTS.md — the schema the agent writes against

Conversational and working memory stay in-session by design — the wiki is the part that survives.

Reading

The research behind it

LLM Wiki — Andrej Karpathy

The gist that named the pattern — deliberately an idea file, meant to be handed to your own agent to instantiate.

A-MEM — Agentic Memory

Zettelkasten-style linked notes for agent memory: new notes re-link and re-summarize old ones — the living-KB fork of the design space.

Codified Context

Anchors for calibrating written context — the paper behind paniolo scan's measurement anchors.

DeepRefine

Query-driven wiki refinement — the corpus restructures in response to what gets asked.

Meta-Harness

Filesystem-backed agent memory applied to searching a harness — full history over summaries.

In the CLI

Wiki as a maintained artifact

Everything on this page ships in @paniolo/cli — deterministic, local, no model calls in the validator itself.

CommandWhat it does
paniolo wikiLints 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 --fixThe one write surface in validation — safe mechanical fixes only (BOM, blank lines, trailing newline).
paniolo wiki initStamps a new wiki repo from the embedded template — conventions, index, and log included.
paniolo wiki registerRegisters 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.

Conventions the linter enforces

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.

Wired into the harness

SurfaceHow the wiki plugs in
paniolo initThe interview asks whether the new harness wants a wiki — --wiki/--no-wiki non-interactively — and stamps or skips it accordingly.
paniolo.config.jsonA 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.onStopWiki 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 qmdThe retrieval layer over the corpus — agents search the wiki instead of reading it front to back.
Agent skillsThe 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.

Start one.

# 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