Table of Contents
- The Problem With Scattered Notes
- Karpathy's Four-Layer Memory Pattern
- Why Local Markdown Wins
- Git as Version Control for Your Brain
- How to Build Your Own System
- The Real Benefit Nobody Talks About
The Problem With Scattered Notes
Andrej Karpathy stopped using AI to write code in chat windows. Instead, he built a system where Claude writes directly into markdown files that live in a local wiki. No Notion databases. No Obsidian graph views. Just plain text files, version controlled with git, that become smarter over time.
Most developers have this problem: notes scattered across Slack threads, Google Docs, random text files, and half-finished Notion pages. You ask Claude a question, get an answer, close the tab, and lose context forever. Three weeks later you ask the same question again.
Karpathy's system solves this by turning every AI interaction into a permanent artifact. The LLM doesn't just answer questions. It maintains your knowledge base.
Analogy: Traditional note-taking is like shouting questions into a canyon and hoping to remember the echo. Karpathy's system records the echo, indexes it, and plays it back when you need it.
Karpathy's Four-Layer Memory Pattern
The architecture has four core files that work together:
CLAUDE.md: The Instruction Manual
This file lives at the root of your wiki. It tells Claude how to behave, what to write, and where to put things. Think of it as a prompt template that gets prepended to every conversation.
Inside CLAUDE.md you define:
- Your writing style preferences
- File naming conventions
- Where to save different types of content
- What format to use for different outputs
When you start a new Claude conversation, you paste this file first. Now Claude knows the rules.
wiki/index.md: The Directory
This is your table of contents. Every time Claude creates a new file, it updates the index. You get a human-readable list of everything in your knowledge base.
No search required. No database queries. Just scan the index and click a link.
wiki/log.md: The Append-Only Journal
Every significant interaction gets logged here with a timestamp. Questions you asked, problems you solved, insights that emerged. It's not polished documentation, just a running record of what happened.
The log serves two purposes:
- You can grep through it to find when you learned something
- Claude can read it to understand your recent context
morning-briefing.md: The Daily Reset
Each morning, Claude reads yesterday's log and writes a summary. What you worked on, what you learned, what's still open. This becomes your starting point for the day.
You're not re-reading a log file. You're getting a synthesized brief that surfaces what matters.
Why Local Markdown Wins
Notion wants you trapped in their database. Obsidian wants you addicted to backlinks. Both add friction between you and your files.
Local markdown files give you:
Full ownership. The files are yours. No export process, no proprietary format, no sync issues. If the tool dies tomorrow, you still have plain text.
AI script friendly. You can pipe files directly to Claude's API. No web scraping, no copy-paste, no authentication dance. Just read the file and send it.
Zero latency. Opening a markdown file is instant. No loading spinners, no network requests, no database queries. Your editor is already open.
Greppable. Need to find every mention of "RAG" across your notes? grep -r "RAG" wiki/ takes 50 milliseconds. Try doing that in Notion.
Portable. Move your wiki between machines by copying a folder. No sync daemon, no cloud account, no permission settings.
Here's what you lose compared to Notion:
| Feature | Notion | Local Markdown |
|---|---|---|
| Databases | Yes | No |
| Rich embeds | Yes | Limited |
| Team collaboration | Yes | Git-based |
| Mobile apps | Native | Text editor |
| Visual graphs | No | No |
| Search | Good | grep/ripgrep |
| Version history | Basic | Full git |
For solo builders working with AI, the tradeoffs favor local files. You don't need databases. You need fast, scriptable access to your own knowledge.
Git as Version Control for Your Brain
Every time you commit your wiki to git, you snapshot your entire knowledge state. This gives you:
Time travel. What did you know about this topic three months ago? git checkout to that date and read the files. Your past self documented it.
Branching experiments. Testing a new architecture pattern? Create a branch, have Claude write exploration notes, merge back if it works.
Diffable learning. Run git diff on your index file. See exactly what topics you added this week. The diff is a summary of what you learned.
Distributed backup. Push to GitHub, GitLab, or your own server. Your knowledge base now exists in multiple places.
Notion gives you version history for individual pages. Git gives you atomic snapshots of your entire brain.
How to Build Your Own System
Start minimal. Create three files:
- CLAUDE.md at the root
- wiki/index.md as your directory
- wiki/log.md for daily notes
In your CLAUDE.md, write instructions:
You are my knowledge base assistant. When I ask questions:
- Write detailed answers as new .md files in wiki/
- Update wiki/index.md with a link to the new file
- Append a timestamped summary to wiki/log.md
Use clear filenames like: wiki/understanding-rag.md
Format with H2 headers and code blocks where relevant.
Now start a Claude conversation. Paste CLAUDE.md first. Ask a question. Claude will write files.
You just copy the output into the right places. It takes 30 seconds. After a week, you have a wiki. After a month, you have a second brain.
Add the morning briefing later, once your log file has enough content.
The Real Benefit Nobody Talks About
The best part isn't organization. It's that this system forces you to think in artifacts, not conversations.
When you ask Claude a question in a chat window, you get an answer that disappears. When you ask Claude to write a file, you get a permanent document that improves your wiki.
This changes how you prompt. You stop asking, "How do I do X?" and start asking, "Write a guide about X and save it to wiki/guides/x.md."
The LLM becomes a documentation assistant that works for you. Every interaction makes your knowledge base better. After six months, you have a custom reference library written in your voice about your specific problems.
Notion can't do this because it's designed for browsing, not for AI-native workflows. Obsidian can't do this because it adds too much UI between you and your files.
Plain markdown wins because it gets out of your way.
Conclusion
Karpathy's system works because it's simple. Four files, local storage, git for history. No plugins, no databases, no graphs.
If you're building with AI and drowning in scattered notes, try this: create CLAUDE.md and wiki/index.md today. Paste the instruction file at the start of your next Claude conversation. Ask it to write something useful.
You'll have your first artifact in five minutes. That's your second brain, version 0.1. Commit it to git and keep going.
The tools don't matter. The pattern matters. Local markdown files, maintained by AI, version controlled with git. Everything else is optional.