Repository navigation
Source LLM Wiki Pattern
The pattern this wiki implements, from Karpathy's "LLM wiki" idea file. It is explicitly an idea file — "designed to be copy pasted to your own LLM Agent" — so it describes a shape, not a specification, and expects each instantiation to differ.
This page exists because the attribution previously lived only in
docs/llm-wiki-plan.md. When that plan was retired the credit would have gone
with it, leaving the wiki unable to explain where its own design came from. See
Source-LLM-Wiki-Plan.
Not RAG. RAG re-derives knowledge on every query; nothing accumulates. Here the LLM incrementally builds and maintains a persistent wiki that sits between the human and the raw sources — compiled once, then kept current. The human curates sources and asks questions; the LLM does the summarising, cross-referencing and bookkeeping that makes humans abandon wikis.
Three layers: immutable raw sources, the wiki the LLM owns entirely, and a schema file the human and LLM co-evolve. Three operations: ingest, query, lint. Two navigation files: a content-oriented index and a chronological log.
| From the pattern | Here |
|---|---|
| Three layers | The table at the top of Wiki-Conventions |
| LLM owns the wiki entirely | "The LLM, entirely" — humans write the schema, not the pages |
| Ingest / query / lint | The workflows section of Wiki-Conventions |
| Content-oriented index | Index |
| Chronological append-only log | Log |
| Schema in the agent steering file |
AGENTS.md and .github/copilot-instructions.md. The format itself is described on Source-AGENTS-md
|
| "Just a git repo of markdown" | The wiki repo, plus a gitignored local clone |
| Change | Reason |
|---|---|
<!--meta --> block instead of YAML frontmatter |
GitHub wikis do not strip frontmatter; it renders as visible junk. See Gotchas. |
Added a verified: date to every page |
The pattern assumes sources are articles, which do not change. Ours are code, which drifts underneath a page that still reads as true. |
Added a mechanical linter (wiki:lint) |
The pattern describes only an LLM health pass. Enforceable rules — orphans, broken wikilinks, unresolvable sources, credential shapes — are cheaper as code. |
| Added precedence rules | The pattern has no notion of sources outranking each other. We need one: constitution > wiki > specs/ > docs/. |
Added permalink citation (path@sha) |
Raw sources here can be deleted once absorbed. An article on disk never is. |
| Added public-content guardrails | This wiki is world-readable; the pattern assumes a private vault. |
Obsidian and its ecosystem — Web Clipper, graph view, Dataview, Marp — because
the wiki is served by GitHub, not a local vault. Image handling, because our
sources are text. A search engine such as qmd, because the pattern itself says
the index file suffices at this scale, and 67 pages is well inside it.
External sources arrive as research, not as a reading list. The pattern
assumes a curated inbound stream: you clip an article, you drop it in raw/,
you tell the agent to ingest it. That will not happen here — nobody is going to
assemble a reading list for a side project.
Outside knowledge instead shows up because someone building on the project went looking for it: an AWS or SDK document, an upstream changelog, a GitHub issue that finally explains a behavior. The trigger is a task, not a queue.
This makes the pattern's query operation the one that matters most, and the one easiest to skip. Karpathy calls filing answers back "the important insight" — an analysis that stays in chat history is lost work. The same is true of research that reaches only a pull request description. Decision-Spec-Kit-Upgrade is the worked example: the upstream behavior it documents was discovered by reading Spec Kit's own source and testing it in a throwaway clone, and it is on the wiki rather than in a merged PR body.
The mechanics are covered, and in places exceeded — nothing in the pattern verifies a page against code, and nothing in it is enforced by tests.
The habit remains the weaker half. The "no query answer filed back" assessment was true when this page was first written, but Log entries 34-36 show Polly, Sonic, and Haiku answers filed into the wiki after questions. Query ingest does happen; the separate LLM health pass still has no cadence or trigger. A documented workflow without a prompt is easy to skip — the same failure that made methodology invisible until it moved to the front of the work, recorded in Concept-Testing-And-TDD.
See also: Decision-Wiki-As-Knowledge-Base, Wiki-Conventions, Log.
- Concept-Cloud-Only-Inference
- Concept-Budget-Ceiling
- Concept-Personality-Gate
- Concept-IP-And-Legal-Posture
- Concept-Supply-Chain-Discipline
- Concept-Graceful-Degradation
- Concept-Observability
- Concept-Testing-And-TDD
- Concept-Credential-Hygiene
Editing in the browser? Wiki edits are live and bypass wiki:lint. Read
Guide-Wiki-Contributing first.