Your second brain is not a storage system. It is a compiler.
Tung Bui Thanh (MikeDaDev)9 min read

On this page
You have a Notion space, an Obsidian vault or just a folder of Markdown files called "Second Brain". The first few weeks are great: every good article gets clipped, every book gets notes. Three months later the folder is a warehouse. Everything is in there, you cannot remember where anything is, and the last time you opened it was to tidy up out of guilt.
The tool is not the problem. The problem is using the "second brain" as a filing cabinet: store, search, hope you find it. A post spreading on X from @rvaniaaaa names exactly this: a second brain should not be a storage system, it should be a compiler. The original idea comes from Andrej Karpathy's "LLM Wiki" gist from 4 April 2026. This post summarises both, then gets into the parts that are easy to get wrong when you build one yourself.
# storing versus compiling
Think about a library and a compiler.
A library stores and searches. More books make the library bigger, but not smarter: two books that contradict each other sit quietly on different shelves, and nobody tells you.
A compiler turns input into something else. It reads source code, analyses it, links the parts together, reports errors when things conflict, and produces a checked result. Applied to notes: each new document is not just filed away, it is read, its claims are extracted, linked to what you already know, and flagged where it contradicts existing knowledge.
The X post puts it in one line: the library gets bigger over time, the compiler gets smarter.
# why not just use RAG
The most common way to "ask my documents" today is RAG: split documents into chunks, embed them, and for each question retrieve the nearest chunks and hand them to the model. Karpathy points at the weakness in how that works: with RAG, the model rediscovers knowledge from scratch on every question. Ask about a topic today and it stitches five fragments into an answer; ask again tomorrow and it stitches again, sometimes reaching a different conclusion. Nothing accumulates.
LLM Wiki moves the work to a different moment. Instead of processing at question time, the model processes at ingest time: it reads, synthesises and writes interlinked wiki pages. In Karpathy's words, knowledge is "compiled once and then kept current", and the wiki becomes a compounding artifact. At question time the model reads pages that were synthesised in advance, not raw fragments.
That does not mean RAG is dead. For very large or fast-changing corpora you still need search. Karpathy himself says the index-file approach works well at moderate scale, around 100 sources and a few hundred pages, and that larger wikis need a search tool. LLM Wiki fits personal or small-team knowledge, where the value is in the connections rather than the volume.
# a three-layer architecture
Karpathy's gist describes three layers, and the X post implements them almost exactly:
second-brain/
raw/ # source material: articles, meeting notes, PDFs... read-only
wiki/ # written and owned entirely by the LLM
index.md # catalogue the model reads first when answering
log.md # append-only log: every ingest, query and lint
llm-wiki.md
rag.md
...
CLAUDE.md # the "schema": structure rules and workflows- Raw: the sources, immutable. The model reads them but never edits them, so you can always check back against the original.
- Wiki: Markdown pages the model writes and maintains. You read them, and rarely edit them yourself.
- Schema: a file such as
CLAUDE.mdorAGENTS.mdthat defines how the wiki is organised and what each operation must do. Karpathy calls it the key configuration file.
Three operations run on top:
- Ingest: read a new source, write a summary page, update the index and related concept pages, append a line to the log. Karpathy estimates one source can touch 10 to 15 wiki pages, and he prefers ingesting one at a time so he can follow along.
- Query: the model reads the index, opens the relevant pages and writes an answer with citations. Good answers can be filed back as new pages. This is where the wiki learns from how you use it.
- Lint: look for contradictions, stale claims, orphan pages and missing links.
A small but nice detail: the log uses a fixed prefix such as ## [2026-11-21] ingest | Article title, so a plain grep tells you what the wiki ingested and when.
# why second brains die after three months
The X post states the reason plainly: maintenance cost. A personal wiki is only useful if it stays tidy: links correct, old pages updated, duplicates merged. That takes time every week, and people give up because it never feels like producing anything.
LLM Wiki moves that maintenance to the model. You keep the pleasant part, choosing what is worth reading and dropping it into raw/. Writing, linking and spotting contradictions is the model's job. That is why the idea spread so fast: it targets exactly what makes most note systems fail.
The X post also describes a daily task: the model processes new files in raw/, flags stale pages and writes a short brief of what changed. In the morning you read that brief like a newsletter from your own knowledge base.
# do not leave all the checking to the model
This is what I would add. A lint step that relies only on the model rereading the whole wiki is both expensive and inconsistent: today it notices an orphan page, tomorrow it misses one. Whatever a machine can check should be checked by code, leaving the model only the parts that need judgement (contradictions in content, outdated claims).
The script below checks the three most common structural problems: [[...]] links to pages that do not exist, orphan pages nothing links to, and pages missing from index.md. I ran it on a sample wiki.
#!/usr/bin/env python3
"""Lint an LLM wiki: broken [[links]], orphan pages, pages missing from index.md."""
import re
import sys
from pathlib import Path
wiki = Path(sys.argv[1] if len(sys.argv) > 1 else "wiki")
pages = {p.stem: p for p in wiki.glob("*.md")}
links = {name: set(re.findall(r"\[\[([^\]|#]+)", p.read_text())) for name, p in pages.items()}
index = links.get("index", set())
broken = sorted((src, dst) for src, dsts in links.items() for dst in dsts if dst not in pages)
linked_to = {dst for dsts in links.values() for dst in dsts}
orphans = sorted(n for n in pages if n not in linked_to and n not in ("index", "log"))
unindexed = sorted(n for n in pages if n not in index and n not in ("index", "log"))
for src, dst in broken:
print(f"broken link: {src}.md -> [[{dst}]]")
for n in orphans:
print(f"orphan page: {n}.md (nothing links to it)")
for n in unindexed:
print(f"not in index: {n}.md")
sys.exit(1 if broken or orphans or unindexed else 0)On a sample wiki with one page linking to a missing [[context-engineering]] and an old draft nothing links to, it prints exactly three lines and exits with 1:
broken link: llm-wiki.md -> [[context-engineering]]
orphan page: old-draft.md (nothing links to it)
not in index: old-draft.mdAdd a rule to CLAUDE.md: "after every ingest, run python3 lint_wiki.py wiki and fix every error before finishing". The model fixes broken links and adds pages to the index, and you have a deterministic check you can trust.
# the honest part
The X post has a section called "the honest part", and I agree with all three points in it:
- The wiki is never better than its sources. Fill
raw/with things you skimmed and the wiki becomes a summary of things you skimmed. - The value shows up after about 50 to 100 well-compiled sources. In the first week it will not feel much better than a notes folder.
- You need an agent that can work on files and on a schedule. The original uses Claude Desktop on a paid plan, because scheduled tasks and file access are not on the free tier. Claude Code, Codex or any agent that can read and write a folder works too.
Two points of my own. First, keeping raw/ immutable is mandatory: the model getting a summary wrong is normal, and you only catch it if the original is still there to compare against. Second, put the whole folder in git: a model-written wiki without history means a bad ingest can wipe good notes without you noticing. Karpathy also describes the wiki as simply "a git repo of markdown files".
# how to start
If you want to try it this weekend, this is the order I would follow:
- Create
raw/,wiki/and aCLAUDE.md. Paste Karpathy's gist into your agent and have it interview you, one question at a time, to write aCLAUDE.mdthat fits your needs. The X post does exactly this. - Pick one narrow topic you are actually learning, drop 5 to 10 good sources into
raw/, ingest them one at a time and read carefully what the model writes. - Add the lint script above to the workflow. Only turn on the daily task once that feels solid.
The X post closes with "Retrieval answers questions. Compilation builds understanding." For a personal knowledge base, I think the second is what we actually want.
For more on RAG and its agentic variants, see Agentic RAG and Graph RAG.
References:
- Andrej Karpathy: llm-wiki.md (gist, April 2026)
- @rvaniaaaa: The Second Brain Is Not a Storage System. It's a Compiler.
- Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020)
Just personal notes, shared in the hope they are useful. If you found this helpful, feel free to pass it on to your friends and colleagues!
Happy coding ๐ ๐๐ป ๐ ๐ฅ.