{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/logo.png\" alt=\"memgit logo\" width=\"120\" />\n</p>\n\n<!-- mcp-name: dev.memgit/memgit -->\n\n# memgit — git for AI memory\n\n**Your AI assistants forget everything when the session ends. memgit fixes that.**\n\nVersion-controlled, cross-AI context that persists, diffs, rolls back, and syncs like code. Switch from Claude to Cursor to ChatGPT mid-project — your context is already there.\n\n[![PyPI](https://img.shields.io/pypi/v/memgit)](https://pypi.org/project/memgit/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Tests](https://img.shields.io/badge/tests-431%20passing-brightgreen)](tests/)\n\n---\n\n## Why not claude.md? Why not mem-search?\n\nYou've probably already tried both. Here's why they hit a ceiling:\n\n| Capability | claude.md | mem-search plugin | **memgit** |\n|---|---|---|---|\n| Loads only relevant context | ❌ loads everything | ⚠️ loads recent observations | ✅ BM25 search — top-k per query |\n| Project-aware across a multi-repo life | ❌ per-file | ❌ | ✅ memories carry a `project`; the current workspace ranks first |\n| Adopt on an existing codebase | ❌ starts blank | ❌ starts blank | ✅ `memgit onboard` — seed the store from the repo in one pass |\n| Version history | ❌ | ❌ | ✅ full commit log |\n| Diff between sessions | ❌ | ❌ | ✅ `memgit diff` |\n| Roll back a wrong memory | ❌ manual edit | ❌ | ✅ `memgit rollback` |\n| Works in Cursor, Windsurf, GPT | ❌ Claude only | ❌ Claude only | ✅ all via MCP / HTTP |\n| Team sync | ❌ copy-paste files | ❌ | ✅ `memgit git push` |\n| Scales to 10k+ sessions | ❌ file grows | ❌ search slows | ✅ `memgit squash` |\n| Measurable token savings | ❌ | ❌ | ✅ `memgit stats` |\n| Export / import standard format | ❌ | ❌ | ✅ TOON + git |\n\n---\n\n## Proof — context costs you can measure\n\nRun this on your own store to see the actual numbers (measured where possible; estimates labeled):\n\n```\n$ memgit stats\n\n  Total memories:   108   (41 feedback · 23 user · 19 project · 12 reference · 8 convention · 5 lesson)\n  Priority:          3 critical · 67 medium · 38 low\n\n  Context footprint  (measured where possible; estimates labeled)\n\n  Surface                                             Tokens\n  Full store (every memory as context)                12,840\n  Resume digest  (measured render)                       540\n  Recall block  (estimate: top-3 rules ≈ chars/4)        ~60\n\n  per-session injected ≈ 600 tokens (estimate) vs 12,840 tokens if the full store were loaded\n```\n\n**Why such a big difference?** claude.md loads *all* context every session. memgit injects a bounded resume digest plus BM25-matched recall — *only what is relevant to this session*, not everything you've ever recorded. The digest is measured by actually rendering it, and the store total is the real corpus size; nothing here is a simulated benchmark.\n\n---\n\n## The git analogy is literal\n\nmemgit's data model maps exactly to git:\n\n| memgit | git |\n|---|---|\n| `mnemonic` | file |\n| `MindState` | tree |\n| `checkpoint` | commit |\n| `thread` | branch |\n| `memgit commit` | `git commit` |\n| `memgit diff` | `git diff` |\n| `memgit log` | `git log` |\n| `memgit squash --keep-last 100` | `git rebase -i --autosquash` |\n| `memgit git push` | `git push` |\n\nThis is not metaphorical — memgit uses a **content-addressed object store** (SHA-256 blobs) identical to git's architecture. Every memory has a stable SHA. Identical content has identical SHAs. Old state is always recoverable.\n\n---\n\n## The store IS a git repo\n\nEvery memory is a readable `.toon` file under `memories/`. Push your entire memory set to GitHub with standard git:\n\n```bash\nmemgit git init --remote git@github.com:yourteam/ai-memory.git\nmemgit git push\n```\n\nTeammates pull and start with your AI's learned rules from session 1:\n\n```bash\ngit clone git@github.com:yourteam/ai-memory.git ~/.claude/memgit-store\nmemgit setup all\n```\n\nYou can `grep`, `git blame`, and `git diff` your memories just like code:\n\n```bash\ngrep -rl \"database\" ~/.claude/memgit-store/memories/\ngit log --follow memories/no-db-mock.toon\ngit diff HEAD~7 memories/\n```\n\n---\n\n## Install\n\n**Mac / Linux:**\n```bash\npip install memgit\n```\n\n**Mac (Homebrew):**\n```bash\nbrew tap code4161/tap && brew install memgit\n```\n\n**Windows:**\n```powershell\nchoco install memgit\n# or\npip install memgit\n```\n(The Chocolatey package is live on community.chocolatey.org; newly pushed versions can take a few days to clear moderation — `pip install memgit` always has the latest.)\n\n**Any AI tool config (no Python needed — npx auto-installs on first run):**\n```json\n{ \"mcpServers\": { \"memgit\": { \"command\": \"npx\", \"args\": [\"-y\", \"memgit-mcp\"] } } }\n```\n\n---\n\n## Quickstart (3 minutes)\n\n```bash\n# 1. Install and initialize\npip install memgit\nmemgit init               # auto-detects the best location, finds your existing\n                          # Claude Code memories, and offers to import them\n\n# 2. Register with your AI tools (interactive picker)\nmemgit setup\n\n# 3. See your token savings\nmemgit stats\n```\n\n`init` walks you through it — no paths to hunt down. (Importing later is one command with no arguments: `memgit sync` auto-finds `~/.claude/projects/*/memory`.)\n\nRestart your AI tool — it now searches your memory store at the start of every session.\n\n---\n\n## Adopting memgit mid-project\n\nMemory tools have a cold-start problem: install one halfway through a project and it knows *nothing* — there's no initial point, and context only trickles in from future sessions. memgit solves this with a one-time seeding pass:\n\n```bash\ncd your-project\nmemgit onboard          # mines the repo, prints the bootstrap brief\n```\n\n`onboard` first extracts a **repo digest** deterministically — git history (recent commit subjects, hot files/directories by churn, authors, branch, tags), detected stack from manifests, and the docs worth reading — using bounded, read-only probes that stay near-instant even on huge repositories. The brief then tells your AI agent exactly what to do with it: read only the listed files (no tree crawling), extract 10–20 durable facts (purpose, architecture, conventions, current state, gotchas), save each as a typed memory, and checkpoint the seed set. Paste it into a session — or don't: if the AI searches memory in a project that has none, the MCP server itself replies with the bootstrap instructions instead of a bare \"no results.\"\n\nMemories are **project-scoped, filter-by-default** (v0.7.0): each carries the workspace it belongs to, and searches, recall injections, and the resume digest (recent memories, checkpoints, depth hints) are **filtered** to the current project's family plus explicitly-global memories — another project's content never leaks in. Widen deliberately with `memgit search --all-projects` / `all_projects: true` (every hit then carries its `project` label), or hard-filter one project with `--project`. A memory with no project is **explicitly global** (applies everywhere): save one with `memgit add --global` or `project: \"\"`. A save whose project *cannot be determined* is never silently global — it's quarantined under `_unknown` (visible in `list` as `[?project]`, flagged by `lint`, surfaced nowhere) until you relabel it with `memgit doctor --relabel`.\n\n---\n\n## Resume where you left off\n\nAsk an AI \"can we proceed on the pending tasks?\" in a fresh session and it will guess from whatever file happens to be open. `memgit resume` replaces the guess with the record:\n\n```bash\nmemgit resume            # last checkpoints, work in flight, recent + critical memories\nmemgit resume --plain    # plain text, for piping into an AI context\nmemgit resume --json     # for tooling\n```\n\nWire it into Claude Code so memory becomes **automatic** — no tool call, no judgment required:\n\n```bash\nmemgit setup hooks       # installs all five hooks (~/.claude/settings.json)\n```\n\n| Hook | What it enforces |\n|---|---|\n| `SessionStart` | every session opens with the resume digest in context — status board, checkpoints, critical rules, memory index |\n| `UserPromptSubmit` | each prompt is BM25-matched against the store; relevant memories are injected, ending with a \"+N more on '<topic>'\" depth hint when more exists (silent when nothing clears the relevance bar; never repeats within a session) — `--no-recall` to skip |\n| `PostToolUse` | reading a file whose path matches a memory tag surfaces a one-line hint (\"6 memories tagged 'x' relate to this path\") — tagmap cache only, capped 3/session, `--no-ctx-recall` to skip |\n| `Stop` (guard) | a session that did real work but saved nothing gets ONE nudge to save durable facts before finishing — `--no-guard` to skip |\n| `Stop` (sync) | markdown memories are checkpointed asynchronously at session end |\n\nWhy hooks and not just good tool descriptions? We measured it: across 166 real sessions, hook-injected context was delivered in **100%** of them while voluntary memory-tool calls happened in **6%**. What a hook enforces happens.\n\nThe resume digest is deliberately bounded (~350 tokens measured on a 500-memory store): rules are clipped, the critical list is capped, and full text is one `get_memory` call away.\n\n---\n\n## Scale to 10,000+ sessions\n\nAfter months of use, your checkpoint history grows. Squash compresses it, gc reclaims the disk:\n\n```bash\nmemgit squash --keep-last 100    # keep last 100 checkpoints, squash everything older\nmemgit squash --older-than 30    # squash everything older than 30 days\nmemgit squash --dry-run          # preview first\n\nmemgit gc                        # delete unreachable objects, trim reflogs\nmemgit gc --dry-run              # preview\nmemgit gc --squash-keep 200      # compact history, then sweep\n```\n\nThe current memory **state is always preserved** — and squash is lossless-in-substance: every collapsed checkpoint leaves a one-line record (time, author, diff, message) in an append-only archive under `.memgit/logs/archive/` that gc never touches. Benchmark on a 2,000-checkpoint store: **94% smaller** (39.5 MB → 2.2 MB), `fsck` clean. History operations stay O(1) as the chain grows (SHA resolution and checkpoint counting measured at ~0.08 ms at 2,000 checkpoints).\n\n---\n\n## Multiple agents, one memory\n\nAll writes go through a git-style store lock (0.08 ms overhead), so concurrent agents can't corrupt the store or lose each other's updates. Two patterns:\n\n**Shared thread** — agents write concurrently; if one commits while another has work staged, the second commit auto-merges (three-way, against the recorded base) instead of clobbering. Set `MEMGIT_AUTHOR=agent-name` so each checkpoint says who did it.\n\n**Thread per agent** — isolate, then integrate:\n\n```bash\nmemgit thread create agent-1     # branch off for each agent\n# ... agents work on their own threads ...\nmemgit merge agent-1             # three-way merge back (common-ancestor based)\n```\n\nConflicts (same memory changed on both sides) resolve to the newest version; an edit always beats a delete. Both histories are preserved.\n\n---\n\n## What the AI sees\n\nOnce registered via MCP, every AI tool gets 6 tools:\n\n| Tool | When the AI uses it |\n|---|---|\n| `resume_session` | When the request depends on prior state — \"continue\", \"the pending tasks\", session start |\n| `search_memories` | Before answering anything that touches past work or preferences |\n| `get_memory` | When it needs full details of a specific memory |\n| `list_memories` | To browse or audit what's stored |\n| `save_memory` | When it learns something worth keeping for next time |\n| `get_checkpoint_log` | To check when memories were last synced |\n\nThe tool descriptions teach the AI **judgment** — \"does this request depend on state you don't have in context?\" — rather than keyword triggers. Measured cost of the whole tool surface: ~1,150 tokens once per session; a `resume_session` reply is ~335.\n\n---\n\n## Core operating guide (v0.5.0)\n\nA project's hardest onboarding problem isn't *what* it does — it's *how to work in it*: which skill to invoke, which command to run, which tool to reach for. That lives in a `CLAUDE.md` or a skills folder the AI host may or may not be configured to read. memgit carries it for you.\n\n`memgit core seed` distills a compact operating guide from the project's existing skills + rule files. `memgit core sync` writes it into **every AI host's own rules surface** as a dedicated, memgit-owned file — `.claude/rules/memgit.md`, `.cursor/rules/memgit.mdc`, `.windsurf/rules/memgit.md`, `.clinerules/`, `.roo/rules/`, `.continue/rules/` — and marker-delimited blocks in the shared `GEMINI.md` (Gemini CLI auto-loads only that file) and Codex's `AGENTS.md`. It's **additive only** — memgit never touches your own config or content — and injected at session start, so any tool knows how to work in the project even when its native setup is missing.\n\nAnd it **learns**: a sidecar usage ledger tracks which memories actually get recalled, and the most-used ones are auto-promoted as pointers into the guide over time (budget-capped, decaying, and always subordinate to the repo's own rules — it never restates or overrides them). Drifted? `memgit core heal` rebuilds it.\n\nSince 0.8.0 it also **starts itself**: a project's first guide is created automatically once it holds a handful of memories, so the loop no longer waits on someone remembering to run `core seed`. The guide leads with what the project actually holds — \"this project has N saved memories covering *topics*\" — because a stated count of real prior work is evidence a model can act on, where an abstract instruction to check memory is something it can weigh against its own confidence and skip.\n\n---\n\n## memgit Pro — one memory across every machine\n\nThe local engine, the store, the MCP server and every command below are MIT and never\ngated. **Pro** is the hosted layer for people who work on more than one machine or with a\nteam: end-to-end-encrypted sync where the server stores ciphertext only, unlocked by one\nlicence key.\n\n```bash\nmemgit pro activate <key>     # validate the key with Polar and store it (mode 0600)\nmemgit pro status             # Free / Pro, last verification, expiry\nmemgit pro deactivate         # remove the key from this machine\n```\n\n- Buy a key at [memgit.dev/#pricing](https://memgit.dev/#pricing) — $12/month or $99/year,\n  billed by Polar (merchant of record, taxes handled). The key arrives by email and in your\n  Polar purchases page.\n- The only bytes that leave your machine are the key and memgit's public organisation id,\n  sent to Polar's validation endpoint. **No memory content is ever sent.**\n- Headless hosts: set `MEMGIT_LICENSE_KEY=<key>` in the MCP server's environment; it is\n  validated with the same cache and never written to disk.\n- Fail-open: a key that verified in the last 14 days keeps working offline; a rejected key\n  drops to Free with a clear message. A lapsed plan never locks your data — reads, pulls and\n  exports keep working.\n- If this store is logged in to memgit cloud, `pro activate` also upgrades that account.\n\n---\n\n## Backups that actually happen\n\nmemgit's premise is that the AI is the operator — but backup used to require a human to remember `memgit git init --remote <url>` and keep pushing. On this project's own store that meant 1,734 memories on one disk with no copy anywhere, five weeks in. A maintenance task that needs a human command is a task that will not happen.\n\nSince 0.9.0 it runs itself, at the end of a session, with the safety boundary drawn at **network egress rather than effort**:\n\n- **Local destinations are automatic** — a cloud-synced folder you already have (iCloud, Dropbox, Google Drive, OneDrive) or an external volume. memgit copies files; it opens no connection and signs up for no service. Your existing sync client does the rest.\n- **A git remote is pushed to only if you already configured one.** memgit never invents a remote, never creates a repository, and never sends memories to a host you did not choose — memories can contain credentials, and convenience is not a reason to publish them somewhere you never picked.\n\nThe backup is a single `memgit-store.tar.gz`, not a directory tree: a 203 MB store is 10,295 small object files, and giving a sync client 10k files to reconcile every time is how you get a sync client that never finishes. It is staged and renamed atomically, keeping the old copy until the new one lands — an interrupted backup must never leave a corrupt file where a good one used to be.\n\n```bash\nmemgit backup status     # where the last copy went, and what else is available\n```\n\n---\n\n## Ranking you can prove\n\nRetrieval quality used to be adjusted on intuition. `memgit eval` replaces that with a measurement, using two frozen sets mined from the store itself:\n\n- **recall** — real prompts and the memories memgit actually surfaced for them. Measures *stability*: did a change break what used to work?\n- **synthetic** — each memory queried by its own `why`, expecting itself back, with the slug's own words stripped out of the query. Measures *correctness*, independently of any past ranking. (The recall set alone is circular — its answers came from the ranking under test.)\n\nBoth report hit@1, recall@3/5/10 and MRR against a pinned baseline. There is deliberately no single blended score, and no fabricated \"tokens saved\" number.\n\nIt earns its keep immediately. Two changes built for 0.8.0 looked obviously right and were measured wrong: a recency multiplier (cut — real-prompt hit@1 −0.020, MRR −0.018) and destructive stemming, which fixed its motivating query while costing hit@1 −0.038 overall (rebuilt as an additive field, then +0.020/+0.041/+0.019). A BM25 normalisation bug introduced in the same release was caught the same way.\n\n---\n\n## Depth advertisement, trackers & supersession (v0.6.0)\n\nMeasured across 289 real sessions: injected recall reached ~59% of them, but only **6.8%** ever ran an active search — the injected top-3 reads as \"memory consulted\", so the model never learns there's a queryable store behind it. 0.6.0 makes the passive layer advertise what the active layer knows:\n\n- **Memory index** — the resume digest ends with tag→count pairs (`8a8f4ec (6) · instagram (5)`) and the exact call to go deeper. Counts are truthful: superseded memories are excluded, and every advertised topic is guaranteed to return search results.\n- **\"+N more\" recall hints** — when the per-prompt recall block has more on-topic memories behind it, it says so, with the one call to get them.\n- **Context-triggered recall** — a `PostToolUse` hook: reading a file whose path matches a memory tag surfaces `memgit: 6 memories tagged 'x' relate to this path`. Reads only a commit-time tagmap cache (never the store), capped 3/session.\n- **Trackers (`tr`)** — one memory per in-flight entity (`<entity>-status`), updated by re-saving the same slug. They render as a **status board** at the top of every session: memgit is the authority for entity status; files may lag.\n- **Supersession** — a correction names what it replaces (`supersedes=[old-slug]`) instead of a \"CORRECTED:\" prefix. Superseded memories vanish from search/recall/resume (history preserved; `list` still shows them marked ⊘), so injected context is never stale.\n\n---\n\n## Commands\n\n```bash\n# Core (git-like)\nmemgit init                       # initialize store (auto-detects best path)\nmemgit onboard                    # bootstrap brief for an existing codebase\nmemgit add <slug> <rule>          # stage a memory (--body detail, --project scope, --global everywhere, --supersedes old-slug)\nmemgit commit -m \"message\"        # checkpoint current state\nmemgit log                        # history\nmemgit diff [sha1] [sha2]         # what changed\nmemgit show <slug>                # display a memory\nmemgit remove <slug>              # remove from active index (history preserved)\nmemgit status                     # staged changes\nmemgit search <query>             # BM25 search, scoped to this project + global (--all-projects to widen)\nmemgit rollback <ref>             # restore state to a checkpoint (HEAD~N or SHA)\nmemgit resume                     # where we left off — session-start digest\nmemgit merge <thread>             # three-way merge a thread into the current one\nmemgit remove <slug>              # (aliases: delete, rm, del) — mistypes get a \"did you mean?\"\n\n# Core operating guide — per-project, always-on, cross-host\nmemgit core seed                  # draft a guide from this project's skills + rule files\nmemgit core sync                  # deliver it into each AI host's own rules file (additive)\nmemgit core show / edit           # view / curate the guide\nmemgit core heal                  # self-repair a guide that has drifted\n                                  # (a project's FIRST guide is created automatically\n                                  #  once it holds 5+ memories — no command needed)\n\n# Durability — automatic, no human command required\nmemgit backup status              # last copy, staleness, available destinations\nmemgit backup now                 # force one immediately\nmemgit backup set <path>          # pin a destination\nmemgit backup off / on            # control the automatic path\n\n# Retrieval evaluation — prove a ranking change helped\nmemgit eval mine                  # freeze a regression set from real recall events\nmemgit eval mine --synthetic      # non-circular set: query each memory by its own `why`\nmemgit eval run --set recall      # hit@1 / recall@3,5,10 / MRR vs the pinned baseline\nmemgit eval run --baseline        # pin the current result as the comparison point\nmemgit eval run --misses 10       # inspect the cases where nothing relevant surfaced\n\n# Scale & proof\nmemgit squash                     # compress old history (archives what it collapses)\nmemgit gc                         # reclaim disk: sweep unreachable objects + stale session caches\nmemgit stats                      # measured context costs + disk usage\nmemgit doctor                     # hygiene report: quarantined/_unknown memories, stale caches, orphaned usage\nmemgit doctor --relabel map.json  # bulk re-project memories ({\"slug\": \"Label\" | \"\"}); one checkpoint\nmemgit lint                       # validate all memories (flags unknown provenance)\nmemgit fsck                       # verify store integrity\n\n# Import / export\nmemgit sync                       # sync from Claude Code files + commit (auto-finds them)\nmemgit import claude-code [path]  # path optional — defaults to ~/.claude/projects/*/memory\nmemgit import file <path>\nmemgit export <slug>\n\n# Git sync (team features)\nmemgit git init [--remote URL]\nmemgit git push [remote] [branch]\nmemgit git pull [remote] [branch]\nmemgit git export\nmemgit git status\n\n# AI tool registration\nmemgit setup                      # interactive step-by-step picker\nmemgit setup all                  # auto-register every detected tool\nmemgit setup claude-code\nmemgit setup cursor\nmemgit setup windsurf\nmemgit setup cline\nmemgit setup continue\nmemgit setup gemini-cli\nmemgit setup hooks                # Claude Code hooks: resume at start, per-prompt recall,\n                                  # capture guard + auto-sync at stop (--no-recall / --no-guard)\n\n# Pro (licence key)\nmemgit pro activate <key>         # Polar-issued key; unlocks hosted E2E sync\nmemgit pro status / deactivate\n\n# Server\nmemgit serve                      # MCP stdio (Claude Code, Cursor, Windsurf, Cline)\nmemgit serve --http               # HTTP REST (ChatGPT Custom Actions, Gemini)\n\n# Visualization\nmemgit graph                      # D3.js interactive relationship map\nmemgit thread list / switch / create\n```\n\n---\n\n## AI tool support\n\n| Tool | Protocol | Command |\n|---|---|---|\n| **Claude Code** | MCP stdio | `memgit setup claude-code` |\n| **Claude Desktop** | MCP stdio | `memgit setup claude-desktop` |\n| **Cursor** | MCP stdio | `memgit setup cursor` |\n| **Windsurf** | MCP stdio | `memgit setup windsurf` |\n| **Cline / Roo-Code** | MCP stdio | `memgit setup cline` |\n| **Continue.dev** | MCP stdio | `memgit setup continue` |\n| **Codex** | MCP stdio (TOML) | `memgit setup codex` |\n| **Antigravity** | MCP stdio | `memgit setup antigravity` |\n| **Gemini CLI** | MCP stdio | `memgit setup gemini-cli` |\n| **ChatGPT (Custom Actions)** | HTTP + OpenAPI | `memgit serve --http` → import `http://localhost:7474/openapi.json` |\n| **Gemini API** | HTTP function calling | `memgit serve --http` + `llm-tool-definitions.json` |\n| **Any MCP tool** | MCP stdio | Add `{\"command\": \"memgit\", \"args\": [\"serve\"]}` to config |\n\n---\n\n## TOON format — compact, readable, diffable\n\nStandard markdown memory file:\n```markdown\n## Rule: Never mock the database in tests\n**Type:** feedback  \n**Priority:** medium  \n**Why:** We got burned last quarter — mocked tests passed but the prod migration failed.  \n**When to apply:** Any time writing tests that touch persistence layers.  \n**Tags:** testing, database\n```\n\nThe same memory in TOON:\n```\nTOON1|fb|no-db-mock|2026-07-01T10:00Z\n#testing #database\nPROJ:my-app\nRULE:Never mock the database in tests\nWHY:Mocked tests passed but prod migration failed last quarter\nWHEN:Any persistence test\nBODY:Full long-form detail lives here, losslessly (newlines escaped).\\nSearch returns the compact RULE; get_memory returns everything.\n```\n\nMeasured with a real tokenizer, TOON is ~5–10% leaner than equivalent markdown — a nice bonus, not the headline. **The headline saving is retrieval**: memgit loads the top-8 relevant memories per query instead of everything.\n\nAt 108 memories: **12,840 tokens (dump everything) → 640 tokens (memgit BM25 top-8)**\n\nFor exact token counts in `memgit stats`, install the optional tokenizer: `pip install \"memgit[tokens]\"`.\n\n---\n\n## Architecture\n\n```\n~/.claude/memgit-store/\n  .memgit/\n    objects/     ← SHA-256 content-addressed blobs (gzip compressed)\n    refs/threads/main   ← HEAD checkpoint SHA\n    TOON_INDEX   ← active slug→sha mapping\n    config       ← author, default thread\n    logs/        ← ref change audit trail\n  memories/      ← flat .toon files (git-trackable, human-readable)\n  .git/          ← standard git repo (after `memgit git init`)\n```\n\n---\n\n## Contributing\n\n```bash\ngit clone https://github.com/code4161/memgit.git\ncd memgit\npython -m venv .venv && source .venv/bin/activate\npip install -e \".[dev]\"\npytest    # 431 tests, all passing, < 5 seconds\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n---\n\n## Roadmap\n\n- [x] Content-addressed object store (git-identical architecture)\n- [x] TOON format (compact line-oriented memory format)\n- [x] MCP server — Claude Code, Cursor, Windsurf, Cline, Continue.dev\n- [x] HTTP server — ChatGPT Custom Actions, Gemini function calling\n- [x] BM25 relevance search (load only what matters)\n- [x] `memgit stats` — measured token savings proof\n- [x] `memgit squash` — scale to 10k+ sessions\n- [x] `memgit git push/pull` — team sync via standard git\n- [x] Flat `memories/` directory — grep/diff/blame your memories\n- [x] D3.js graph visualization of memory relationships\n- [x] `memgit resume` + SessionStart hook — sessions start with \"where we left off\"\n- [x] Guardrail hooks — per-prompt auto-recall + end-of-session capture guard (v0.4.0)\n- [x] Core operating guide — per-project, always-on, cross-host, self-improving (v0.5.0)\n- [x] `memgit gc` — space reclamation (mark-and-sweep, lossless squash archive)\n- [x] Multi-agent write safety — store lock, auto-merge commits, `memgit merge`\n- [x] PyPI + Homebrew (tap) + npm published (v0.1.5)\n- [x] Chocolatey — live on community.chocolatey.org (`choco install memgit`)\n- [x] Interactive setup wizard (`memgit setup`)\n- [x] Smart `memgit init` (auto-detects tool, no path needed)\n- [x] Lossless memories — full `body` alongside the compact rule (v0.3.0)\n- [x] Project-scoped memories + `memgit onboard` mid-project bootstrap (v0.3.0)\n- [x] VS Code extension (v0.1.5, Marketplace: code416-memgit.memgit)\n- [x] Codex + Antigravity support — MCP registration + `AGENTS.md` core guide (v0.8.0)\n- [x] `memgit eval` — measured retrieval quality, real + non-circular sets (v0.8.0)\n- [x] Usage-aware ranking — the recall ledger feeds relevance, not just the guide (v0.8.0)\n- [x] Automatic core-guide bootstrap — the self-improving loop starts itself (v0.8.0)\n- [x] Automatic off-machine backup — no human command required (v0.9.0)\n- [ ] JetBrains plugin (Phase 3)\n- [ ] Semantic search via embeddings — gated on `memgit eval` showing a real gain (Phase 4)\n- [ ] Public benchmark numbers (LongMemEval, LoCoMo) (Phase 4)\n- [x] memgit.dev website (live)\n- [ ] Memory compression / auto-summarization (Phase 5)\n- [ ] Team access control + audit trail (Phase 5)\n- [ ] Memory marketplace — share reusable context packs (Phase 6)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 28679,
  "sha": "8e89acfd4ad7fe0d63c620c06ee3e1654ed28032d87d614f54049630fe8f67b9",
  "repo_slug": "code4161/memgit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_dev_memgit_memgit_5a24872b/readme"
}