The Five Operations in Depth
- Trace the complete six-step ingest flow and explain why a single source can touch 5 to 15 wiki pages simultaneously
- Explain the save-that workflow and why filing query answers back as wiki pages is central to the compounding effect
- Describe the six checks the Dream Sequence runs in order and explain what it does with each type of issue it finds
- State the self-improving rule and explain why it must be written into CLAUDE.md to be reliably followed
Operation 1: Ingest
Ingest is the most frequent operation. Trigger it by saying "add this" with a URL, pasted text, or the name of a file you have dropped into raw/.
The full ingest flow:
- Save the raw source untouched into
raw/— never edited, always the source of truth - Extract key points and discuss notable takeaways
- Write or update the relevant page(s) in
raw/pages/— a single source might touch 5 to 15 pages - Update
wiki/index.mdwith links to any new or significantly updated pages - Append a line to
wiki/log.md:## [YYYY-MM-DD] ingest - source title - Record the source filename in
wiki/processed.md
The step most people underestimate is step 3. A single article about productivity might update pages on time management, tools you track, habits you follow, and a comparison page you have been building. This is how the wiki grows richer faster than any manual system could — one source, many pages updated simultaneously.
Karpathy prefers to ingest one source at a time and stay involved: reading the summaries, checking the updates, guiding what to emphasize. You can also batch-ingest many sources with less supervision. Develop the workflow that fits your style and document it in CLAUDE.md.
Operation 2: Query (and the Save-That Workflow)
Query is how you get value back. Ask any question about what you have ingested:
What do I know about the tradeoffs between RAG and persistent wiki approaches?
Claude searches the wiki pages, reads the relevant ones, and synthesizes an answer with citations pointing to the source pages. Unlike a web search, the answer draws on your curated knowledge, not the general internet.
The powerful addition is the save-that workflow. When you get a good answer — a synthesis, a comparison, an insight you worked through together — say:
save that
Claude files the answer back as a new page in raw/pages/, updates wiki/index.md, and logs it. Your explorations compound in the knowledge base just like ingested sources do. Over time, your query history becomes part of the knowledge base itself — the analyses and syntheses you found valuable are preserved as first-class pages.
Operation 3: Dream Sequence
The Dream Sequence is the lint and health check for the wiki. Trigger it manually ("run dream sequence") or let the weekly schedule handle it. It runs in order:
- Ingest new files: Compare raw/ against processed.md. Ingest any files not yet listed. This is why dropping files in raw/ anytime is safe — they are picked up on the next Dream Sequence.
- Find contradictions: Look for pages that make conflicting claims. Flag them or reconcile based on which source is more recent or authoritative.
- Find stale claims: Identify claims that newer sources have superseded and update them.
- Find orphan pages: Pages in raw/pages/ with no inbound links from index.md or other pages. Either add links to them or flag them for removal.
- Find gaps: Important concepts mentioned across pages but lacking their own page. Create stub pages for them.
- Log the results: Append a summary line to log.md.
At small scale, the Dream Sequence runs in minutes. At larger scale — 100 or more sources — it becomes more valuable. The kinds of contradictions and orphan pages it catches are ones you would never notice manually.
Operation 4: Index and Log
These are not separate triggers — they are maintenance steps embedded in every other operation.
index.md is the table of contents, organized by category. Claude updates it on every ingest and after every Dream Sequence. At query time, Claude reads the index first to find relevant pages, then drills into them. This approach works well up to about 100 sources and a few hundred pages without any search infrastructure.
log.md is chronological and append-only. Every operation gets a line:
## [2026-06-25] ingest - Karpathy LLM Wiki gist
## [2026-06-26] query - Comparison of RAG vs wiki saved as page
## [2026-06-30] dream - Weekly check, 3 orphan pages resolved, 1 contradiction flagged
## [2026-07-01] session - Product strategy discussion, 4 takeaways saved
The log is grep-parseable: grep "^## [" wiki/log.md | tail -10 gives you the last 10 operations. Claude reads the recent log at the start of each session to understand what has been done recently — this is part of why the log format matters.
Operation 5: Session Capture
The most underused operation. At the end of any substantive Claude conversation — whether about the knowledge base or anything else — say:
save this session
Claude appends the key takeaways to raw/session-notes/ as a dated markdown file and logs the entry. Things you worked through in conversation, insights you articulated, decisions you made — all of it enters the knowledge base rather than disappearing into chat history.
This matters because the most valuable thinking often happens in conversation, not in articles you read. Session Capture makes your own reasoning a first-class input to the knowledge base.
The Self-Improving Rule
One rule governs all five operations: every ingest and every valuable query must update a page in raw/pages/ AND append to wiki/log.md. This write-back is what makes the system self-improving. If an operation runs but writes nothing back, knowledge is lost. If this rule is followed consistently, the wiki gets richer with every interaction — whether or not you are consciously trying to improve it.
Put this rule in your CLAUDE.md so it is applied in every session, not just when you remember to ask.
- Ingest runs six steps: save raw, extract key points, update wiki pages, update index, append to log, record in processed.md — all six must happen for the self-improving rule to hold
- The save-that command files a query answer as a new wiki page — your own analysis and synthesis compounds in the knowledge base alongside external sources
- The Dream Sequence checks six things in order: new files, contradictions, stale claims, orphan pages, gaps, then logs results. It is safe to run repeatedly because processed.md prevents re-ingestion
- Session Capture makes your own conversation takeaways a first-class input — the most valuable insights often happen in chat, not in articles you read