claude-memory-admin 1.3.0 → 1.5.0

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.
package/README.md CHANGED
@@ -80,7 +80,9 @@ project is to the cliff, and makes it quick to get back under it.
80
80
  session transcripts on a retention period but never touches `memory/`, so a
81
81
  project eventually loses the only proof of what it was called. **Remember
82
82
  path** records one you confirm, and is the single thing this app writes
83
- outside a `memory/` directory.
83
+ outside a `memory/` directory. It is now offered *before* that happens: the
84
+ project header counts down the days until the last transcript naming the
85
+ project is swept, rather than waiting until the name is already gone.
84
86
  - **Where the store is** is read the way Claude Code reads it: `autoMemoryDirectory`
85
87
  from any settings layer, managed policy through project and local, not just
86
88
  `~/.claude/settings.json`. A value that is neither absolute nor `~/`-prefixed
@@ -96,9 +98,33 @@ project is to the cliff, and makes it quick to get back under it.
96
98
  - **Prune** (see below).
97
99
  - **Graph** the wikilinks between memories. Hovering dims everything that is not
98
100
  a neighbour, which is the only practical way to read a dense cluster.
101
+ - **Where each memory came from.** Claude Code stamps `originSessionId` into a
102
+ memory's frontmatter, and the transcript it names sits next to the store until
103
+ the sweep takes it. The memory reads *written in "Release process notes", on
104
+ `main`* while that transcript is there, and says so plainly once it is gone:
105
+ a swept id is struck through in red, like a dead wikilink, because why the
106
+ memory exists can no longer be traced from anything on disk.
107
+ - **Sessions**: the transcripts beside a store, with the retention window drawn
108
+ the way MEMORY.md's cutoff is - each session a tick, the sweep line where it
109
+ falls. Titles are the ones Claude Code generated, falling back to the session
110
+ slug and then the opening prompt; a session that names itself nowhere in the
111
+ part read is shown by id rather than given an invented name. Only the head of
112
+ each file is ever read, so a 200MB store of transcripts costs a quarter of a
113
+ second, and nothing on this tab deletes one.
99
114
  - **Health**: orphans, dangling pointers, broken wikilinks, files linked only
100
- mid-sentence, `name` fields that disagree with the filename. An orphan can be
101
- given the `MEMORY.md` bullet it is missing without leaving the page.
115
+ mid-sentence, `name` fields that disagree with the filename, two files claiming
116
+ one `name`, a file bulleted twice, a blank `description`, a `type` outside the
117
+ four documented ones, a memory that is frontmatter and little else, a hook that
118
+ only restates the description it points at, a heading with nothing under it, and
119
+ entries that spill onto a second line, a memory whose origin transcript has
120
+ been swept, a project whose last proof of its own path is about to be, and
121
+ sessions that produced no memory at all while auto memory was on. An orphan
122
+ can be given the `MEMORY.md` bullet it is missing without leaving the page.
123
+ - **Every count is visible before you click.** Each tab carries a badge, coloured
124
+ amber for something to tidy and red for something actively broken, and the
125
+ sidebar gives each store a dot of its worst severity - memory, instructions and
126
+ settings together. Which project is in trouble is the first thing the app tells
127
+ you, not something you find by opening eight tabs each.
102
128
  - **Dates you can trust.** Claude Code stamps `modified` into frontmatter, but
103
129
  only on files that already have some, and never adds frontmatter to a file
104
130
  without it. Anything falling back to the file's mtime is labelled, because
@@ -178,6 +204,11 @@ It also finds the failures that leave a file silently doing nothing:
178
204
  - A markdown file sitting in `~/.claude` that nothing in the chain reaches. It
179
205
  looks load-bearing and loads nothing, which is what happens when the import
180
206
  that pulled it in is deleted or its content is inlined.
207
+ - One file reached by two chains - your `~/.claude/CLAUDE.md` and the project's
208
+ own both importing it, say. Both copies load, and you pay for the content twice
209
+ every session.
210
+ - A `CLAUDE.md` or rule file that is empty apart from its frontmatter. It costs a
211
+ read and contributes no instruction.
181
212
 
