Karpathy described the idea. This is the exact implementation — the folder structure, the schema file, the session prompts, and a domain starter kit for practitioners who build with AI and can't afford to re-explain their domain every time they open a new session.
Part II — Read Part I first: 16 Million Views for a Folder StructureIf you have spent years in your field — insurance, legal, finance, healthcare, manufacturing, logistics — and are now building with AI, you have the same problem I had for two years without naming it.
Every time you open a new Claude session you re-explain the same things. If you work in insurance: IRDAI regulations, how commission structures work, what a bordereaux is, the difference between co-insurance and co-share. If you work in finance or accounting: the treatment of deferred tax, how a specific section of the Income Tax Act applies, how your client's holding structure affects their capital gains position, the particular way your firm classifies provisions.
You have explained all of this dozens of times. Each time from scratch. Each time to an AI that forgets the moment the session closes.
The LLM Wiki solves this. Your domain expertise — 25 years of it, or 10, or 5 — gets compiled once into a structured knowledge base that an AI agent builds and maintains. Every session starts from where the last one left off. Your knowledge compounds instead of evaporating.
"The domain expertise I have spent 25 years building should not be re-explained to an AI every time I start a new session. It should live somewhere that gets richer every time I use it."
This implementation requires a laptop and a text editor. The folder structure lives on your machine. You manage it through Claude sessions. There is no app to install, no SaaS to subscribe to, no complex setup. But it does require you to maintain a folder on your computer and commit to a habit.
If you start and abandon it, you get nothing. If you use it consistently — even one ingest session per week — it compounds into something genuinely valuable within a month.
your-wiki/ │ ├──CLAUDE.md # The schema — Claude reads this first, every session │ ├──raw/ # Layer 1: YOUR sources. Never modified by Claude. │ ├──insurance/ # IRDAI circulars, product docs, regulatory notes │ ├──ai-builds/ # Patterns, learnings, architecture notes │ ├──india-economy/ # RBI bulletins, MoSPI data, research papers │ ├──leadership/ # Articles, books, observations │ └──startups/ # Market research, competitor notes │ └──wiki/ # Layer 2: Claude owns this entirely. You read it. ├──index.md # Master catalog — Claude reads this first on every query ├──log.md # Append-only activity record — never delete entries ├──overview.md # High-level synthesis of everything in the wiki │ ├──concepts/ # Topic pages: IRDAI, KV cache, commission structures... ├──entities/ # People, organisations, products, regulators ├──sources/ # One page per ingested document ├──builds/ # One page per active build project └──comparisons/ # Filed from good query sessions
Your curated source documents. PDFs, markdown files, text notes, regulatory circulars, product manuals, anything you want Claude to learn from. These are sacred — Claude reads from them but never touches them. This is your ground truth. When a source becomes outdated, you replace it here.
A directory of interconnected markdown files. Claude creates and maintains every file in here. You read it. You never write to it directly. When Claude ingests a source from raw/, it creates a summary page in wiki/sources/, updates the relevant concept and entity pages, and logs the activity in wiki/log.md. The wiki grows with every session.
A document that tells Claude how the wiki is structured and what rules to follow across every session. Without it, Claude is a chatbot with file access. With it, Claude becomes a disciplined wiki maintainer that follows consistent conventions whether the session is today or three months from now. You and Claude co-evolve this file over time.
This is a complete, ready-to-use prompt. Customise the bracketed sections for your domain and active projects. Everything else can be used as written.
I want to build my LLM Wiki — a persistent knowledge base
that you build and maintain across sessions so my domain
expertise compounds instead of evaporating.
MY DOMAIN AND CONTEXT:
[Replace this with your background — your industry, your
years of experience, the specific domain knowledge you have
that you keep re-explaining to AI. Be specific. E.g.:
"25+ years in Indian insurance — underwriting, IRDAI regulation,
broker operations, motor tariff, health and life products,
commission structures. Also building automation on Google
Workspace, Apps Script, Claude API, Copilot Studio."
OR
"CA with 15 years practice — Income Tax, GST, audit,
corporate restructuring. Client base: SMEs and HNIs.
Building client reporting automation on Google Workspace."]
MY ACTIVE BUILD PROJECTS:
[List your current projects. E.g.:
- CALIBER: multi-tenant SaaS for insurance brokers
- CaliberPO: commission management system
- GAPLMB IOMS: agricultural market system for Goa APMC
- QBE automation: Copilot Studio workflows]
TASK 1 — Create CLAUDE.md with these rules:
You follow these rules in every session with this wiki:
1. START: Always read wiki/index.md before answering
any question. If index.md doesn't exist yet, say so.
2. INGEST: When I say "Ingest [filename]":
- Read the source file from raw/
- Discuss 3-5 key takeaways with me
- Create wiki/sources/[name].md with a structured summary
- Update all relevant wiki/concepts/ and wiki/entities/ pages
- Update wiki/index.md with the new page
- Append an entry to wiki/log.md
- Tell me which pages were created or updated
3. QUERY: When I ask any question:
- Read wiki/index.md to find relevant pages
- Drill into those pages before answering
- Cite which wiki pages you used with [[wiki-links]]
- Offer to file a good answer as a new wiki page
4. LINT: When I say "Lint the wiki":
- Find contradictions between pages
- Flag stale claims that new sources may have superseded
- List orphan pages with no incoming links
- List concepts mentioned but lacking their own page
- Suggest 3 questions worth investigating next
5. UPDATE BUILD: When I say "Update build [project name]":
- Update wiki/builds/[project].md with current status,
last decision made, next action, open questions
6. FILE FORMAT for all wiki pages:
---
title: [Page title]
last-updated: [Date]
related: [[page-name]], [[page-name]]
---
[Content in plain prose. Use [[wiki-links]] to
reference other pages. One topic per page.
Keep pages under 500 words — link out rather
than expand.]
7. NEVER modify anything in raw/
8. NEVER delete from wiki/log.md — only append
9. Keep wiki/index.md current after every operation
TASK 2 — Create the full folder structure:
- raw/ with subfolders for my domains above
- wiki/ with index.md, log.md, overview.md as empty
scaffolds ready to receive content
- wiki/concepts/, wiki/entities/, wiki/sources/,
wiki/builds/, wiki/comparisons/ as empty folders
- wiki/builds/ pages for each of my active projects above
TASK 3 — Show me the complete CLAUDE.md content
first for my approval before creating anything else.
Start with Task 3.
Claude reads the source, discusses takeaways, creates a summary page, updates concept and entity pages, updates index and log. Run after adding any new source to raw/.
Claude reads index.md first, drills into relevant pages, answers with wiki citations. Good answers get filed back as new wiki pages. Your questions compound the wiki too.
Claude finds contradictions, stale claims, orphan pages, concepts without pages, and suggests next questions. Run monthly as the wiki grows. Keeps the wiki honest.
One additional command worth adding to your practice: Update build [project name] — run this at the end of any build session to keep wiki/builds/ current. Your project state compounds alongside your domain knowledge.
The hardest part of starting a wiki is knowing what to put in first. The answer is: the things you have explained to AI most often. Start there. What did you explain in your last three sessions that you will have to explain again next week?
The wiki lives in Claude's context window during each session. Keep CLAUDE.md concise — under 500 words. Keep wiki/index.md clean and well-organised — Claude reads it first on every query. A bloated index slows everything down.
The wiki is not an archive. It is a working knowledge base. Keep pages focused, under 500 words each, and link out rather than expand. Depth is in the links, not in the page length.
When Karpathy posted his Gist, engineers recognised a technical problem being solved. The stateless problem. The re-derivation problem. The lack of accumulation. They starred it and forked it within days.
The citizen developer's version of the same recognition is different. You don't think in terms of context windows and KV caches. You think in terms of the conversation you had last Tuesday where you spent forty minutes explaining how motor insurance endorsements work — or how a specific tax provision applies to your client's structure — and the conversation you will have again next Tuesday where you start from the same blank slate.
The LLM Wiki is not primarily a technical tool. It is a domain expertise preservation tool. The engineer's advantage is that they can configure it in an afternoon. The citizen developer's advantage is that they have something genuinely worth putting in it. Domain expertise accumulated over years — the kind that takes twenty minutes to explain to a generalist and twenty seconds to explain to someone who has been in the room for a decade.
You have been in the room for a decade. The wiki is how you stop explaining it from scratch and start building on it instead.
The prompt above is designed so you can paste it, fill in two sections, and have a working wiki structure in under an hour. The CLAUDE.md schema handles everything Claude needs to know. The folder structure handles everything you need to maintain. The three commands — Ingest, Query, Lint — are the only habit you need to build.
Start with ten sources. One ingest session. Ask one question. File one answer. That is the whole thing. The compounding handles itself from there.
Karpathy's original instruction. The prompt above is the pattern. Your Claude session is the LLM. Your domain expertise is what makes it worth building.
Start with one domain. Ten sources. One session a week. In a month you will have a knowledge base that took years to accumulate — and zero minutes to re-explain.
The compounding starts the moment you run the first ingest.