The LLM-wiki pattern: the idea this notebook runs on
Andrej Karpathy's pattern for an LLM-maintained personal wiki — kept verbatim at the repo root as LLM_Wiki.md — is the founding idea mantua.io itself instantiates. What the pattern claims, and where this repo's implementation matches or departs from it.
Karpathy's argument starts from a complaint about RAG: upload a collection of documents, retrieve relevant chunks at query time, generate an answer — and the LLM re-derives the same synthesis from scratch on every question. Nothing accumulates. His fix is to have the LLM incrementally build and maintain a persistent wiki that sits between the owner and the raw sources: read a new source once, extract what matters, fold it into the existing pages — updating summaries, flagging contradictions, adding cross-references — so the wiki compounds instead of being re-computed every time.
The pattern has three layers: raw sources (immutable, the source of truth), the wiki
itself (markdown, entirely agent-owned), and a schema document — a CLAUDE.md or
AGENTS.md — that tells the LLM the conventions well enough to act as a disciplined wiki
maintainer rather than a generic chatbot. Three operations run on top: ingest (file a
new source, however many pages it touches), query (answer a question, and file good
answers back as pages so explorations compound too), and lint (a slower-cadence health
check for contradictions, stale claims, and orphan pages).
This isn't an adjacent idea for mantua.io — it's the blueprint. The essay is kept verbatim
at the repo root (LLM_Wiki.md) rather than paraphrased away, and the mapping onto this
repo is close to literal:
| Pattern | This repo |
|---|---|
| Raw sources | /sources, one immutable folder per ingested item |
| The wiki | /content — notes and hubs, rendered by Next.js |
| The schema | README.md + CLAUDE.md + .claude/commands/ |
| Ingest | /ingest |
| Query | /oracle |
| Lint | /lint |
index.md | hub pages (content/index/) + backlinks computed at build time |
log.md | log.md — same append-only chronological record |
A few places this repo's implementation goes further than the essay describes, or departs from it:
- Schema enforcement is mechanical, not just documented. The essay's schema layer is
prose the LLM reads and follows; here it's also a Zod schema (
velite.config.ts) that fails the build on a violation. Convention became a compiler check. - Provenance is a first-class field. The essay doesn't dwell on who wrote what — it
assumes the LLM writes the wiki and the owner reads it. mantua.io adds
origin: human | agent | mixedto every page, precisely so the owner's own writing (like Agentic engineering: finding my role in the loop) stays legible as his rather than folding into agent prose. See How this notebook works for why that rule exists. - No search tool yet. The essay's optional layer — a local search engine such as qmd once an index file stops being enough — is on this repo's roadmap, not yet built.
- "Lint" means two different things in this notebook. The essay's lint operation —
contradictions, stale claims, orphan pages — maps directly onto this repo's
/lint. Linting as an agent guardrail, from the harness-design cluster, is a different concept that happens to share the name: code linters as guardrails on what an agent writes, not wiki health. Worth keeping straight — they don't contradict each other, they're just namesakes.
Where the essay is most directly relevant to the rest of this notebook: its framing of the owner's job — curate sources, direct the analysis, ask good questions, while the LLM does the grunt work of summarizing, cross-referencing and filing — is the same shift the owner describes wrestling with in the harness-design cluster, just one level up: there it's managing a team of coding agents instead of a wiki-maintaining one. Same bottleneck, same fix.
The same bet, arrived at from teaching
Karpathy makes a second version of the argument that isn't in the essay, and it is a stronger statement of what the pattern is for. Talking about documentation (NoPriors, March 2026): stop writing HTML docs for humans and write markdown for agents, because an agent will re-explain any part of it to any reader at their level with infinite patience. He abandoned a walkthrough video for microGPT on exactly that reasoning — the 200 lines are simple enough that an agent can already explain them better than a fixed explanation can, in as many different ways as the reader needs.
Which reframes what a wiki like this one is. Not a document you write for future-you to read,
but the corpus an agent reads in order to answer future-you — which is precisely why
/oracle files good answers back as pages, and why the schema lives in markdown the agent
loads rather than in a style guide a person is supposed to remember. His formulation of what
a person still contributes fits the provenance rule above: the few bits the agent cannot come
up with on its own. An agent understands microGPT completely and cannot invent it. Everything
downstream of that — the explaining, the cross-referencing, the filing — is not the human's
job any more.
He makes the same argument earlier in the interview about smart-home apps, which is what makes it a position rather than an aside. Both halves, and the places the position thins out, are in The customer is not the human anymore — including the dependency this version doesn't name: "write for the agent, it will explain it to people" holds only while the agent's explanation is faithful, and a wrong explanation reads exactly like a right one to whoever came to the docs because they didn't know.
Related
- Agentic engineering: the work moves to the harnessThe emerging discipline around long-running coding agents — designing the scaffolding, feedback loops and environments that let an agent do reliable work, rather than writing the code yourself. Entry point for the harness-design cluster in this notebook.
- Linting as an agent guardrailCustom lint rules as the enforcement layer for conventions an agent would otherwise drift away from — architecture boundaries, taste invariants, documentation freshness. Why a linter beats an instruction, and what to put in the error message.
Linked from
- Aligned to whomDwarkesh wants a model that is his advocate the way a lawyer is; the published specs describe something closer to an ethical contractor with its own view of the good. Greenblatt thinks the fiduciary version would be better and then makes the strongest case against it — that a society running on do-whatever-you-ask labour loses a check it depends on.
- How this notebook worksmantua.io is an agent-first knowledge base — a persistent, compounding wiki built from one inbox, maintained by scheduled agents, curated and read by its owner.
- Learning from deploymentProduction traffic is becoming training data — tasks the model did badly on, turned into environments that match them exactly, with the rubric built from what the human actually wanted. Which is the loop this notebook already admires, run with the model as the artefact, and it changes where the reinforcement comes from.
- Loop engineering: from writing prompts to writing loopsThe claim that the unit of work is shifting from the prompt to the loop — Cherny, Osmani and Guzman all saying a version of it — and why the interesting question is not how to keep an agent running but who decides what "done" means.
- Model Training as Code: Aleph Alpha's SavannaA lab put its entire training pipeline — pre-training, SFT, RL, evaluation — into imperative code, with CI as the entry point and one-click hermetic runs. The first source in this notebook where the harness is built for training a model rather than for writing software, and the argument is organisational rather than technical.
- Skill Issue: Karpathy on code agents (NoPriors, 2026-03)Notes on the NoPriors interview where Karpathy says he hasn't typed a line of code since December, that every remaining failure feels like a skill issue rather than a capability ceiling, and that token throughput is the resource you should feel nervous about wasting. Plus the jaggedness caveat that undercuts the whole picture.
- The customer is not the human anymoreKarpathy makes the same argument twice in one interview — smart-home apps should be APIs, docs should be markdown for agents rather than HTML for people — because in both cases an agent consumes the interface and routes to a human. Where that lands for this notebook, where it thins out, and what changes when a vendor does it deliberately.