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.
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.
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 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.
Wiki as a maintained artifact
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 --name <name> | Stamps a new wiki repo from the embedded template — conventions, index, and log included. --name is required. --register <paniolo.config.json> adds the wiki to that config; without it, the command prints the register line and writes only the new repo. --out chooses the directory (default <slug>-wiki/). |
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 refs <slug> | Lists every reference to a page, classified. --json prints the same listing for scripts. Writes nothing. |
paniolo wiki rename <slug> <new> | Renames a page and rewrites every reference that points at it. --dry-run prints the edits. |
paniolo wiki move <slug> --to <wiki> | Moves a page to another registered wiki, carrying its raw/ sources and fixing references on both sides. --dry-run prints the edits. |
paniolo wiki status <slug> <value> | Plans a lifecycle status: change and writes it with --apply. The value must be in the page kind's vocabulary, or in the wiki's fallbackStatuses when no kind tracks the page. Also updates updated: and the operation log. |
paniolo wiki archive <slug> | Plans a snapshot at raw/wiki-archive/<slug>.md, repoints references, and removes the live page — no stub remains. --apply writes. --with <slug> sends references to another live page in the same wiki. --allow-residue proceeds when leftover mentions remain; repos the search could not read still block. |
paniolo wiki delete <slug> | Plans by default, writes only with --apply — and holds back while prose still references the page. |
Page operations — new, refs,
rename, move,
status, archive,
and delete — need
--config, because they search the registered
repos for references. status,
archive, and delete
print a plan and write nothing until --apply.
init does not need a config; it can create the
repo before one exists.
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.
A wikilink is a bare [[slug]]. It resolves
in the same wiki first, then across the other configured wikis. A
wiki: prefix is a lint error.
Wired into the harness
| 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, and domains 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.
Start one.
# a wiki inside a new harness — the interview asks
npx @paniolo/cli init --wiki
# or stamp a standalone wiki repo and register it
npx @paniolo/cli wiki init --name Northwind --register paniolo.config.json