memgit 0.6.2__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {memgit-0.6.2 → memgit-0.7.0}/PKG-INFO +25 -24
- {memgit-0.6.2 → memgit-0.7.0}/README.md +24 -23
- {memgit-0.6.2 → memgit-0.7.0}/memgit/__init__.py +1 -1
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cli.py +325 -95
- {memgit-0.6.2 → memgit-0.7.0}/memgit/delivery.py +41 -15
- {memgit-0.6.2 → memgit-0.7.0}/memgit/hooks.py +17 -10
- {memgit-0.6.2 → memgit-0.7.0}/memgit/http_server.py +45 -4
- {memgit-0.6.2 → memgit-0.7.0}/memgit/links.py +10 -2
- {memgit-0.6.2 → memgit-0.7.0}/memgit/mcp_server.py +74 -20
- {memgit-0.6.2 → memgit-0.7.0}/memgit/project.py +69 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/repo.py +131 -17
- {memgit-0.6.2 → memgit-0.7.0}/memgit/scorer.py +10 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/usage.py +16 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/PKG-INFO +25 -24
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/SOURCES.txt +2 -1
- {memgit-0.6.2 → memgit-0.7.0}/pyproject.toml +1 -1
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_advanced.py +14 -6
- memgit-0.7.0/tests/test_v070.py +603 -0
- {memgit-0.6.2 → memgit-0.7.0}/LICENSE +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/__init__.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/client.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/commands.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/crypto.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/state.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/cloud/sync.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/gitdigest.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/graph.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/importer.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/models.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/store.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/tokens.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit/toon.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/dependency_links.txt +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/entry_points.txt +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/requires.txt +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/memgit.egg-info/top_level.txt +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/setup.cfg +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_accrue.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_aliases.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_core.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_delivery.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_setup.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_store_repo.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_toon.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_v020.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_v030.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_v040.py +0 -0
- {memgit-0.6.2 → memgit-0.7.0}/tests/test_v060.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memgit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Git for AI memory — version-controlled context persistence across Claude, GPT, Gemini, Cursor, Windsurf, and more
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://memgit.dev
|
|
@@ -68,9 +68,9 @@ You've probably already tried both. Here's why they hit a ceiling:
|
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
|
-
## Proof —
|
|
71
|
+
## Proof — context costs you can measure
|
|
72
72
|
|
|
73
|
-
Run this on your own store to see the actual numbers:
|
|
73
|
+
Run this on your own store to see the actual numbers (measured where possible; estimates labeled):
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
$ memgit stats
|
|
@@ -78,20 +78,17 @@ $ memgit stats
|
|
|
78
78
|
Total memories: 108 (41 feedback · 23 user · 19 project · 12 reference · 8 convention · 5 lesson)
|
|
79
79
|
Priority: 3 critical · 67 medium · 38 low
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Weekly savings (10 sessions/week):
|
|
90
|
-
Tokens saved: 122,000/week
|
|
91
|
-
Cost saved: $0.31/week → $15.86/year (at GPT-4o input pricing, $2.50/M)
|
|
81
|
+
Context footprint (measured where possible; estimates labeled)
|
|
82
|
+
|
|
83
|
+
Surface Tokens
|
|
84
|
+
Full store (every memory as context) 12,840
|
|
85
|
+
Resume digest (measured render) 540
|
|
86
|
+
Recall block (estimate: top-3 rules ≈ chars/4) ~60
|
|
87
|
+
|
|
88
|
+
per-session injected ≈ 600 tokens (estimate) vs 12,840 tokens if the full store were loaded
|
|
92
89
|
```
|
|
93
90
|
|
|
94
|
-
**Why such a big difference?** claude.md loads *all* context every session. memgit
|
|
91
|
+
**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.
|
|
95
92
|
|
|
96
93
|
---
|
|
97
94
|
|
|
@@ -155,9 +152,11 @@ brew tap code4161/tap && brew install memgit
|
|
|
155
152
|
|
|
156
153
|
**Windows:**
|
|
157
154
|
```powershell
|
|
155
|
+
choco install memgit
|
|
156
|
+
# or
|
|
158
157
|
pip install memgit
|
|
159
158
|
```
|
|
160
|
-
(
|
|
159
|
+
(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.)
|
|
161
160
|
|
|
162
161
|
**Any AI tool config (no Python needed — npx auto-installs on first run):**
|
|
163
162
|
```json
|
|
@@ -198,7 +197,7 @@ memgit onboard # mines the repo, prints the bootstrap brief
|
|
|
198
197
|
|
|
199
198
|
`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."
|
|
200
199
|
|
|
201
|
-
Memories are **project-scoped
|
|
200
|
+
Memories 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`.
|
|
202
201
|
|
|
203
202
|
---
|
|
204
203
|
|
|
@@ -289,7 +288,7 @@ The tool descriptions teach the AI **judgment** — "does this request depend on
|
|
|
289
288
|
|
|
290
289
|
A 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.
|
|
291
290
|
|
|
292
|
-
`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
|
|
291
|
+
`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.
|
|
293
292
|
|
|
294
293
|
And 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.
|
|
295
294
|
|
|
@@ -313,14 +312,14 @@ Measured across 289 real sessions: injected recall reached ~59% of them, but onl
|
|
|
313
312
|
# Core (git-like)
|
|
314
313
|
memgit init # initialize store (auto-detects best path)
|
|
315
314
|
memgit onboard # bootstrap brief for an existing codebase
|
|
316
|
-
memgit add <slug> <rule> # stage a memory (--body detail, --project scope, --supersedes old-slug)
|
|
315
|
+
memgit add <slug> <rule> # stage a memory (--body detail, --project scope, --global everywhere, --supersedes old-slug)
|
|
317
316
|
memgit commit -m "message" # checkpoint current state
|
|
318
317
|
memgit log # history
|
|
319
318
|
memgit diff [sha1] [sha2] # what changed
|
|
320
319
|
memgit show <slug> # display a memory
|
|
321
320
|
memgit remove <slug> # remove from active index (history preserved)
|
|
322
321
|
memgit status # staged changes
|
|
323
|
-
memgit search <query> # BM25
|
|
322
|
+
memgit search <query> # BM25 search, scoped to this project + global (--all-projects to widen)
|
|
324
323
|
memgit rollback <ref> # restore state to a checkpoint (HEAD~N or SHA)
|
|
325
324
|
memgit resume # where we left off — session-start digest
|
|
326
325
|
memgit merge <thread> # three-way merge a thread into the current one
|
|
@@ -334,9 +333,11 @@ memgit core heal # self-repair a guide that has drifted
|
|
|
334
333
|
|
|
335
334
|
# Scale & proof
|
|
336
335
|
memgit squash # compress old history (archives what it collapses)
|
|
337
|
-
memgit gc # reclaim disk: sweep unreachable objects
|
|
338
|
-
memgit stats #
|
|
339
|
-
memgit
|
|
336
|
+
memgit gc # reclaim disk: sweep unreachable objects + stale session caches
|
|
337
|
+
memgit stats # measured context costs + disk usage
|
|
338
|
+
memgit doctor # hygiene report: quarantined/_unknown memories, stale caches, orphaned usage
|
|
339
|
+
memgit doctor --relabel map.json # bulk re-project memories ({"slug": "Label" | ""}); one checkpoint
|
|
340
|
+
memgit lint # validate all memories (flags unknown provenance)
|
|
340
341
|
memgit fsck # verify store integrity
|
|
341
342
|
|
|
342
343
|
# Import / export
|
|
@@ -470,7 +471,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
470
471
|
- [x] `memgit gc` — space reclamation (mark-and-sweep, lossless squash archive)
|
|
471
472
|
- [x] Multi-agent write safety — store lock, auto-merge commits, `memgit merge`
|
|
472
473
|
- [x] PyPI + Homebrew (tap) + npm published (v0.1.5)
|
|
473
|
-
- [
|
|
474
|
+
- [x] Chocolatey — live on community.chocolatey.org (`choco install memgit`)
|
|
474
475
|
- [x] Interactive setup wizard (`memgit setup`)
|
|
475
476
|
- [x] Smart `memgit init` (auto-detects tool, no path needed)
|
|
476
477
|
- [x] Lossless memories — full `body` alongside the compact rule (v0.3.0)
|
|
@@ -34,9 +34,9 @@ You've probably already tried both. Here's why they hit a ceiling:
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
## Proof —
|
|
37
|
+
## Proof — context costs you can measure
|
|
38
38
|
|
|
39
|
-
Run this on your own store to see the actual numbers:
|
|
39
|
+
Run this on your own store to see the actual numbers (measured where possible; estimates labeled):
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
$ memgit stats
|
|
@@ -44,20 +44,17 @@ $ memgit stats
|
|
|
44
44
|
Total memories: 108 (41 feedback · 23 user · 19 project · 12 reference · 8 convention · 5 lesson)
|
|
45
45
|
Priority: 3 critical · 67 medium · 38 low
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Weekly savings (10 sessions/week):
|
|
56
|
-
Tokens saved: 122,000/week
|
|
57
|
-
Cost saved: $0.31/week → $15.86/year (at GPT-4o input pricing, $2.50/M)
|
|
47
|
+
Context footprint (measured where possible; estimates labeled)
|
|
48
|
+
|
|
49
|
+
Surface Tokens
|
|
50
|
+
Full store (every memory as context) 12,840
|
|
51
|
+
Resume digest (measured render) 540
|
|
52
|
+
Recall block (estimate: top-3 rules ≈ chars/4) ~60
|
|
53
|
+
|
|
54
|
+
per-session injected ≈ 600 tokens (estimate) vs 12,840 tokens if the full store were loaded
|
|
58
55
|
```
|
|
59
56
|
|
|
60
|
-
**Why such a big difference?** claude.md loads *all* context every session. memgit
|
|
57
|
+
**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.
|
|
61
58
|
|
|
62
59
|
---
|
|
63
60
|
|
|
@@ -121,9 +118,11 @@ brew tap code4161/tap && brew install memgit
|
|
|
121
118
|
|
|
122
119
|
**Windows:**
|
|
123
120
|
```powershell
|
|
121
|
+
choco install memgit
|
|
122
|
+
# or
|
|
124
123
|
pip install memgit
|
|
125
124
|
```
|
|
126
|
-
(
|
|
125
|
+
(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.)
|
|
127
126
|
|
|
128
127
|
**Any AI tool config (no Python needed — npx auto-installs on first run):**
|
|
129
128
|
```json
|
|
@@ -164,7 +163,7 @@ memgit onboard # mines the repo, prints the bootstrap brief
|
|
|
164
163
|
|
|
165
164
|
`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."
|
|
166
165
|
|
|
167
|
-
Memories are **project-scoped
|
|
166
|
+
Memories 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`.
|
|
168
167
|
|
|
169
168
|
---
|
|
170
169
|
|
|
@@ -255,7 +254,7 @@ The tool descriptions teach the AI **judgment** — "does this request depend on
|
|
|
255
254
|
|
|
256
255
|
A 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.
|
|
257
256
|
|
|
258
|
-
`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
|
|
257
|
+
`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.
|
|
259
258
|
|
|
260
259
|
And 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.
|
|
261
260
|
|
|
@@ -279,14 +278,14 @@ Measured across 289 real sessions: injected recall reached ~59% of them, but onl
|
|
|
279
278
|
# Core (git-like)
|
|
280
279
|
memgit init # initialize store (auto-detects best path)
|
|
281
280
|
memgit onboard # bootstrap brief for an existing codebase
|
|
282
|
-
memgit add <slug> <rule> # stage a memory (--body detail, --project scope, --supersedes old-slug)
|
|
281
|
+
memgit add <slug> <rule> # stage a memory (--body detail, --project scope, --global everywhere, --supersedes old-slug)
|
|
283
282
|
memgit commit -m "message" # checkpoint current state
|
|
284
283
|
memgit log # history
|
|
285
284
|
memgit diff [sha1] [sha2] # what changed
|
|
286
285
|
memgit show <slug> # display a memory
|
|
287
286
|
memgit remove <slug> # remove from active index (history preserved)
|
|
288
287
|
memgit status # staged changes
|
|
289
|
-
memgit search <query> # BM25
|
|
288
|
+
memgit search <query> # BM25 search, scoped to this project + global (--all-projects to widen)
|
|
290
289
|
memgit rollback <ref> # restore state to a checkpoint (HEAD~N or SHA)
|
|
291
290
|
memgit resume # where we left off — session-start digest
|
|
292
291
|
memgit merge <thread> # three-way merge a thread into the current one
|
|
@@ -300,9 +299,11 @@ memgit core heal # self-repair a guide that has drifted
|
|
|
300
299
|
|
|
301
300
|
# Scale & proof
|
|
302
301
|
memgit squash # compress old history (archives what it collapses)
|
|
303
|
-
memgit gc # reclaim disk: sweep unreachable objects
|
|
304
|
-
memgit stats #
|
|
305
|
-
memgit
|
|
302
|
+
memgit gc # reclaim disk: sweep unreachable objects + stale session caches
|
|
303
|
+
memgit stats # measured context costs + disk usage
|
|
304
|
+
memgit doctor # hygiene report: quarantined/_unknown memories, stale caches, orphaned usage
|
|
305
|
+
memgit doctor --relabel map.json # bulk re-project memories ({"slug": "Label" | ""}); one checkpoint
|
|
306
|
+
memgit lint # validate all memories (flags unknown provenance)
|
|
306
307
|
memgit fsck # verify store integrity
|
|
307
308
|
|
|
308
309
|
# Import / export
|
|
@@ -436,7 +437,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
436
437
|
- [x] `memgit gc` — space reclamation (mark-and-sweep, lossless squash archive)
|
|
437
438
|
- [x] Multi-agent write safety — store lock, auto-merge commits, `memgit merge`
|
|
438
439
|
- [x] PyPI + Homebrew (tap) + npm published (v0.1.5)
|
|
439
|
-
- [
|
|
440
|
+
- [x] Chocolatey — live on community.chocolatey.org (`choco install memgit`)
|
|
440
441
|
- [x] Interactive setup wizard (`memgit setup`)
|
|
441
442
|
- [x] Smart `memgit init` (auto-detects tool, no path needed)
|
|
442
443
|
- [x] Lossless memories — full `body` alongside the compact rule (v0.3.0)
|