182
213
  Backticks are respected, so a `` `@README` `` in your prose is not reported as an
183
214
  import, and neither is an email address.
@@ -200,6 +231,26 @@ This is re-derived from the documented resolution rules rather than reported by
200
231
  Claude Code, and the tab says so. Run `/context` in a session for the ground
201
232
  truth, or the `InstructionsLoaded` hook to log exactly what loaded and why.
202
233
 
234
+ ## The one check that reads your code
235
+
236
+ Every check above reads `memory/` and the `CLAUDE.md` chain, and nothing else.
237
+ One more is available and **off by default**, because it reads the project itself:
238
+ it takes the paths a memory names in a code span and asks whether anything in the
239
+ repository still matches them. A memory whose `Foo.cs` was renamed two months ago
240
+ still reads as authoritative, and nothing else on this page can tell.
241
+
242
+ Turn it on from the Health tab, per store; the choice is remembered in the browser
243
+ and nothing is written to disk. It walks the project once, skipping `.git`,
244
+ `node_modules`, build output and the like, and matches by suffix - a memory that
245
+ says `Infrastructure/Reporting/Foo.cs` for a file that really lives under
246
+ `services/argus/src` is right, and resolving that against the repository root
247
+ alone reported seven real paths in ten as missing. Only a token with a real source
248
+ extension is treated as a claim about a file, because memories are also full of
249
+ HTTP routes and type names that no file was ever going to match.
250
+
251
+ It is a pointer, not a verdict, and the tab says so: a file that moved reads the
252
+ same as one the memory never got right.
253
+
203
254
  ## Which settings are actually in force
204
255
 
205
256
  Five files can set the keys this tool cares about, and the one everybody edits,
@@ -274,6 +325,15 @@ claude-memory-admin --root /tmp/memory-snapshot
274
325
  ## Safety
275
326
 
276
327
  - Binds `127.0.0.1`; no telemetry, no network calls.
328
+ - Reads only `~/.claude/projects`, the agent memory directories and the `CLAUDE.md`
329
+ chain, unless you switch on the path check above, which then also walks that one
330
+ project's directory. It only ever reads: no path a memory names is opened, only
331
+ looked up in an index built from the project itself.
332
+ - Session transcripts are read at the head only, 16KB and then at most 128KB, and
333
+ never deleted or rewritten. A transcript here reaches 13MB and the app has no
334
+ reason to hold one in memory. A session id read out of frontmatter is matched
335
+ against a strict id shape before it is joined to a path, and only ever looked
336
+ for in the store's own directory.
277
337
  - Every write target must resolve to a plain `.md` file inside that project's own
278
338
  `memory/` directory. `..`, absolute paths and subdirectories are refused.
279
339
  - One exception, and only when you ask for it: **Remember path** writes
@@ -317,9 +377,12 @@ ready to serve and never builds anything. After editing the source, run
317
377
  | `src/projects.mjs` | Project discovery, slug → real path resolution |
318
378
  | `src/settings.mjs` | Layered reads of Claude Code's settings files, and the report behind the Settings tab |
319
379
  | `src/pathcache.mjs` | The opt-in record of confirmed project paths |
380
+ | `src/sessions.mjs` | Session transcripts: bounded head reads, retention, provenance |
320
381
  | `src/stores.mjs` | Store discovery: the user scope, auto memory and the three agent scopes |
321
382
  | `src/instructions.mjs` | CLAUDE.md chain, `@` imports and rules resolution |
322
383
  | `src/parse.mjs` | `MEMORY.md` and frontmatter parsers, wikilinks |
384
+ | `src/checks.mjs` | The consistency checks, as pure functions over parsed data |
385
+ | `src/pathcheck.mjs` | The opt-in check of paths a memory names, against the repo |
323
386
  | `src/model.mjs` | Joins index, files, graph and health into one model |
324
387
  | `src/stats.mjs` | Load-limit accounting and overlap detection |
325
388
  | `src/search.mjs` | Full-text search across every store |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-memory-admin",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Browse, audit and prune the auto memory Claude Code keeps under ~/.claude/projects",
5
5
  "keywords": [
6
6
  "claude",