my-memory-wiki
v0.3.0
Published
Git-synced, agent-maintained team memory for Claude Code.
Downloads
350
Maintainers
Readme
my-memory-wiki
Git-synced, agent-maintained team memory for Claude Code.
Claude captures durable knowledge — decisions, fixes, library gotchas, hard rules —
as you work. It lives as Markdown in your repo under .memory/, is shared through
git, and is gated by PR review. The knowledge stays with the code; this package is the
engine (a CLI + an MCP server).
Built on Karpathy's LLM Wiki pattern and the consolidation ideas from Akita's ai-memory, adapted for teams: git + PR review are the consolidation gate.
Quick start
npx my-memory-wiki init # scaffold .memory/ + CLAUDE.md + .mcp.json into the repoCommit the result. Every teammate now gets the same memory on git clone, and their
Claude Code reads it automatically — no per-developer setup.
How it works
Two tiers.
- Tier 0 — constraints. Hard rules ("never edit generated files"), always loaded
into Claude's context via
@.memory/CONSTRAINTS.mdimported inCLAUDE.md. Strong default — Claude honours them unless you override in-session. - Tier 1 — knowledge. Decisions, conventions, library notes, and reports.
Retrieved on demand by skimming
index.mdor via thememory.searchMCP tool.
The loop. Claude detects something durable (you state a rule, explain a non-obvious choice, root-cause a bug, or finish an investigation), writes a page and tells you in one line, and it lands in your PR. Merge is the review gate; CI lint catches conflicts.
What gets remembered is defined by the rubric in .memory/SCHEMA.md (criteria +
calibration examples + a project-triggers section you customize). Spontaneous capture is
prompt-driven via the CLAUDE.md/AGENTS.md loop; for a deliberate pass, run the
/scribe slash command (or my-memory-wiki scribe) — it reads the live SCHEMA.md
and reviews the conversation against it.
Source vs. views. Page frontmatter (YAML) is the source of truth. index.md
(human/LLM), index.json (machine), and CONSTRAINTS.md (always-loaded) are all
generated — run my-memory-wiki index (or let the MCP remember tool do it).
CLI
| Command | What it does |
|---------|--------------|
| my-memory-wiki init | Scaffold .memory/, the CLAUDE.md/AGENTS.md sections, .mcp.json, and (when .github/ exists) a CI lint workflow. Idempotent; --no-ci to skip the workflow. |
| my-memory-wiki index | Regenerate index.md, index.json, CONSTRAINTS.md from pages. |
| my-memory-wiki lint [--ci] | Check for broken links, conflicting rules, staleness, drifted views. --ci exits nonzero on errors. |
| my-memory-wiki serve | Run the MCP server over stdio (started automatically by Claude Code). |
| my-memory-wiki update | Refresh package-managed files to the installed version, preserving your edits (writes SCHEMA.md.new on conflict). |
| my-memory-wiki scribe | Print the rubric-driven prompt for a memory-capture pass (also scaffolded as the /scribe Claude Code slash command). |
MCP server
my-memory-wiki init writes a .mcp.json that registers the server. Claude Code spawns it
automatically per session (local stdio, no deploy, no daemon). It exposes:
memory.search— find pages by meaning (BM25)memory.remember— record a valid page + regenerate views + logmemory.related— a page's links, backlinks, same-tag pages, supersedes chainmemory.lint— the lint rules, mid-session
You don't need the server for small wikis — the always-on constraints and reading
.memory/ directly are enough. It earns its place once index.md is too big to skim.
CI
Add my-memory-wiki lint --ci to your CI so a PR can't merge with broken links, conflicting
constraints, or out-of-date views. See docs/install.md.
License
MIT
