A documentation management system for Claude Code that turns any project's docs into a persistent, compounding, LLM-maintained knowledge base — and enforces that discipline at tool-call time through hooks.
Status: alpha — v0.1.0 in development. Not yet published. Licence: MIT
This project is directly inspired by Andrej Karpathy's llm-wiki.md (April 2026), which describes a pattern for LLM-maintained personal wikis — raw sources on one side, a compounding wiki of LLM-authored markdown on the other, with the LLM doing all the bookkeeping.
Memex takes that idea and turns it into a Claude Code plugin:
- The wiki pattern becomes a seedable project template (
/memex:init) - The discipline that keeps the wiki healthy becomes a layer of Claude Code hooks that block tool calls which violate the contract
- The name nods to Vannevar Bush's Memex — the 1945 vision of a personal, curated, cross-referenced knowledge store that Karpathy's gist also cites
Full attribution in CREDITS.md.
Memex ships as a hybrid:
- A Claude Code plugin. Install it by adding this repo as a marketplace and installing the
memexplugin — see Quick start below. Alternatively, install from theanthril-claude-pluginsmarketplace, which listsmemexalongside other Anthril plugins. Either path gives you a set of slash commands, skills, subagents, and hook scripts. - A seedable template. Run
/memex:init [profile]inside any project and Memex scaffolds a.memex/tree, a matchingmemex.config.json, and theCLAUDE.md/AGENTS.mdwiring to make the hooks active.
The plugin version-controls the behaviour (hook scripts, skills, profiles). Your project owns only its .memex/ tree and its config. When a hook logic bug is fixed upstream, every project using Memex gets the fix by updating the plugin.
Memex ships with presets you pick at init time:
| Profile | For | Shape |
|---|---|---|
engineering-ops |
Working SaaS / product codebases | planning/{prds,rfcs,decisions}/, entities/, platform/{features,systems,integrations}/, workers/, agents/, workflows/, runbooks/, processes/, environments/, .audits/, .incidents/, .research/ |
research-wiki |
Multi-source research — closest to Karpathy's original gist | raw/{articles,papers,books,transcripts,videos,interviews,standards,datasets,notes,assets}/, wiki/{entities,concepts,summaries,analyses,syntheses}/ |
research-project |
Research + planning projects that will migrate into development | raw/*, wiki/*, research/{hypotheses,literature-review,methodology,experiments,prompts,roadmap.md}, architecture/, systems/, evaluation/ |
book-companion |
Reading a long book with the LLM | raw/chapters/, wiki/{characters,places,themes,plot-threads}/ |
personal-journal |
Self-tracking, reflection | raw/entries/, wiki/{topics,goals,reflections}/ |
generic |
Minimal starting point | topics/, index.md, log.md, .open-questions/ |
All profiles share: AGENTS.md, index.md, log.md, .open-questions/. The rest is profile-specific. You can fork any profile, edit memex.config.json, and register your own — or use /memex:init-profile to build a custom profile interactively.
Three things make the wiki stay current instead of rotting:
- The schema is a file.
memex.config.jsondeclares the allowed folders, the required frontmatter fields, the code-to-doc mappings. Hooks read the config — they don't hard-code rules. This is what makes Memex portable. - Enforcement at tool-call time.
PreToolUsehooks blockWrite/Editcalls that violate path, README, or frontmatter rules. Stderr tells Claude exactly what was wrong; exit 2 surfaces the message so Claude can self-correct. - Session lifecycle keeps it live.
SessionStartinjects the index + recent log into Claude's context.UserPromptSubmitsurfaces the top-3 relevant wiki pages.Stopappends a log entry and flags pages whose referenced code was touched without anupdated:bump.
- Unicode-friendly slugs out of the box — Japanese, Greek, Cyrillic, Arabic, Hebrew, Thai and more. Set
naming.asciiOnly: trueif you want strict ASCII. - Opt-in update notifications — set
hookEvents.sessionStart.updateCheck: trueto get a notice when a newer plugin release is published. - Optional
qmdintegration — setsearch.engine: "qmd"for BM25 + vector retrieval; grep fallback is automatic.
See docs/concepts.md for the full model.
# Install the plugin (once) — two equivalent paths:
# Option A: from this repo as its own marketplace
/plugin marketplace add anthril/claude-memex
/plugin install memex@claude-memex
# Option B: from the Anthril official plugin marketplace
/plugin marketplace add anthril/official-claude-plugins
/plugin install memex@anthril-claude-plugins
# Scaffold a project
cd my-project
/memex:init engineering-ops
# Ingest a source (research-wiki profile)
/memex:ingest .memex/raw/articles/some-article.md
# Ask the wiki a question
/memex:query "what do we know about authentication flows?"
# Health-check
/memex:lintSee docs/README.md for the full command reference and cookbook.
CLAUDE.md is project memory — one file, read at session start, covering build commands and architectural notes. Memex is complementary, not a replacement:
- CLAUDE.md stays short and stable
.memex/is the multi-page knowledge tree CLAUDE.md points at- Anthropic's
claude-md-managementplugin rolls session learnings into CLAUDE.md; Memex captures the broader knowledge that doesn't fit in one file
Use both. They solve different problems.
claude-memex/
├── .claude-plugin/plugin.json # Manifest
├── .github/ # CI workflow, issue / PR templates, CODEOWNERS
├── hooks/
│ ├── hooks.json # Event wiring
│ └── scripts/ # Python hook scripts (+ _lib/ helpers)
├── skills/ # Auto-invoked skills
├── agents/ # Subagents
├── commands/ # Slash commands
├── templates/profiles/ # Seedable profile trees
├── templates/shared/ # Generic starter templates
├── schemas/memex.config.schema.json
├── scripts/ # Ancillary scripts (version checks, etc.)
├── docs/ # Plugin docs
├── examples/ # Demo projects (incl. worked research-wiki demo)
├── tests/ # 227 pytest tests
├── CREDITS.md
├── SECURITY.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── CHANGELOG.md
├── LICENSE
├── pyproject.toml # pytest / ruff / mypy config
└── README.md
See docs/concepts.md for the concept model and docs/README.md for the command reference.
Python 3.10+. Stdlib-only at runtime; pytest / ruff / mypy for development.
git clone https://github.com/anthril/claude-memex.git
cd claude-memex
python -m pip install -e ".[dev]"
pytest # 227 tests, ~5s
ruff check hooks/ tests/ scripts/ # lint
mypy hooks/ # type-checkCI runs all three across Ubuntu / macOS / Windows on Python 3.10 and 3.12.
Read CONTRIBUTING.md first. Profile contributions are especially welcome — the schema is deliberately general enough that new presets should be a pure-data addition.
For bug reports and feature requests, use the issue templates under .github/ISSUE_TEMPLATE/.
For security issues, see SECURITY.md — please don't file public issues for vulnerabilities.
Community norms are set out in CODE_OF_CONDUCT.md.
- Andrej Karpathy,
llm-wiki.md(2026) — the conceptual origin. - Vannevar Bush, "As We May Think" (1945) — the Memex essay the name nods to.
- Anthropic's
claude-md-managementplugin — complementary doc-audit tooling forCLAUDE.md.
Full attribution in CREDITS.md.