Skip to content

Commit ad15748

Browse files
NickCirvclaude
andcommitted
release: v4.1.0 "Compass" — ranking headline + honesty pass across all public surfaces
Version bump 4.0.0 → 4.1.0 across package.json, package-lock, server.json (×2). CHANGELOG [Unreleased] → [4.1.0] "Compass"; corrected the stale 'incremental doesn't maintain calls edges' limitation (76b2890 fixed it — now rebuilt atomically) and documented the size-guarded effective-reduction metric. README + install.html: new v4.1 "Compass" callout/showcase led by the ranking moat (PageRank reference graph, callers/callees/impact traversal, day-1 mistakes, per-session value line). Install commitment bumped to engramx@4.1.0. Honesty pass (finishes the long-running softening): - server.json description: '89.1% measured token reduction' → 'up to ~89% structural context reduction (varies by repo)'. - Killed every user-facing 'savings' / 'X% is what you get' framing in install.html + banner.html + marketplace README; softened bare precise '89.1%' marketing headlines to 'up to ~89% structural (not a bill saving, varies)'. README detailed Proof tables keep the committed reproducible 87-file numbers (scoped + caveated) — those are honest by nature. - .gitignore: guard against committing dated bench reports (they embed the absolute project path — caught one as a Category-E leak this session). Audit evidence: tsc clean; full suite 1074/1074 (honesty-claims regression green); build OK; npm pack → engramx-4.1.0.tgz, 53 files, no junk. Leak-audit: 0 sensitive-term hits over the diff + clean-room subagent verdict CLEAN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9e0f2f2 commit ad15748

9 files changed

