LLM Wiki
LLM wiki kit
First committed by tonbistudio
Published in tonbistudio/llm-wiki. Publisher page
271 GitHub stars
What it is
Open-source template for building LLM-powered knowledge bases following Karpathy's LLM Wiki pattern
AutoGineer overview, from the brain’s own files
LLM Wiki is a structured framework designed to turn raw information into a coherent, cross-linked knowledge base. By separating immutable source material from LLM-generated wiki pages, the system ensures that knowledge is synthesized, categorized, and maintained through automated workflows. It leverages a schema-driven approach where an LLM acts as the curator, performing ingestion, querying, and maintenance tasks to keep the knowledge base accurate and interconnected. The system is designed to be domain-agnostic and integrates with tools like Obsidian for visualization and management.
How it works
Memory model: LLM wiki
AutoGineer overview, from the brain’s own files
The system operates by separating raw source documents stored in a dedicated folder from the processed wiki content. Users provide raw files such as articles or notes, and the LLM processes these to generate structured summaries, concept pages, entity definitions, and syntheses. The workflow is governed by a schema that dictates page formats, linking conventions, and maintenance rules. Automated operations include ingesting new sources, querying the knowledge base for synthesized answers, and running health checks to identify orphans, contradictions, or missing links.
| Folder | Role | Files |
|---|---|---|
| raw | raw-sources | 1 |
| wiki | wiki | 6 |
The agent reads
- wiki/index.md evidence: CLAUDE.md
The agent writes
- wiki/ evidence: CLAUDE.md
- raw/ evidence: CLAUDE.md
- wiki/index.md evidence: CLAUDE.md
- wiki/log.md evidence: CLAUDE.md
- wiki/syntheses/ evidence: CLAUDE.md
Requirements
Works with: Claude Code, OpenCode
Set it up
Clone the repository at the commit AutoGineer scanned:
git clone https://github.com/tonbistudio/llm-wiki.git && cd llm-wiki && git checkout 95ddbc264ad1e27ac52e739f41b42386ce5297ddClaude Code reads CLAUDE.md from this folder automatically.
cd llm-wiki && claude
AutoGineer scanned these files at commit 95ddbc2.
First committed by tonbistudio. Published in tonbistudio/llm-wiki. Licence: MIT License.
Usage
AutoGineer overview, from the brain’s own files
- Automating the creation of a structured knowledge base from raw notes
- Maintaining consistency and cross-linking across a large collection of research documents
- Querying a personal or professional knowledge base for synthesized insights with citations
- Performing automated audits to identify gaps or contradictions in stored information
- “ingest raw/my-first-source.txt”
- The LLM reads the source, creates summary, concept, and entity pages, adds cross-links, and updates the index and log.
- “What are the key differences between X and Y?”
- The LLM searches the wiki and synthesizes an answer with citations to specific pages.
- “lint”
- The LLM audits the wiki for orphans, contradictions, and missing links, fixing what it can and reporting the rest.
Documentation by tonbistudio
LLM Wiki
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 everythingThree 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 decksEnhancements
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
CLAUDE.md
[Your Domain] Knowledge Base — Schema
Purpose
<!-- CUSTOMIZE: Replace this with a one-paragraph description of your knowledge domain. -->
<!-- Examples: "machine learning research", "19th-century literature", "competitive landscape for SaaS tools" -->
This is an LLM-maintained knowledge base on [YOUR TOPIC]. The LLM writes and maintains all files under wiki/. The human curates raw sources and directs queries. The human never edits wiki files directly.
Directory Layout
raw/— Immutable source documents (transcripts, articles, notes). Never modify these.wiki/index.md— Master catalog. Every wiki page must appear here.wiki/log.md— Append-only activity log.wiki/summaries/— One summary page per raw source document.wiki/concepts/— Concept, strategy, and framework pages.wiki/entities/— Entity pages (people, tools, organizations, products — whatever "things" exist in your domain).wiki/syntheses/— Comparison tables, decision frameworks, cross-cutting analyses.presentations/(repo root, optional) — slides or other derived material. Keep anything that is not knowledge content OUT ofwiki/—wiki/is the published document set.
File Naming
All lowercase, hyphens for word separation:
concept-name.mdNo spaces, no special characters, no uppercase
Name should match the page title slug
Page Format
Every wiki page uses this frontmatter and structure:
---
title: "Page Title"
type: concept | entity | summary | synthesis
tags: [tag1, tag2, tag3]
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: ["raw/filename.txt"]
confidence: high | medium | low
---Required Sections by Page Type
Summary pages (wiki/summaries/):
## Key Points— Bulleted list of main claims/ideas## Relevant Concepts— Links to concept pages this source touches## Source Metadata— Type of source, author/speaker, date, URL or identifier
Concept pages (wiki/concepts/):
## Definition— One-paragraph plain-English definition## How It Works— Mechanics, process, or structure of the concept## Key Parameters— Important variables, dimensions, or factors## When To Use— Situations and contexts where this concept applies## Risks & Pitfalls— Known failure modes, common mistakes, limitations## Related Concepts— Wiki links to related pages## Sources— Which raw sources inform this page
Entity pages (wiki/entities/):
## Overview— What this entity is## Characteristics— Key properties, attributes, structure## How to Use— Setup commands, config examples, first steps## Related Entities— Links to related entity pages
Synthesis pages (wiki/syntheses/):
## Comparison— Table or structured comparison## Analysis— Cross-cutting insights## Recommendations— When to prefer which approach## Pages Compared— Links to all pages involved
Linking Conventions
Use Obsidian-style wiki links:
[[concepts/concept-name]]Always use relative paths from wiki root
Every page must link to at least one other page (no orphans)
When mentioning a concept that has a page, always link it
Tagging Taxonomy
<!-- CUSTOMIZE: Replace these placeholder categories with tags relevant to your domain. -->
<!-- Each category should have 3-8 specific tags. -->
<!-- Example for a cooking KB: -->
<!-- Cuisine: italian, japanese, french, mexican -->
<!-- Technique: braising, fermenting, sous-vide, grilling -->
<!-- Ingredient: protein, vegetable, grain, dairy -->
Category-A:
tag-1,tag-2,tag-3Category-B:
tag-4,tag-5,tag-6Category-C:
tag-7,tag-8,tag-9Scope:
foundational,advanced,experimentalStatus:
well-established,emerging,speculative
Confidence Levels
high — Well-established idea, multiple corroborating sources, demonstrated with concrete examples
medium — Supported by sources but limited examples or single-source
low — Single mention, anecdotal, or speculative
Workflows
Ingest
When the user says "ingest [source]" or adds a file to raw/:
Read the raw source completely
Create
wiki/summaries/<source-slug>.mdwith full summaryIdentify all concepts, entities, and strategies mentioned
For each concept/entity: create the page if it doesn't exist, or update it with new information if it does
Add cross-links in both directions between all touched pages
Update
wiki/index.md— add new entries, update summaries of changed pagesAppend to
wiki/log.mdwith timestamp, source name, pages created/updatedFlag any contradictions with existing wiki content
Query
When the user asks a question:
Read
wiki/index.mdto find relevant pagesRead those pages
Synthesize an answer citing specific pages with wiki links
If the answer reveals new insight worth preserving:
Create a synthesis page in
wiki/syntheses/Update index and log
Lint
When the user says "lint" or "health check":
Read all wiki pages
Check for: orphan pages (no inbound links), stale claims, contradictions between pages, missing cross-links, incomplete sections, low-confidence pages that could be strengthened
Fix what can be fixed automatically
Report issues that need human judgment
Suggest new sources or topics to investigate
Update log
Rules
Never modify files in
raw/Always update
index.mdandlog.mdafter any wiki changePrefer updating existing pages over creating duplicates
When in doubt about a claim, set confidence to "low" and note the uncertainty
Keep pages focused — one concept per page, split if a page gets too long
Use plain English — define jargon on first use in each page
All dates in ISO 8601 format: YYYY-MM-DD
When a source provides specific examples, include them with concrete details
12 files · 8 not served here
- .gitignore (not served here)
- ATTRIBUTION.md
- CLAUDE.md
- LICENSE
- README.md
- raw/.gitkeep (not served here)
- wiki/concepts/.gitkeep (not served here)
- wiki/entities/.gitkeep (not served here)
- wiki/index.md (not served here)
- wiki/log.md (not served here)
- wiki/summaries/.gitkeep (not served here)
- wiki/syntheses/.gitkeep (not served here)
Advantages
- Automated cross-linking and page creation reduces manual maintenance effort. evidence: README.md
- Maintains a clear separation between immutable source material and synthesized knowledge. evidence: CLAUDE.md
Limitations
- Requires human curation of raw sources as the LLM does not modify them. evidence: README.md
- Relies on the LLM to identify and report contradictions or missing links during linting. evidence: CLAUDE.md
Security
Risk level: No risk found
This brain runs
This brain runs nothing: AutoGineer found no hooks, scripts, plugin code or MCP servers in its files.
Attribution and licence
- First committed by
tonbistudio
- Publisher
- tonbi (Community)
- Source
- tonbistudio/llm-wiki · commit 95ddbc2
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- tonbistudio
AutoGineer is not affiliated with or endorsed by tonbistudio.
Install from source
8 of its files are not served here, so there is no ZIP. tonbistudio/llm-wiki at 95ddbc2