LLM Wiki on IWE: Karpathy's pattern with deterministic lint, link-safe refactoring and an IDE that edits in place A developer released IWE, an open-source (Apache-2.0) CLI, MCP server and LSP for markdown folders, as a concrete implementation of Andrej Karpathy's LLM Wiki pattern. The fork replaces LLM-remembered bookkeeping with deterministic commands: `iwe schema validate` checks pages against frontmatter schemas, `iwe stats` lists orphan pages, `iwe rename` rewrites references to keep links intact, and `iwe find` supports BM25 lexical search and frontmatter/graph queries. The author notes the original pattern's index, orphan checks and cross-references "depend on the LLM remembering to do them" and start to slip past a few hundred pages. A fork of Karpathy's LLM Wiki idea file. The original describes the pattern; this is one concrete way to run it, on IWE https://github.com/iwe-org/iwe open source, Apache-2.0: a CLI, an MCP server and an LSP for markdown folders . Disclosure: I wrote IWE. Same idea as the original: paste it into your agent Claude Code, Codex, OpenCode, etc. and build the specifics together. The original sets it up as "Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase." All of that stays: raw sources, an LLM-owned wiki, a schema file, ingest / query / lint. What changes is the bookkeeping. In the original, the index, the orphan checks and the cross-references all depend on the LLM remembering to do them. That works for a while. Somewhere past a few hundred pages it starts to slip quietly: a renamed page leaves dead links, a new page never makes it into the index, a summary drops a field the others have. IWE turns those into commands the agent runs and checks the result of. - index.md becomes inclusion links. A link alone on its own line is a parent → child edge. An index or section page is just a list of those, and a page can have more than one parent. iwe tree prints the hierarchy; iwe find --included-by wiki/concepts lists one section. - Lint becomes partly deterministic. iwe stats lists orphan pages. iwe schema validate checks every page against a schema required frontmatter fields, enum values, dates, which sections and in what order . The LLM still has to spot contradictions and stale claims; it no longer has to remember the structural checks. - Refactoring keeps links intact. iwe rename old-key new-key rewrites every reference to the page. iwe extract lifts a section into its own page and leaves a link behind. - Dataview becomes a query. iwe find --filter '{type: entity}' over frontmatter, plus graph relations --included-by , --referenced-by . Same language from the CLI and from the MCP server. - Search. iwe find --lexical "query" is BM25 over titles and bodies. It is not semantic search; if you need vectors, qmd from the original still fits alongside. brew install iwe-org/iwe/iwe or: npm install -g @iwe-org/iwe, or cargo install iwe iwes iwec mkdir my-wiki && cd my-wiki && iwe init Give the agent IWE's tools. For Claude Code: /plugin marketplace add iwe-org/skills /plugin install iwe@iwe-org For Codex or any other MCP client, add the iwec MCP server with the wiki folder as its working directory agent connection guide https://iwe.md/docs/agentic/ . Layout, same three layers as the original: raw/ immutable sources the LLM reads, never writes wiki/ index.md inclusion links to the section pages log.md append-only, " 2026-10-04 ingest | Title" sources/ entities/ concepts/ AGENTS.md the schema CLAUDE.md for Claude Code .iwe/schemas/ page-type schemas, bound by glob in .iwe/config.toml A page-type schema, for example for source summaries: $schema: https://document-schema.org/draft/2026-06/schema description: a summary of one raw source frontmatter: type: object required: type, source, ingested properties: type: { const: source } source: { type: string } ingested: { type: string, format: date } Ingest. Same flow as the original. Two additions for the schema file: after writing pages, run iwe schema validate and fix what it reports; every new page gets an inclusion link from its section page, so nothing is created as an orphan. Query. Start from the index or iwe find --lexical , then pull a page with its children iwe retrieve -k