From 6fc647568d63629f11c3a6ef9d43c498a3fb6802 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh <6995377+vib795@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:49:59 -0500 Subject: [PATCH 1/2] docs: re-measure every figure at 0.7.4 ARCHITECTURE.md still described the package as it stood at v0.6.4: 3,574 lines, 97 tests, 13 commands, and a digest.js doing "two-tier routing". All four were true when written and none survived the 0.7.x releases -- digest.js nearly tripled carrying the nudge and the brief, cli.js grew a fourteenth command, and the suite went to 111. The module table was stale row by row, not just in its total, so it is re-measured from `wc -l` rather than adjusted. Every number here now comes from the source at this commit. README's dev-link example still printed 0.6.5 in its `npm list -g` output. The README ships inside the tarball, so a stale figure there is served to everyone who opens the package page on npmjs.com -- which is the whole reason a docs-only change still earns a release. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014fSLBRUVVhAauWDuzJM4mc --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- ARCHITECTURE.md | 16 ++++++++-------- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 39fe148..1f97457 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "name": "agent-memory", "source": "./", "description": "Durable cross-repository memory for coding agents — built to survive an IT security review. Zero runtime dependencies, zero dev dependencies, no install script: nothing runs when you install it, and granting it your agents is a separate explicit command. Independently scanned, with a passing verdict. Adds /handoff, /remember and /recall over one local markdown store. Requires the CLI: npm install -g @vib795/agent-memory (Node >= 22.5).", - "version": "0.7.3", + "version": "0.7.4", "author": { "name": "Utkarsh Singh", "url": "https://github.com/vib795" diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index c6c3783..9c578e4 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "agent-memory", "displayName": "agent-memory", - "version": "0.7.3", + "version": "0.7.4", "description": "Durable cross-repository memory for coding agents — built to survive an IT security review. Zero runtime dependencies, zero dev dependencies, no install script: nothing runs when you install it, and granting it your agents is a separate explicit command. Independently scanned, with a passing verdict. Adds /handoff, /remember and /recall over one local markdown store. Requires the CLI: npm install -g @vib795/agent-memory (Node >= 22.5).", "author": { "name": "Utkarsh Singh", diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index b317c8a..68f13c2 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -3,8 +3,8 @@ How agent-memory is built, and why it is built that way. Every figure here was read from the source rather than written from memory, at -v0.6.4: 15 modules, 3,574 lines of JavaScript, zero runtime dependencies and zero -dev dependencies, 97 tests. +v0.7.4: 15 modules, 4,165 lines of JavaScript, zero runtime dependencies and zero +dev dependencies, 111 tests. --- @@ -472,22 +472,22 @@ The properties that must stay true. Each is covered by the test suite. | Module | Lines | Responsibility | |---|--:|---| -| `cli.js` | 980 | 13 commands; one process, one answer | +| `cli.js` | 1114 | 14 commands; one process, one answer | +| `digest.js` | 556 | three-tier routing: description, tree, brief | +| `compact.js` | 372 | dedupe, supersede, decay, regenerate | | `index-db.js` | 317 | SQLite cache: DDL, reindex, FTS5 search | +| `setup.js` | 297 | install into detected agent surfaces | | `pii.js` | 274 | export-time disclosure control | | `store.js` | 256 | notes as source of truth; frontmatter; atomic upsert | -| `compact.js` | 283 | dedupe, supersede, decay, regenerate | -| `setup.js` | 282 | install into detected agent surfaces | | `staleness.js` | 213 | commit-distance staleness and capture gap | -| `digest.js` | 209 | two-tier routing: description + tree | -| `config.js` | 191 | engagement resolution; two-file config split | +| `config.js` | 197 | engagement resolution; two-file config split | | `targets.js` | 140 | where each agent looks for instructions | | `graph.js` | 99 | recursive CTE traversal + retrieval budget | | `schema.js` | 98 | validate and normalize; reports every problem | | `redact.js` | 97 | capture-time fail-closed secret redaction | | `promptfile.js` | 78 | VS Code prompt files derived from SKILL.md | | `atomic.js` | 57 | atomic write; imports nothing from this package | -| **total** | **3,574** | zero dependencies, 97 tests | +| **total** | **4,165** | zero dependencies, 111 tests | `atomic.js` deliberately imports nothing from the package: `store.js` already imports `config.js`, so putting the atomic write in either would create a cycle. diff --git a/README.md b/README.md index a327232..6a2dd8d 100644 --- a/README.md +++ b/README.md @@ -440,7 +440,7 @@ equivalent and is not: npm links the global install to that folder rather than c it, which shows up as an arrow in `npm list -g`: ``` -`-- @vib795/agent-memory@0.6.5 -> .\..\..\..\agent-memory +`-- @vib795/agent-memory@0.7.4 -> .\..\..\..\agent-memory ``` Move or delete the clone afterwards and the global install points at nothing — the same diff --git a/package-lock.json b/package-lock.json index 8574c65..feacffd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vib795/agent-memory", - "version": "0.7.3", + "version": "0.7.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vib795/agent-memory", - "version": "0.7.3", + "version": "0.7.4", "license": "MIT", "bin": { "agent-memory": "src/cli.js" diff --git a/package.json b/package.json index 6647ee3..0b29c29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vib795/agent-memory", - "version": "0.7.3", + "version": "0.7.4", "description": "Durable cross-repo knowledge graph for GitHub Copilot and Claude Code. Markdown source of truth, disposable SQLite index, zero runtime dependencies.", "keywords": [ "github-copilot", From 5411fa0b1df943018a7646edae5d7a35949d9e24 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh <6995377+vib795@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:55:39 -0500 Subject: [PATCH 2/2] docs: close the CodeRabbit finding, and the two it could not see CodeRabbit caught `## Two-tier routing` sitting directly above a mermaid diagram with three subgraphs in it. My own sweep missed it because the grep was case-sensitive and the heading is capitalised -- the kind of miss that is invisible until someone reads the page rather than greps it. Two more of the same error were outside the diff, so no reviewer would have seen them: - `src/digest.js` still opened "Two-tier routing." and described a module that ended at the tree. It has carried `buildBrief` since 0.7.0. The docblock now says which tiers this module owns and which one it does not, because claiming Tier 3 would be wrong: note bodies and the collision excerpt are assembled in cli.js. - the module table called digest.js "three-tier routing" for the same reason. It builds tiers 1 and 2; that is what it now says. Rewriting that docblock added three lines, which made the line counts I had just corrected wrong again. Re-measured: digest.js 559, total 4,168. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014fSLBRUVVhAauWDuzJM4mc --- ARCHITECTURE.md | 8 ++++---- src/digest.js | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 68f13c2..30f98ee 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -3,7 +3,7 @@ How agent-memory is built, and why it is built that way. Every figure here was read from the source rather than written from memory, at -v0.7.4: 15 modules, 4,165 lines of JavaScript, zero runtime dependencies and zero +v0.7.4: 15 modules, 4,168 lines of JavaScript, zero runtime dependencies and zero dev dependencies, 111 tests. --- @@ -242,7 +242,7 @@ quietly ending. --- -## Two-tier routing +## Three-tier routing The expensive resource is not disk or CPU. It is the model's context window, and the premium request budget behind it. @@ -473,7 +473,7 @@ The properties that must stay true. Each is covered by the test suite. | Module | Lines | Responsibility | |---|--:|---| | `cli.js` | 1114 | 14 commands; one process, one answer | -| `digest.js` | 556 | three-tier routing: description, tree, brief | +| `digest.js` | 559 | tiers 1 and 2: both descriptions, tree, brief | | `compact.js` | 372 | dedupe, supersede, decay, regenerate | | `index-db.js` | 317 | SQLite cache: DDL, reindex, FTS5 search | | `setup.js` | 297 | install into detected agent surfaces | @@ -487,7 +487,7 @@ The properties that must stay true. Each is covered by the test suite. | `redact.js` | 97 | capture-time fail-closed secret redaction | | `promptfile.js` | 78 | VS Code prompt files derived from SKILL.md | | `atomic.js` | 57 | atomic write; imports nothing from this package | -| **total** | **4,165** | zero dependencies, 111 tests | +| **total** | **4,168** | zero dependencies, 111 tests | `atomic.js` deliberately imports nothing from the package: `store.js` already imports `config.js`, so putting the atomic write in either would create a cycle. diff --git a/src/digest.js b/src/digest.js index b6c511b..7f0ab5b 100644 --- a/src/digest.js +++ b/src/digest.js @@ -3,22 +3,25 @@ import { createHash } from 'node:crypto'; import { captureGap, currentRepo } from './staleness.js'; /** - * Two-tier routing. + * Tiers 1 and 2 of a three-tier ladder. * - * Tier 1 is the `recall` skill's description, which is loaded into every chat - * whether or not memory is ever used. It is standing cost, so it has to read like - * a description rather than a document. + * Tier 1 is a skill description, loaded into every chat whether or not memory is ever + * used. It is standing cost, so it has to read like a description rather than a + * document. It has two occupants, not one: `recall`'s description advertises what the + * store knows; `remember`'s advertises what it is missing. Both are the same mechanism + * — a line of frontmatter that code regenerates and every conversation loads — + * pointed at opposite halves of the same problem. * - * Tier 2 is the tree, printed only when `recall` actually fires. Per-invocation - * cost, paid once, and only when someone is already looking something up. + * Tier 2 is printed only when a skill actually fires: the tree for `recall`, the + * capture brief for `remember`. Per-invocation cost, paid once, and only when someone + * is already looking something up or about to write one down. * - * Neither tier costs a premium request. A request is charged per prompt, not per - * tool call, so both of these ride inside a turn that was already paid for. + * Tier 3 — note bodies, and the colliding note that `write` hands back — lives + * outside this module, because by then the question is which note rather than which + * of them. * - * Tier 1 has two occupants, not one. `recall`'s description advertises what the store - * knows; `remember`'s advertises what it is missing. Both are the same mechanism — a - * line of frontmatter that code regenerates and every conversation loads — pointed at - * opposite halves of the same problem. + * Neither tier here costs a premium request. A request is charged per prompt, not per + * tool call, so both of these ride inside a turn that was already paid for. */ // Never dropped from either tier. A constraint is what stops an agent from burning