Im April 2026 veröffentlichte Andrej Karpathy eine einseitige Ideenskizze mit dem Titel „LLM Wiki“: Statt bei jeder Frage in Rohdokumenten zu suchen, baut und pflegt ein LLM-Agent ein dauerhaftes Wiki aus Markdown-Seiten. Der Gist hatte innerhalb von Tagen mehrere tausend Sterne. Wissenssammlungen sterben selten am Anlegen, fast immer an der Pflege; genau die gibt Karpathy an den Agenten ab. Ein Ersatz für RAG ist das trotzdem nicht. Es ist ein anderes Werkzeug mit eigenen Fehlern.
Was das Muster ist, wo es RAG schlägt und welche Kontrollen nötig sind, bevor ein Agent unbeaufsichtigt in die Wissensbasis schreibt.
outputs/, das nie als Quelle zurück ins Wiki gelangt.Karpathys Skizze ist bewusst abstrakt gehalten. Der Kern besteht aus drei Schichten und drei Operationen.
CLAUDE.md, bei Codex und den meisten anderen Agenten eine AGENTS.md. Legt Struktur, Konventionen und Arbeitsabläufe fest.Zwei Dateien halten das Ganze navigierbar: eine inhaltliche index.md (jede Seite mit Link und Einzeiler) und eine chronologische, append-only log.md. Karpathy zufolge trägt der Index allein bis etwa 100 Quellen und einige hundert Seiten, ohne Embedding-Infrastruktur.
Diese Grenze ist konservativ. Meine eigene Wissensbasis liegt nach fünf Monaten bei knapp 400 Quellenpaketen in raw/ (Bücher, Papers, Repositories, Web-Snapshots; 16 GB, rund 1.900 PDFs), aus denen etwa 900 Dateien im Wiki zitiert werden, verdichtet auf gut 100 Seiten. Index plus ripgrep reichen; ein Embedding- oder BM25-Index war bisher nicht nötig. Der Grund: Der Index wächst mit der Zahl der Wiki-Seiten, und die wächst viel langsamer als die Zahl der Quellen.
RAG leitet Wissen bei jeder Anfrage neu ab: Chunks abrufen, Antwort generieren, vergessen. Nichts akkumuliert. Das LLM-Wiki verlagert die Synthese vom Abfrage- auf den Schreibzeitpunkt: Querverweise und markierte Widersprüche sind schon da, wenn die Frage kommt.
| RAG | LLM-Wiki | |
|---|---|---|
| Wann wird synthetisiert? | Bei jeder Anfrage | Einmal beim Ingest, dann gepflegt |
| Kosten | Ingest billig, Query teuer | Ingest teuer, Query billig |
| Änderungsrate der Quellen | Beliebig hoch: E-Mail, Tickets, Chat, Logs werden laufend neu indexiert | Niedrig: jede Änderung ist ein Ingest über viele Seiten; für laufend bewegte Bestände ungeeignet |
| Widersprüche zwischen Quellen | Unsichtbar, landen im Kontextfenster | Können beim Ingest explizit markiert werden |
| Quellenbindung | Strukturell gegeben (Chunk zeigt auf Dokument) | Muss per Schema erzwungen werden |
| Fehler | Verschwinden mit der Antwort | Bleiben im Wiki stehen und werden weitergereicht |
| Skalierung | Millionen Dokumente | Index skaliert mit Wiki-Seiten, nicht mit Quellen; Volltextsuche reicht lange |
| Stärke | Punktuelle Fakten, Entitäten, große Bestände | Themen, Entwicklungen, Synthese über viele Quellen |
Was an einer Wissenssammlung Arbeit macht, ist die Buchführung: Querverweise aktualisieren, Zusammenfassungen nachziehen, bemerken, dass eine neue Quelle einer alten Aussage widerspricht. Notizsammlungen werden aufgegeben, weil der Pflegeaufwand schneller wächst als der Nutzen. Ein Agent langweilt sich nicht, vergisst keinen Querverweis und fasst mehrere Dateien in einem Durchgang an. Die Arbeitsteilung ist einfach: Ich kuratiere die Quellen und stelle die Fragen. Der Agent macht den Rest.
Die Idee ist nicht neu. Vannevar Bush beschrieb 1945 in „As We May Think“ den Memex: einen persönlichen, kuratierten Wissensspeicher, in dem die Verbindungen zwischen Dokumenten so wertvoll sind wie die Dokumente selbst. Offen blieb bei ihm, wer diese Verbindungen pflegt. Bei Karpathy übernimmt das der Agent.
CLAUDE.md ist Konfiguration, wird aber wie Prosa behandelt. Nach zwanzig Sessions weiß man nicht mehr, welche Regel warum hinzukam. Gegenmittel: Jede Schemaänderung bekommt einen Log-Eintrag mit Anlass, genau wie eine Wiki-Änderung.Die Skizze sagt ausdrücklich, dass Verzeichnisstruktur, Konventionen und Werkzeuge vom Einsatzfall abhängen. Bei mir hat sich diese Reihenfolge bewährt.
ripgrep tragen weiter, als man denkt. Erst wenn das nicht mehr reicht, BM25 oder Embeddings über die Wiki-Seiten, nicht über die Rohquellen.Ich betreibe das Muster seit einigen Monaten für meine eigene Wissensbasis, mit Claude Code als Agent und Obsidian zum Lesen. Die Verzeichnisstruktur lehnt sich an OpenKB an, eine Open-Source-Umsetzung von Karpathys Idee: raw/ für Quellen, wiki/ mit Konzept- und Entitätsseiten, ein Ordner für generierte Ausgaben, dazu index.md und log.md. Das Schema unten ist die bereinigte Fassung meiner CLAUDE.md; werkzeugspezifische Details und private Datenquellen sind entfernt, die Regeln sind unverändert. Fast jede Zeile ist die Antwort auf einen Fehler, der vorher passiert ist.
Niemand baut den Wissensgraphen. Er ist die Summe der Links, die der Agent beim Schreiben setzt: Jede Konzeptseite verweist auf verwandte Konzepte, jede Entität auf die Konzepte, die sie erwähnen, und zurück. Die Regel dahinter ist eine Zeile im Schema: Eine Entität bekommt eine eigene Seite, sobald zwei Konzepte sie nennen. Nach fünf Monaten sind das gut 100 Seiten mit knapp 700 Verweisen untereinander.
Obsidian zeichnet daraus die Graphansicht. Man sieht, welche Seiten Knotenpunkte sind, welche Themen zusammenhängen, und welche Seite ohne Verbindung am Rand hängt. Letzteres meldet auch der Linter als verwaist; im Graph sieht man es ohne ihn.
index, llms-and-rag, machine-learning-fundamentals), rote Knoten sind Tags.raw/ bleibt unangetastet. Jede Wiki-Seite zitiert Dateien in raw/. Fehlt eine davon, lässt sich die Seite nicht mehr prüfen. Der Agent darf deshalb nichts löschen, verschieben oder umbenennen.outputs/ wird beschrieben, aber nicht gelesen. Dort liegen generierte Antworten und Analysen, teils veraltet, teils ungeprüft. Nähme der Agent sie beim nächsten Auftrag als Quelle, würde aus einer früheren Halluzination bestehendes Wissen. Deshalb greift er auf outputs/ nur zu, wenn ich einen Ordner ausdrücklich nenne.type, sources und generated.at als Pflicht- bzw. Erwartungsfelder vorgibt und ein Linter die Struktur prüfen kann. Das ersetzt keinen Review, macht aber Seiten ohne Quelle maschinell auffindbar.CLAUDE.md · Wurzel der Wissensbasis
# Knowledge Base Schema
## What This Is
A knowledge base maintained by an LLM agent: markdown pages with YAML frontmatter, linked into a
graph, with an `index.md` hierarchy and a `log.md` history. The page format follows Google's Open
Knowledge Format (OKF) v0.2; the bundle root `wiki/index.md` declares `okf_version: "0.2"`.
## How It's Organized
- `raw/` contains unprocessed source material. It is IMMUTABLE: never modify, delete, move, or rename
anything in `raw/`. The wiki's provenance depends on every cited raw file staying exactly where it
is; a deleted raw source makes its wiki article impossible to rebuild or re-verify. If `raw/` seems
to contain junk, propose its removal and wait for explicit approval; never delete on your own
initiative.
- `wiki/` contains the organized wiki. The agent maintains this entirely.
- `wiki/concepts/` — topic pages (one `.md` per topic)
- `wiki/entities/` — people, organizations, places, products
- `wiki/explorations/` — saved query results and durable analyses
- `wiki/index.md` + per-folder `index.md` — hierarchy, one line per page
- `wiki/log.md` — append-only change log
- `wiki/AGENTS.md` — detailed governance rules for maintaining the wiki (read it before editing wiki
content)
- `outputs/` contains generated reports, answers, and analyses. It is a working area, not curated
knowledge: material there may be stale, superseded, or unreviewed.
- Root allows only `raw/`, `wiki/`, `outputs/` and hidden dotfiles/dotdirs (tool config, e.g.
`.obsidian/`, `.git*`). No other visible top-level file or folder is allowed. Curated content goes
in `wiki/`, generated work in `outputs/` (its own subfolder), sources in `raw/`. If a stray root
item appears, propose where it belongs and wait for approval before acting.
## Source Discipline
- Knowledge lookups, research, and content for new deliverables draw on `wiki/` (curated) and `raw/`
(immutable sources) only.
- Never read, cite, or reuse material from `outputs/` on your own initiative, not as examples, prior
art, or reference. Work with an `outputs/` subfolder only when the user explicitly names it for the
current task.
- Writing new deliverables into `outputs/` (each in its own subfolder) remains the normal workflow.
## Searching the Repository
- Always search with `rg` (ripgrep), never with `grep`/`find`. Reason: `grep -r` pulls in binaries,
SVGs and large HTML scrapes from `raw/` and returns noise.
- Default call: `rg -i "pattern" wiki/ raw/`. File names only: `-l`. Markdown only: `-g '*.md'`. Cut
noise: `-g '!*.svg' -g '!*.html'`.
- `rg` skips hidden directories and respects `.gitignore`. For dotdirs: `rg --hidden --no-ignore -g
'!.git/'`.
- Find files instead of contents: `rg --files -g '*pattern*'` instead of `find`.
## Wiki Rules (OKF v0.2)
- Every content page carries YAML frontmatter: `type` is required (Concept, Organization, Person,
Place, Product, Exploration); `title`, `description`, `tags` and `generated` (by + at, UTC) are
expected; `sources` (structured list, `resource` per entry), `verified`, `status`, `stale_after`,
`resource` are optional.
- `index.md` files carry no frontmatter (root `wiki/index.md`: exactly `okf_version`).
- Every page starts (after frontmatter) with a one-paragraph summary.
- Article bodies link related pages with bundle-absolute markdown links
(`[topic](/concepts/topic.md)`, `[name](/entities/name.md)`); `raw/` and `outputs/` pointers stay
relative; index files use relative markdown links. Wikilinks are legacy; the linter flags them.
- Maintain the `index.md` files: every page listed once with a one-line description.
- When new raw sources are added, update the relevant wiki articles, record citations in `sources:`,
and refresh `generated.at`.
- Details in `wiki/AGENTS.md`; verify structural edits with the OKF linter before committing.
## Answering Knowledge Questions
- Answer from the curated wiki, grounded in `wiki/` and `raw/`, with sources cited.
- If the wiki does not cover a question, say so; do not fill the gap from general knowledge without
marking it as such.
- Durable answers (comparisons, analyses, connections) are filed back into `wiki/explorations/` and
listed in the index.
## Change Log
- Maintain `wiki/log.md`, a chronological record of wiki changes so recent activity is easy to see.
- Append a new entry whenever wiki files are created, updated, split, renamed, or deleted (including
during reindex runs).
- Entry format: `## YYYY-MM-DD` header (group multiple edits on the same day); beneath it, one bullet
per change: what changed + one-line why/trigger. Keep bullets terse; the wiki files themselves are
the detail.
- Newest entries go at the top of `log.md`. Only append; never rewrite historical entries.
- If the log gets long (~500 lines), archive older entries to `wiki/log-archive.md` grouped by year.
Das ist die obere Ebene. Die Detailregeln stehen in wiki/AGENTS.md, das der Agent vor jeder Änderung liest: Seitenformat mit Beispiel-Frontmatter, wann eine Entität eine eigene Seite bekommt (ab zwei Konzepten, die sie erwähnen), Linkregeln, Log-Format, Schreibstil.
wiki/AGENTS.md · Detailregeln
# Wiki Governance
Instructions for any AI agent maintaining this wiki. The wiki follows Google's Open Knowledge Format
(OKF) v0.2. The bundle root is `wiki/`; its `index.md` declares `okf_version: "0.2"`.
## Structure
- `concepts/` holds topic pages, one file per topic. Categories: AI & Machine Learning (`ai-ml`),
Domain Applications (`domain-applications`), Foundations (`foundations`), Business (`business`).
- `entities/` holds pages for people, organizations, places, and products that recur across concepts.
Create an entity page when something is referenced from two or more concepts or is load-bearing for
the business.
- `explorations/` holds saved query results and durable analyses. Large generated artifacts (reports,
decks, code packs) belong in `outputs/` instead.
- `index.md` in each folder lists every page with a one-line description; `index.md` at wiki root
links the sections. Update indexes in the same turn as any page create/rename/delete.
- `log.md` is the append-only change log (rules below).
## Page Format (OKF v0.2)
Every content page starts with YAML frontmatter, then a one-paragraph summary, then the body:
---
type: Concept # required; Concept, Organization, Person, Place, Product, Exploration
title: "Page Title"
description: "One-line summary used in indexes"
tags: [ai-ml] # category tag for concepts; kind tags for entities
sources: # optional; where the page's citations live (see below)
- resource: "https://example.org/doc"
id: "s1"
title: "Short label"
generated: # required here; who last produced/updated the page + when (UTC)
by: "process:claude-wiki-maintenance"
at: 2026-07-31T12:00:00Z
---
- `type` is mandatory on every page. `title`, `description`, `tags`, `generated` are house-required
even though OKF marks them optional.
- `generated.at` replaces the old v0.1 `timestamp`; refresh it on every substantive edit.
`generated.by` follows the OKF actor convention: `process:<id>` or `<producer>/<version>` for
agents, `human:<id>` for people.
- Citations live in frontmatter `sources:` (list of mappings; `resource` required per entry,
`id`/`title` optional, ids `s1..sN` unique). An explanatory citation section in the body may stay
for the human reader, but frontmatter is authoritative.
- Optional trust fields: `verified:` (list of `{by, at}`; a `human:` entry marks the page
human-reviewed), `status:` (`draft` | `stable` | `deprecated`; absent means stable), `stale_after:`
(`YYYY-MM-DD`; linter warns once passed).
- Optional `resource:` may point to a canonical external URL (repo, console, dashboard) when one
exists.
- `index.md` files carry NO frontmatter. Sole exception: the bundle root `wiki/index.md` declares
exactly `okf_version: "0.2"`.
## Linking
- Article bodies cross-link with markdown links, bundle-absolute from the wiki root: `[topic
name](/concepts/topic.md)`, `[entity name](/entities/name.md)`. Wikilinks (`[[...]]`) are v0.1
legacy; the linter flags them (double brackets inside code spans, e.g. C++ `[[nodiscard]]`, are
fine).
- Links out of the bundle (immutable sources, artifacts) stay relative:
`[label](../../raw/pack/README.md)`.
- Index files use relative markdown links (`[Title](slug.md)`).
- Link liberally: concepts to concepts, entities to the concepts that mention them, and back. The
linter reports pages with no incoming article links as orphans.
## Change Log
- Append a new entry to `log.md` whenever wiki files are created, updated, split, renamed, or deleted
(including reindex runs).
- Entry format: `## YYYY-MM-DD` header (group same-day edits); beneath it one bullet per change: what
changed plus a one-line why/trigger. Terse bullets; the wiki files are the detail.
- Newest entries at the top. Only append; never rewrite historical entries.
- At ~500 lines, archive older entries to `log-archive.md` grouped by year.
## Verification
- After structural edits (new/renamed/deleted pages, index changes), run the OKF linter from the
Knowledge root. It checks OKF v0.2 conformance: frontmatter validity, required `type`, `generated`
(actor + ISO datetime), `sources`/`verified`/`status`/`stale_after` structure, index.md frontmatter
rules, markdown-link resolution, leftover wikilinks, index coverage, orphan pages, and uncited
top-level `raw/` entries. Errors must be fixed; warnings (orphans, stale `outputs/` pointers, passed
`stale_after`) are review queues.
## Content Rules
- Every page starts (after frontmatter) with a one-paragraph summary.
- `raw/` is IMMUTABLE source material: never modify, delete, move, or rename anything in it. The
wiki's provenance depends on cited raw files staying in place. When new raw sources arrive, update
the relevant concept pages. If raw/ seems to hold junk, propose removal and wait for explicit user
approval; never prune raw/ on your own initiative.
- Never source wiki content from `outputs/`: it is generated working material, possibly stale or
unreviewed. Wiki updates draw on `raw/` sources and existing wiki pages; touch an `outputs/`
subfolder only when the user explicitly names it.
- German content uses formal "Sie". Prose avoids em dashes (use colon, comma, parentheses, or period).
- Prose reads direct and human: concrete verbs, no filler abstractions.
Zwei Dinge halten das Ganze in Ordnung, ohne dass sie im Schema stehen müssten:
Die wichtigste Entscheidung in dem ganzen Aufbau ist keine technische. Es ist die Trennung der Zuständigkeiten. Ich bin für zwei Dinge verantwortlich: was in raw/ liegt, und was ich den Agenten frage. Alles andere macht er. Er pflegt das Wiki: lesen, verdichten, verlinken, Index und Log führen, Linter laufen lassen, Widersprüche melden. Und er arbeitet damit: Analysen, Recherchen, Code, alles aus raw/ und wiki/ heraus nach outputs/. Das Ergebnis liegt in outputs/; das Wiki ist die Grundlage dafür.
Diese Trennung muss scharf bleiben. Sobald ich selbst Wiki-Seiten schreibe, weiß der Agent nicht mehr, welche Aussagen er pflegen darf. Sobald der Agent Quellen aussucht oder löscht, verliert das Wiki seine Grundlage. Und sobald etwas aus outputs/ zurück ins Wiki wandert, ohne durch raw/ zu gehen, zitiert das Wiki sich selbst. Jede Regel im Schema oben lässt sich auf diese drei Grenzen zurückführen.
Eine Notiz-App speichert, was man hineinschreibt. Ein LLM-Wiki hält es aktuell, verknüpft es und weiß, woher es stammt.
Wer das mit Claude Code aufsetzen will, für sich oder im Team, findet Schema-Dateien, Hooks und Review-Workflows als Übungsteil in meiner Claude-Code-Schulung.