wikis / Agent Workflows / README.md view as markdown
LLM Wiki
๐ค Agent access: /wiki/agent-workflows/llms.txt /wiki/agent-workflows/llms-full.txt /wiki/agent-workflows/index.json
An open-source template for building LLM-powered knowledge bases, following Andrej Karpathy's "LLM Wiki" pattern.
You provide raw sources. The LLM reads them, writes structured wiki pages, cross-links everything, and maintains it over time. You never edit the wiki directly โ you curate sources and ask questions.
How It Works
The system has three layers:
raw/ Sources you collect (articles, transcripts, notes, PDFs)
wiki/ LLM-written & maintained pages (summaries, concepts, entities, syntheses)
CLAUDE.md Schema that tells the LLM how to structure everything
Three operations drive the workflow:
| Operation | Trigger | What happens |
|---|---|---|
| Ingest | "ingest raw/my-source.txt" | LLM reads the source, creates a summary page, creates/updates concept and entity pages, adds cross-links, updates the index and log |
| Query | Ask any question | LLM searches the wiki, synthesizes an answer with citations, optionally creates a synthesis page for novel insights |
| Lint | "lint" or "health check" | LLM audits all pages for orphans, contradictions, missing links, incomplete sections, and low-confidence claims โ fixes what it can, reports the rest |
Quick Start
Clone this repo
git clone https://github.com/YOUR_USERNAME/llm-wiki.git my-knowledge-base cd my-knowledge-baseCustomize CLAUDE.md for your domain
- Update the Purpose section with your topic
- Replace the placeholder tagging taxonomy with your own categories
- Adjust confidence level descriptions if needed
- Everything else (workflows, page formats, linking rules) works as-is
Drop sources into
raw/- Text files, transcripts, articles, notes โ any plain text
- These are immutable once added; the LLM never modifies them
Tell the LLM to ingest
ingest raw/my-first-source.txtThe LLM will create summary pages, concept pages, entity pages, cross-links, and update the index.
Ask questions
What are the key differences between X and Y?The LLM answers from the wiki, citing specific pages.
Run health checks
lintThe LLM audits the wiki and fixes issues.
Directory Structure
.
โโโ CLAUDE.md # Schema โ the LLM's instructions
โโโ raw/ # Your source documents (immutable)
โโโ wiki/
โโโ index.md # Master catalog of all pages
โโโ log.md # Append-only activity log
โโโ dashboard.md # Dataview dashboard (Obsidian)
โโโ analytics.md # Charts View analytics (Obsidian)
โโโ flashcards.md # Spaced repetition cards
โโโ summaries/ # One page per source document
โโโ concepts/ # Concept and framework pages
โโโ entities/ # People, tools, organizations, etc.
โโโ syntheses/ # Cross-cutting analyses and comparisons
โโโ journal/ # Research/session journal entries
โ โโโ template.md # Journal entry template
โโโ presentations/ # Marp slide decks
Enhancements
This template includes several extras beyond the core wiki pattern:
Dataview Dashboard (wiki/dashboard.md)
Live queries that surface low-confidence pages, recent updates, concepts by tag, and pages with the most sources. Requires the Dataview Obsidian plugin.
Charts View Analytics (wiki/analytics.md)
Visual analytics with pie charts, bar charts, and word clouds. Requires the Charts View Obsidian plugin.
Mermaid Diagrams
Use Mermaid code blocks in any wiki page to create flowcharts, sequence diagrams, or concept maps. Native support in Obsidian and GitHub.
Marp Slides (wiki/presentations/)
Create slide decks from markdown using Marp. Drop presentation files in this directory.
Research Journal (wiki/journal/)
Track your research sessions, experiments, or applied work with the included template. The LLM can reference journal entries when answering queries.
Spaced Repetition (wiki/flashcards.md)
Flashcards in the format used by the Spaced Repetition Obsidian plugin. Ask the LLM to generate flashcards from any wiki page.
MCP Server
This repo works with Claude Code's MCP server capabilities. Point an MCP-compatible client at this repo and the LLM can read/write the wiki programmatically.
Customizing for Your Domain
The schema in CLAUDE.md is domain-agnostic. To adapt it:
- Purpose โ Describe your knowledge domain in one paragraph
- Tagging taxonomy โ Replace placeholder categories with your own (e.g., for a cooking KB:
cuisine,technique,ingredient,equipment) - Confidence levels โ Adjust the descriptions to match your domain's evidence standards
- Entity types โ Update the entity page description to match what entities mean in your domain (people, tools, companies, etc.)
- Journal template โ Customize
wiki/journal/template.mdfor your workflow
Everything else โ page format, linking conventions, workflows, rules โ is universal and works across domains.
Example Domains
This template works for any knowledge-intensive topic:
- Research notes โ papers, experiments, methodologies
- Book analysis โ themes, characters, author techniques
- Competitive analysis โ companies, products, market trends
- Course notes โ lectures, readings, key concepts
- Personal development โ frameworks, habits, book summaries
- Technical documentation โ APIs, architectures, design patterns
- Hobby deep-dives โ any subject you want to master
License
MIT
