A self-maintaining personal knowledge base. Markdown files in folders. No plugins, no vector DB, no Obsidian.
The pattern is from Andrej Karpathy's gist (April 2026). His own wiki on a single topic is now 100+ articles, 400K words, all maintained by an LLM.
This guide walks you through building one in 10 minutes using Claude Code.
mkdir my-wiki && cd my-wiki
mkdir raw wiki outputs
touch wiki/index.md wiki/log.md CLAUDE.md
You should have:
my-wiki/
├── CLAUDE.md # the rules — what conventions the LLM follows
├── raw/ # original source material (you drop things here)
├── wiki/ # LLM-generated pages (the actual knowledge base)
│ ├── index.md # catalog of every page
│ └── log.md # append-only ingest log
└── outputs/ # query results — the LLM writes answers here
That's the whole architecture. Three folders, one schema file, two special files.
This is the most important file. It tells the LLM how to think about your wiki — what page format to use, when to create new pages vs update existing ones, how to cite sources, what operations exist.
Open CLAUDE.md and paste in your conventions. Mine looks like this (adapt to your domain):
# Knowledge Base — Schema & Conventions
This is a Karpathy-style LLM wiki. Markdown files in folders. No plugins.
## Folder Layout
- raw/ — immutable source material I drop in
- wiki/ — LLM-generated pages, the knowledge base itself
- wiki/index.md — catalog of every page
- wiki/log.md — append-only ingest log
- outputs/ — query results
## Page Format
Every wiki page follows this structure:
---
title: <Page Title>
type: <topic | entity | observation>
created: <YYYY-MM-DD>
updated: <YYYY-MM-DD>
sources: [raw/<filename>]
---
# <Title>
## Summary
One paragraph.
## Key Claims
- Claim 1 (source: raw/<filename>)
- Claim 2 (source: raw/<filename>)
## Related
- [[other-page]]
- Filenames are kebab-case
- Use [[wiki-link]] for cross-references
- Always cite the raw source for every claim
## Operations
**Ingest** — when I say "ingest raw/<file>":
1. Read the raw file fully
2. Identify topics, entities, and observations
3. Create new pages OR update existing ones (check index.md first)
4. Update index.md with new entries
5. Append an entry to log.md
**Query** — when I ask a question:
1. Read index.md first
2. Drill into relevant pages
3. Synthesize an answer with [[wiki-link]] citations
4. Write the result to outputs/YYYY-MM-DD-<slug>.md
**Lint** — when I say "lint the wiki":
1. Check for orphan pages (not in index)
2. Check for broken [[links]]
3. Flag stale claims and contradictions
4. Write findings to outputs/YYYY-MM-DD-lint.md
## Principles
- Markdown only
- Cite everything
- Update over duplicate
- One concept per page
- The index is the brain — read it first
Adapt the page format and operations to your domain. The point is to write down YOUR conventions clearly enough that the LLM can follow them every time.