llm-wiki-seed
Seed/template for AI-native LLM wikis: an Obsidian vault + agent-agnostic AGENTS.md, based on Karpathy's LLM Wiki pattern
llm-wiki-seed
A seed for AI-native knowledge bases: a Git repo that is at once an Obsidian vault, an LLM-maintained wiki, and a set of agent-agnostic instructions (AGENTS.md) that any coding agent — Claude Code, Codex, Gemini CLI, Cursor, Copilot, … — can pick up and run.
It implements Andrej Karpathy's LLM Wiki pattern as infrastructure only: structure, conventions, workflows, templates, a linter and a tiny demo. Every actual wiki (work, personal, a research topic…) is its own repo created from this seed, and can pull infrastructure updates later.
llm-wiki-seed (this repo: infrastructure only)
/ | \
work-wiki personal-wiki research-x-wiki ← separate repos, own content
The idea in 30 seconds
Instead of re-reading raw documents on every question (RAG), an agent compiles sources into interlinked Markdown pages and keeps them current. You curate sources and ask questions; the agent summarizes, cross-links, files, flags contradictions and keeps everything consistent. Good answers get filed back as pages, so the wiki compounds.
| Layer | Path | Owner |
|---|---|---|
| Raw sources (immutable) | raw/ | you |
| The wiki | wiki/ | the agent |
| Schema / instructions | AGENTS.md + PURPOSE.md | seed + you |
Three operations: ingest a source, query the wiki, lint it.
Quick start
-
Create a repo from the seed — on GitHub: Use this template → Create a new repository (make it private). Or:
gh repo create my-wiki --private --clone --template M1F1/llm-wiki-seed -
Initialize it — removes the demo, writes blank
PURPOSE.md,README.md, index, log and overview:scripts/init.sh --name "My Wiki" --language English --seed-url https://github.com/M1F1/llm-wiki-seed -
Fill in
PURPOSE.md— scope, audience, language, privacy. Or let your agent interview you: "interview me and fill in PURPOSE.md". -
Open the folder in Obsidian — Open folder as vault. Settings are included.
-
Feed it — drop files into
raw/, start your agent in the repo root, and say "ingest raw/2026-10-26-some-article.md". Then ask questions. Run "lint the wiki" now and then.
No dependencies beyond git, bash and python3.
Repository layout
.
├── AGENTS.md # the operating manual for every agent (seed-managed)
├── CLAUDE.md, GEMINI.md # one-line pointers: import AGENTS.md + PURPOSE.md
├── PURPOSE.md # this wiki's scope, language, privacy, overrides (yours)
├── workflows/ # ingest.md, query.md, lint.md — step-by-step procedures
├── templates/ # page templates (also used by Obsidian's Templates plugin)
├── raw/ # immutable sources; images in raw/assets/
├── wiki/
│ ├── index.md # catalog of every page
│ ├── log.md # append-only operation log: ## [YYYY-MM-DD] op | subject
│ ├── overview.md # top-level synthesis
│ ├── sources/ entities/ concepts/ syntheses/
├── scripts/
│ ├── wiki_lint.py # structural checks (stdlib Python)
│ ├── init.sh # turn a copy of the seed into an empty wiki
│ ├── update-from-seed.sh# pull new seed-managed files into an existing wiki
│ └── skeleton/ # blank files used by init.sh
├── .claude/skills/ # thin Claude Code skills wrapping the workflows
├── .obsidian/ # minimal vault config (templates, attachments, graph colors)
├── .github/workflows/ # runs the linter on push / PR
└── .seed-manifest # which paths belong to the seed
Agent support
AGENTS.md is the single source of truth. Everything else just points at it.
| Agent | How it finds the instructions |
|---|---|
| Codex, Cursor, GitHub Copilot, Jules, Amp, … | read AGENTS.md natively |
| Claude Code | CLAUDE.md imports @AGENTS.md and @PURPOSE.md; skills wiki-ingest, wiki-query, wiki-lint |
| Gemini CLI | GEMINI.md imports @AGENTS.md and @PURPOSE.md |
| Anything else | tell it: "Read AGENTS.md and follow it." |
Seed vs. instance
Paths in .seed-manifest (AGENTS.md, pointers, workflows/, templates/, scripts/, .claude/skills/, the CI workflow) belong to the seed. Don't customize them in a wiki — put local rules in PURPOSE.md, which overrides AGENTS.md.
Everything else (PURPOSE.md, README.md, raw/, wiki/, .obsidian/, .gitignore) belongs to the wiki and is never touched by updates.
To pull improvements from the seed into an existing wiki:
scripts/update-from-seed.sh
It fetches the seed (URL from .seed), overwrites only the seed-managed paths, and stages the result for you to review and commit.
Several wikis, kept apart
Create one repo per context — e.g. work-wiki in your employer's GitHub org and personal-wiki in your own account — each from the seed and each with its own PURPOSE.md. They share infrastructure, never content. For sensitive sources, set Privacy in PURPOSE.md and uncomment the raw/ rules in .gitignore to keep originals out of git.
Customizing a wiki
- Extra page types (decisions, meetings, people, …): add rows to the table in
PURPOSE.md→ Extra page types. The linter and agents pick them up. - Language: pages can be in any language; filenames stay English kebab-case.
- Optional Obsidian plugins that pair well: Dataview (queries over frontmatter), Marp (slides from answers), Web Clipper (save pages straight into
raw/). None are required.
Linter
python3 scripts/wiki_lint.py # report
python3 scripts/wiki_lint.py --json # for agents and tools
python3 scripts/wiki_lint.py --strict # warnings fail too
Checks: frontmatter and types, broken [[links]], pages missing from the index, orphans, ambiguous filenames, invalid source_path, and raw files not yet ingested (your ingest queue).
The demo
This repo is itself a tiny working wiki about the LLM wiki pattern: one source in raw/, five pages in wiki/, with index and log entries. Open it in Obsidian to see what an ingest produces. Every demo file is marked seed-example: true and scripts/init.sh removes it.
License
The seed is MIT-licensed (LICENSE). scripts/init.sh removes that file from new wikis — your wiki's content is yours to license, or not.
Improving the seed
Change things here (in the seed repo), keep the demo passing python3 scripts/wiki_lint.py --strict, and run scripts/update-from-seed.sh in each wiki to roll the change out.
How to Install
- Download the ZIP or clone the repository
- Open the folder as a vault in Obsidian (File → Open Vault)
- Obsidian will prompt you to install required plugins
Stats
Stars
0
Forks
0
License
MIT
Last updated 1mo ago