LLM Wiki v3, an AI-first implementation spec for building a persistent memory operating system for agents. Rohit Ghumare's LLM Wiki v3 specification provides a complete implementation blueprint for building a persistent memory operating system for AI agents. The system requires a frontier model to create a structured, verified, claim-linked wiki that tracks atomic assertions with provenance, runs deterministic verification, and maintains operating memory across sessions. The specification defines failure gates that reject incomplete implementations, including requirements for source digests with claims, verified links, and privacy checks. Builds on Andrej Karpathy's LLM Wiki https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f and Rohit Ghumare's LLM Wiki v2 https://gist.github.com/rohitg00/2067ab416f7bbe447c1977edaaa681e2 . This document is self-contained. You do not need to read v1 or v2 first. This document is for a frontier model GPT-5.5, Claude Opus, etc. to implement the full system. The first build defines folder structure, schema, verifier, claims layer, ingest rules, and graph conventions. After the foundation is built, smaller models can maintain it. Substantive foundational changes still need the strongest available model. /goal Build a complete LLM Wiki v3 memory system from this specification. Use a frontier model for the initial implementation. Do not make a demo, sketch, or partial scaffold. Create the full folder structure, domain schema, source digest format, claims layer, index, hot file, log, verifier, graph projection, source delta scanner, privacy checks, autonomy hard gate, silent watchdog, and ingest protocol. Seed the wiki from the user's chosen raw source folder if one is provided. Run verification before reporting completion. If any step cannot be completed, report the blocker and leave the system marked incomplete. The wiki must let an AI agent: - Start every session by reading current operating state. - Ingest sources without losing provenance. - Extract atomic claims that can be audited later. - Promote claims into concepts, entities, procedures, syntheses, decisions, comparisons. - Connect sources, claims, and pages with wikilinks. - Regenerate a graph projection from Markdown files. - Run deterministic verification. - Refuse completion when sources are orphaned, claims unlinked, links broken, or privacy checks fail. - Give the human a clear report of what changed and what still needs judgment. Failure gates: folders + placeholder files only = fail. Source digests without claims or links = fail. Claims of verification without verifier output = fail. Atomic claims. Every assertion is a separate traceable unit with provenance, confidence, and status. Wrong claims get updated without rewriting pages. Retracted sources flag every dependent claim. Deterministic verification. A script returns specific counts. Zero issues = green. Anything else = work not done. Graph projection. Entire wiki projects into a JSON graph optional Kuzu DB . Agents query relationships, trace provenance, find contradictions, walk impact chains without reading every file. MCP access. Local MCP server exposes the graph as query tools for any MCP-compatible agent. Source delta scanning. SHA256 hashes on raw sources detect new, modified, deleted files automatically. Session crystallization. After every meaningful session, save a concise record, extract durable claims, update related pages. Operating memory. Tracks current context, active work, next actions via a hot file read on every session start. The wiki is not a vector database. It is not a notes folder. It is the agent's operating memory — a structured, verified, claim-linked system that compounds knowledge across sessions instead of re-retrieving fragments. Folder of original materials. Agent reads but never modifies. Corrections live in the wiki. SHA256 hash detects changes. raw/ is often a symlink to a Documents folder — the wiki points to files, tracks hashes, doesn't duplicate. Every assertion as a separate claim with: unique ID claim-YYYY-MM-DD-NNN , plain-language statement, confidence high/medium/low , provenance source s , status active/contested/superseded/stale , supersession links. Claims live in claims/active.md , claims/contested.md , claims/superseded.md , claims/low-confidence.md . Claims must NOT be buried inside concept pages. Concepts, entities, comparisons, queries, syntheses, decisions, procedures. Reference claims for provenance. Chain is always walkable: page → claim → source → raw file. SCHEMA, index, hot file, log, taxonomy, graph projection, dashboards, review queue, lint reports. Agent reads SCHEMA + hot first every session. Health is a deterministic script. raw/ — immutable source material sources/ — source digests written by the agent claims/ — atomic assertions- Durable wiki pages concepts, entities, syntheses, comparisons, procedures, queries, decisions - Operating layer schema, index, hot, log, taxonomy, verifier reports, graph projection, dashboards, review queues llm-wiki/ SCHEMA.md index.md hot.md log.md raw/ sessions/ sources/ claims/ active.md contested.md superseded.md low-confidence.md entities/ concepts/ comparisons/ queries/ syntheses/ decisions/ procedures/ templates/ scripts/ meta/ taxonomy.md topic-map.md graph.md review-queue.md open-questions.md source-quality.md raw-binary-index.md source-delta.md source-inbox-deltas.md source-inbox-deltas.state.json lint-reports/ dashboards/ graph-projection/ archive/ Portability rule: foundational upgrades to the wiki operating model belong in this public specification, not only in one local vault. Public documentation must be corpus-neutral: describe patterns and tooling, not private source names, counts, or contents. SCHEMA.md = constitution. hot.md = working state. index.md = root map. log.md = audit trail. claims/ = auditable assertion layer. meta/ = operating system. Every file is plain Markdown. No database. No platform dependency. No lock-in. Index rule: root index.md is the global map. Scoped indexes are allowed for a project folder, domain hub, or workflow-specific entry page only when they serve a different navigation job. They are harmful when they repeat the root index, exist only to satisfy a verifier, or create a second source of truth. Every index must declare its scope and job. Machine inventories and coverage reports belong in meta/ with descriptive names. Domain-specific schema including: domain definition, page types, file naming rules, frontmatter rules, tag taxonomy, claim rules, confidence rules, source quality rules, ingest completion rules, privacy rules, verification requirements. Priority when instructions conflict: user's current instruction first → security/data integrity → verified state → schema. Under 50 lines. Contains: current focus, active source batches, open blockers, next best actions, recent verification state, human decisions needed. Human and agent map of the wiki. Pages listed by type with one-line summaries. Minimum sections: Entities, Concepts, Comparisons, Syntheses, Procedures, Queries, Decisions, Sources. Updated whenever global pages are created, renamed, deleted, or materially changed. Scoped indexes updated when their folder/project/domain/workflow changes. Append-only audit trail. Every meaningful operation gets a dated entry: ingest, update, query, verify, graph, delete, retire, privacy review, source delta scan. Format: "YYYY-MM-DD action | what changed, what files changed, verification run." Be specific. Every durable wiki page must have frontmatter. Concept/entity/synthesis/comparison/procedure/query/decision pages: --- title: Page Title created: YYYY-MM-DD updated: YYYY-MM-DD type: concept | entity | comparison | query | synthesis | decision | procedure category: optional-domain-category tags: sources: claims: confidence: low | medium | high maturity: seed | developing | stable | canonical | stale status: active | contested | superseded | stale | archived supersedes: superseded by: related: --- tags from meta/taxonomy.md . sources references source digests. claims references claim IDs in claims/active.md . Source digests: --- title: Source Title source url: absolute path or URL author: author if known ingested: YYYY-MM-DD sha256: body hash source type: paper | article | book | transcript | documentation | personal-note | webpage | gist | session | other source quality: low | medium | high authoritativeness: primary | secondary | commentary | unknown immutable: true --- sha256 computed over body, not frontmatter. On re-ingest, recompute and compare. Skip if unchanged, flag drift if changed. claim-YYYY-MM-DD-NNN, short claim title - Claim: Plain language atomic claim. - Type: factual | conceptual | procedural | decision | preference | inference - Status: active | contested | superseded | stale | archived - Confidence: low | medium | high - Sources: sources/source-slug - Supports: concepts/page-slug , entities/page-slug - Contradicts: none - Supersedes: none - Superseded by: none - Last confirmed: YYYY-MM-DD - Notes: Limits, caveats, or why this matters. Claims must be atomic — one assertion per claim. Do not turn summaries into claims. high : multiple independent sources support the claim, or one authoritative primary source directly establishes it. medium : one credible source supports it, or several weak sources point the same way. low : inferred, weak, old, contested, unclear, or based on uncertain extraction. Do not mark high just because prose sounds confident. Single-source claims usually start as medium. - Read SCHEMA.md . - Read hot.md . - Read index.md . - Check last 20-30 entries of log.md . - Navigate to relevant pages via index or graph — do not guess or skip. - Drop source into raw/ immutable, never edited after placement . - Write source digest into sources/ . - Extract atomic claims into claims/ . - Update or create concept/entity pages that reference those claims. - Update graph projection, index.md , log.md . - Run verifier — do not report done if it fails. - Read SCHEMA and hot file. - Search index and graph for relevant pages. - Read pages and their claims. - Synthesize answer with citations back to sources. - Mark confidence explicitly. - File as durable query or synthesis page if worth keeping. - Save concise record under sessions/ . - Extract durable claims into claims/ . - Update related concepts, entities, procedures, syntheses. - Update index.md , hot.md , log.md . - Run verifier — fix broken wikilinks, missing frontmatter, orphan pages. - Run graph projection. - Run system health check. - Run source delta scan. - Flag stale claims for review. - Merge duplicate concepts. - Archive superseded pages. Light ingest : raw source + source digest + log entry. Only when user explicitly asks. Status: staged, not complete. Standard ingest : light + update entities/concepts/index/log. Deep ingest default : standard + atomic claims, graph updates, contradiction check, review queue, synthesis. If the user says "ingest this," "add these files," or "process this corpus," perform deep ingest unless the user explicitly says light. A source digest alone is staged evidence, not a completed ingest. - Source digest exists with provenance and hash. - Atomic claims exist, or source explicitly marked non-claim-bearing. - Relevant concept, entity, synthesis, procedure, or decision pages link to the source. - Claims link back to pages they support. index.md , hot.md , log.md , and relevant meta/ files updated.- Graph projection regenerated, orphan detection passes. - Verifier passes. Do not report ingestion complete before all seven gates pass. For large corpora, separate extraction from promotion, but status must remain incomplete until promotion and verification finish. Use language: "Extraction complete, promotion pending." / "Source digests staged, full ingest not complete." / "Orphan detection still pending." Never hide staged status. Parallel extraction creates one dangerous failure mode: each worker produces locally valid claims that become invalid when merged. Worker outputs are temporary staging files, not durable wiki pages. Correct parallel merge: - Assign each worker a non-overlapping claim ID range before extraction, or renumber every staged claim during merge. - Strip worker frontmatter, batch headings, and local indexes before writing to claims/active.md . - Normalize every claim field to canonical labels: Claim , Type , Status , Confidence , Sources , Supports , Contradicts , Supersedes , Superseded by , Last confirmed , Notes . - Normalize every source and support target into wikilinks sources/source-slug , concepts/page-slug , entities/page-slug . - Deduplicate claims by source and assertion, not by claim ID alone. - Rebuild claims: frontmatter list and claims-count from actual claim headings in body order. - Rebuild concept and entity pages from merged claim graph so sources: , claims: , key claim sections, and source coverage sections point to real pages. - Delete temporary batch files after merge and verification. - Regenerate graph projection after merge, not before. - Run hard gate. Not clean = ingest not complete. Do not append batch files directly into claims/active.md . That creates duplicate claim IDs, embedded batch frontmatter, stale field formats, and false graph health. For large or changing source folders, use a promotion worker before full ingest. Packet contents: - Delta summary: added, modified, deleted, uncovered backlog counts. - Selected source paths, normalized relative to wiki no leaked absolute paths . - Per-source readiness labels: text-ready, convertible, transcription-needed, OCR-needed, duplicate, manual-review. - Copy-paste agent prompt restating full ingest gates. - Completion gate: packet not complete until hard gate returns clean. Selection: easiest safe promotion first — extracted text → text-layer docs → OCR-recoverable → media needing transcription → manual-review. Suppress duplicate raw files by content hash. The packet is a work order, not evidence. It becomes useful only after the agent creates/updates digests, extracts claims, wires pages, refreshes operating files, regenerates graph, and passes verification. Fast path: local extraction first, then promotion. Use text extraction for files with text layers, OCR for scanned/image-only docs, ebook conversion for ebook formats, binary index for files that can't be text-extracted archives, media, images, spreadsheets . Tool families: markitdown, OCRmyPDF+Tesseract, Calibre, ripgrep. AI should research exact setup for user's platform. Embeddings are optional — do not block ingestion on vector indexing. - Catalog audio/video in binary index. - Transcribe locally when relevant. - Save transcripts in session/staging area, not in immutable raw. - Create source digests from transcripts only after recording original media path, transcript path, tool family, ASR caveat. - Extract claims from transcript digest. - Link claims into existing pages, or create new durable page when media introduces a central model. - Run hard gate. Do not treat transcription as completion. A transcript is only extracted text. The source is not integrated until claims, links, pages, indexes, graph edges, and verification are clean. Media transcript promotion path validated end to end : Selection. Identify media files from source delta scan. Prioritize by domain relevance. Group into packets of 5-8 files. Local transcription. Run faster whisper base.en, CPU int8 . Save transcripts with timing segments under sessions/transcripts/