AGENTS.md — A personal LLM Wiki contract for Obsidian vaults. Inspired by Karpathy's LLM Wiki idea. A developer has created AGENTS.md, a structured file that serves as an operating contract for LLMs working within Obsidian vaults. Inspired by Andrej Karpathy's LLM Wiki concept, the system defines a persistent knowledge base where an LLM ingests immutable raw sources and maintains a living wiki of linked knowledge pages, entities, concepts, and queries. The project enforces strict rules for file organization, naming conventions, and provenance tracking to ensure the LLM compounds knowledge over time rather than re-deriving context on every prompt. Inspired by Karpathy's LLM Wiki idea — a persistent knowledge base maintained by LLMs that compounds over time instead of re-deriving context on every prompt. This file is the operating contract for this vault. Every session, read it first. Every workflow, follow it exactly. When in doubt, check here before acting. A personal Obsidian vault where an LLM ingests sources, extracts knowledge, connects concepts, and maintains a wiki that grows with you. Raw sources stay immutable; the wiki layer is the living, linked knowledge. vault/ ├── AGENTS.md ← this file; schema and operating contract ├── index.md ← content catalog; update on every ingest ├── log.md ← append-only session log ├── raw/ ← immutable source captures never modify └── wiki/ ← LLM-maintained knowledge pages ├── overview.md ← evolving high-level synthesis ├── sources/ ← one summary page per raw source ├── entities/ ← people, orgs, tools, projects, books ├── concepts/ ← ideas, frameworks, patterns, terms └── queries/ ← saved answers to notable questions Rules: raw/ is read-only. Never edit, rename, or delete captured sources. wiki/ is fully LLM-owned. Create, edit, reorganize, and link freely. index.md and log.md live at the vault root. Every wiki page uses this structure: --- title: Human-readable Title type: source | entity | concept | query | overview sources: source-slug-1, source-slug-2 updated: YYYY-MM-DD --- Title One-sentence summary. Content ... Related - page-name — why it's related Naming: - Filenames: kebab-case.md - One canonical page per thing — search before creating to avoid duplicates. - Use Obsidian wiki links matching the target filename without .md . Provenance fields add only when they apply : sources — which source pages this knowledge derives from raw paths — paths to raw evidence files canonical ref — stable external reference URL, DOI, etc. captured at — date the source was captured - Treat raw/ as immutable evidence. Once captured, never edit in place. - If a source changes or a better capture is needed, add a new dated file. - Preserve enough context for trust and reproducibility without hoarding. - For web sources, save as raw/YYYY-MM-DD-slug.md . - For repos, save only the README/key docs — not full clones. Triggered when a new source arrives file in raw/ , pasted content, or URL . Read the source in full. Discuss with the user: key takeaways, what to emphasize, what surprised them. Write a source summary page in wiki/sources/ . Create or update entity pages for significant people, tools, projects, orgs. Create or update concept pages for major ideas, patterns, and frameworks. Update to reflect what this source adds or challenges. wiki/overview.md Update with new pages. index.md Append to : log.md YYYY-MM-DD ingest | Source Title Report to the user: pages created, pages updated, contradictions found. Triggered when the user asks a question. - Read index.md to find relevant pages. - Read relevant wiki pages and their cited evidence. - Synthesize an answer with inline citations . - If the answer is worth revisiting: offer to save it in wiki/queries/ . - Append to log.md : YYYY-MM-DD query | Question summary Triggered on request. Check for and report: - Contradictions between pages with quotes and sources - Stale claims superseded by newer sources - Orphan pages no inbound links - Important concepts mentioned but lacking their own page - Missing cross-references A mentions B but doesn't link - Data gaps: claims that could be verified with a web search - Provenance gaps: wiki claims without traceable sources After reporting, ask: "Should I fix any of these now?" Append to log.md : YYYY-MM-DD lint | N issues found index.md is a scannable catalog, not a narrative. Sections in order: Overview Sources newest first Entities alphabetical Concepts alphabetical Queries newest first Entry format: - page-name — one-line description log.md is append-only. Never rewrite past entries. YYYY-MM-DD