Lines changed: 86 additions & 71 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ dist/
1111
.aider-context.md
1212
.context/
1313
.cursor/
14-
# Dated benchmark result files (TEMPLATE.csv is tracked for reference)
14+
# Dated benchmark result files (TEMPLATE.csv is tracked for reference).
15+
# Generated reports embed the absolute project path — keep them out of git.
1516
bench/results/*.json
17+
bench/results/real-world-2*.md
1618

1719
# Local planning docs (not published)
1820
.planning/

CHANGELOG.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ All notable changes to engram are documented here. Format based on
66

77
## [Unreleased]
88

9+
## [4.1.0] — 2026-06-03 — "Compass"
10+
911
### Added
1012
- **Ranked context (PageRank).** A real cross-file reference graph is now
1113
built at `engram init` (tree-sitter call/reference extraction → `calls`
1214
edges), and query results are ranked by personalized PageRank over it —
1315
importance flows from who-references-you, recursively, biased toward your
14-
query. Replaces the previous raw edge-degree ordering.
16+
query. Replaces the previous raw edge-degree ordering. engram is the only
17+
tool in its category that *ranks* the graph rather than dumping it.
1518
- **Graph traversal commands:** `engram callers <symbol>`,
1619
`engram callees <symbol>`, `engram impact <symbol>` over the reference graph.
1720
- **Per-session value summary.** A Stop hook prints one line per session:
@@ -26,16 +29,20 @@ All notable changes to engram are documented here. Format based on
2629
*structural context-packet reduction*, not a cost/bill saving (engram's net
2730
agent-loop cost over prompt caching is ~0; the benchmark self-discloses its
2831
baseline). No headline cost claims.
32+
- **Reduction is now honest by construction.** The Read hook only replaces a
33+
file read when its structural packet is actually *smaller* than the file
34+
(`statSync` size-guard) — tiny files pass through untouched, so a reported
35+
saving is never negative. The benchmark reports both raw per-file reduction
36+
and an **effective (size-guarded)** number — what engram actually delivers.
37+
- **Incremental re-index now maintains the reference graph.** The full
38+
`calls`-edge set is rebuilt atomically (single transaction, rollback on
39+
failure) on every init including incremental, so PageRank ranking stays
40+
fresh between full inits — no manual refresh needed.
2941
- **Proactive mistake warnings are high-precision** — only high-confidence
3042
mistakes (git reverts, explicit `engram learn`) warn before an edit;
3143
inferred bug-fix/session mistakes stay browsable via `engram mistakes` but
3244
never nag.
3345

34-
### Known limitations
35-
- The reference graph (and thus PageRank ranking) is rebuilt on **full**
36-
`engram init`. Incremental re-index does not yet maintain `calls` edges, so
37-
ranking can drift between full inits — run `engram init` to refresh.
38-
3946
## [4.0.0] — 2026-05-18 — "Skill Pack"
4047

4148
Engram's memory becomes **active**. v3.x captured mistakes and answered queries when asked; v4.0 surfaces past corrections **before** the agent makes the edit, captures new ones automatically from git history, and ships a sibling marketplace pack so Claude Code users install engram in one command.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="assets/banner-v3.png" alt="engramx — the universal context spine for AI coding tools (v4.0 'Skill Pack')" width="100%">
2+
<img src="assets/banner-v3.png" alt="engramx — the universal context spine for AI coding tools (v4.1 'Compass')" width="100%">
33
</p>
44

55
<p align="center">
@@ -86,8 +86,8 @@ mkdir -p /tmp/engram-demo && cd /tmp/engram-demo && \
8686
echo "export const buggy = () => null;" > src.ts && \
8787
git add -A && git commit -q -m "feat: add buggy helper returning null causing form crashes" && \
8888
git revert --no-edit HEAD > /dev/null && \
89-
npx --yes engramx@4.0.0 init . && \
90-
npx --yes engramx@4.0.0 mistakes
89+
npx --yes engramx@4.1.0 init . && \
90+
npx --yes engramx@4.1.0 mistakes
9191
```
9292

9393
You should see, within 30 seconds, the **bi-temporal pre-mortem** engram auto-captured from your revert:
@@ -115,13 +115,13 @@ Three things broke at the same time. Cursor went usage-based and people started
115115

116116
Engramx is what makes the session last longer. It indexes your codebase into a local SQLite knowledge graph once. Then it intercepts file reads at the agent boundary and replaces them with a structural summary the agent already has the working memory for. Same edit, same diff, same code shipped — fewer tokens consumed in the round trip.
117117

118-
On engramx's own 87-file repo, the **per-file structural context reduction is 89.1%** (codebase-dependent — `bench/real-world.ts` reproduces it on any project you point it at). This is a *structural* token-reduction measured on this codebase, not an agent-loop cost-savings figure, and it varies by repo. Independent migration guides ([dev.to/56kode](https://dev.to/56_kode/why-were-moving-from-cursor-to-claude-code-and-why-you-should-too-9kh), [SpectrumAI Lab](https://spectrumailab.com/blog/claude-code-vs-cursor)) cite engram for the strongest measured structural reduction in the category.
118+
On engramx's own repo the **per-file structural context reduction is ~89%** (89.5% in the latest `bench/real-world.ts` run, size-guarded so it never counts a file engram wouldn't shrink). Across eight real OSS repos it ranges roughly **50–90% — highest on large-file Python/Go codebases, lower on many-small-file projects** (`bench/real-world.ts` reproduces it on any project you point it at). This is a *structural* context-packet reduction measured per file, **not** an agent-loop cost saving, and it varies by repo. Independent migration guides ([dev.to/56kode](https://dev.to/56_kode/why-were-moving-from-cursor-to-claude-code-and-why-you-should-too-9kh), [SpectrumAI Lab](https://spectrumailab.com/blog/claude-code-vs-cursor)) cite engram for the strongest measured structural reduction in the category.
119119

120120
Works in 8 IDEs and counting — Claude Code, Cursor, Cline, Continue.dev, Aider, Windsurf, Zed, OpenAI Codex CLI. One install, one graph, every tool benefits. Apache 2.0. Local SQLite. Nothing leaves your machine.
121121

122-
> **v4.0 "Skill Pack" shipped 2026-05-18in 30 seconds:** Bi-temporal mistakes auto-fire before your agent repeats them. Fresh installs auto-capture mistakes from git revert history. Hook auto-installs on `engram init`. Skill-pack sibling repo ships engram to the Claude Code Marketplace in one command.
122+
> **v4.1 "Compass" shipped 2026-06-03engram now ranks the graph.** A real cross-file reference graph (tree-sitter `calls` edges) is built at `engram init`, and query results are ranked by **personalized PageRank** over it — importance flows from who-references-you, recursively, biased toward your query, instead of raw edge-degree. engram is the only tool in its category that *ranks* the graph rather than dumping it. New traversal commands `engram callers <symbol>`, `engram callees <symbol>`, and `engram impact <symbol>` walk the same edges.
123123
>
124-
> v3.x captured mistakes when asked; v4.0 surfaces past corrections *before* the agent makes the edit. Schema v9 adds four bi-temporal fields per mistake (`then_believed`, `found_false_at`, `truth_now`, `applies_to`). A new **git-revert miner** auto-populates them from your repo's revert history — fresh `engram init` produces a non-empty mistakes table within seconds, no manual seeding needed. `engram init` now **auto-installs** the Sentinel hook by default (opt out with `--no-hook`) and the mistake-guard runs in `permissive` mode by default (opt out with `ENGRAM_MISTAKE_GUARD=0`). Sibling repo **[engram-skill-pack](https://github.com/NickCirv/engram-skill-pack)** ships engram as Claude Code Skills via the Anthropic Marketplace — three active skills (`engram-mistakes`, `engram-query`, `engram-gods`), full five-skill surface in v0.3.0. **Mesh moves to v4.5** behind `ENGRAM_MESH_EXPERIMENTAL=1`; the May 18 strategic re-cut prioritised distribution-via-skills over federation. 1025 tests passing. See [CHANGELOG.md](CHANGELOG.md) for the full v4.0 diff.
124+
> Also new: **day-1 mistakes** — a bug-fix-commit miner (`fix:` / `fixes #N`, not just rare reverts) means a fresh `engram init` surfaces real landmines immediately, and a **per-session value line** (Stop hook) shows what engram kept out of context each session. And the **honesty pass**: every surface now frames the per-file win as a *structural context-packet reduction, not a cost saving* (engram's net agent-loop cost over prompt caching is ~0); the Read hook is size-guarded so a reported reduction is never negative, and `bench/real-world.ts` self-discloses its baseline. Incremental re-index now maintains the reference graph atomically, so ranking stays fresh between full inits. 1074 tests passing. See [CHANGELOG.md](CHANGELOG.md) for the full v4.1 diff (and v4.0 "Skill Pack" — bi-temporal mistakes from git-revert history).
125125
126126
<details>
127127
<summary><strong>Earlier release notes (v3.4 "Universal Spine", May 2)</strong></summary>
@@ -181,9 +181,9 @@ Your AI coding agent keeps re-reading the same files. Every `Read`, every `Edit`
181181

182182
The agent gets what it needs, structured. And **every plugin you add extends what engram can surface** — Serena for LSP symbols, GitHub MCP for issue context, Sentry MCP for production errors, Supabase / Neon for schema. Each one closes a context gap the agent would otherwise spend turns researching. (More providers = more capability; whether they net fewer tokens on a given task depends on the task — measure it on yours.)
183183

184-
**Per-file structural reduction on a reproducible benchmark: 89.1%** (engramx's own codebase; structural token reduction, not agent-loop cost). 85 of 87 real source files saw reduced per-file token cost. Best case 98.4% (18,820 tokens → 306). Your per-repo numbers vary.
184+
**Per-file structural reduction on a reproducible benchmark: up to ~89%** (engramx's own codebase; structural token reduction, not agent-loop cost). On the committed 87-file run, 85 of 87 real source files saw reduced per-file token cost, best case 98.4% (18,820 tokens → 306); a fresh sample of 50 files reduces ~89.5% aggregate. Your per-repo numbers vary — run it on yours.
185185

186-
> **What this number is (and isn't):** 89.1% is a *per-file structural context reduction* measured on engramx's own repo with all 9 providers active — it measures how much smaller engram's context packet is than reading the full files raw. It is **not** an agent-loop cost-savings figure and will differ on your codebase. Your actual dollar saving depends on your prompt-caching setup and workload — run the benchmark on your own repo (see [Benchmark](#benchmark)) to get your structural number.
186+
> **What this number is (and isn't):** ~89% is a *per-file structural context reduction* measured on engramx's own repo with all 9 providers active — it measures how much smaller engram's context packet is than reading the full files raw. It is **not** an agent-loop cost-savings figure and will differ on your codebase. Your actual dollar saving depends on your prompt-caching setup and workload — run the benchmark on your own repo (see [Benchmark](#benchmark)) to get your structural number.
187187
188188
### One command to everything
189189

assets/banner.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,14 @@ <h1>engr<span>a</span>m<span>X</span></h1>
301301
<span class="prompt">$</span> <span class="cmd">npm install -g engramx</span><br>
302302
<span class="prompt">$</span> <span class="cmd">engram setup</span><br>
303303
<span class="output">↳ indexed, hooked, dual-emit AGENTS.md + CLAUDE.md</span><br>
304-
<span class="output">📉 89.1% measured token savings on 87 files</span><br>
304+
<span class="output">📉 up to ~89% structural context reduction (own repo, varies)</span><br>
305305
<span class="highlight">✅ next session reads from the spine.</span>
306306
</div>
307307
</div>
308308

309309
<!-- Bottom bar -->
310310
<div class="bottom-bar">
311-
<div class="stat"><span class="stat-value">89.1%</span> measured savings</div>
311+
<div class="stat"><span class="stat-value">~89%</span> structural reduction</div>
312312
<div class="stat"><span class="stat-value">9 + plugins</span> providers</div>
313313
<div class="stat"><span class="stat-value">0</span> LLM cost · <span class="stat-value">0</span> cloud</div>
314314
<div class="stat">works with <span class="stat-value">Claude Code</span> · <span class="stat-value">Cursor</span> · <span class="stat-value">Codex</span> · any AGENTS.md agent</div>

0 commit comments

Comments
 (0)