[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2911":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":14,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":16,"starSnapshotCount":16,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},2911,"engram","NickCirv\u002Fengram","NickCirv","The context spine that 10x's every AI coding session. Live in 8 IDEs (Claude Code, Cursor, Cline, Continue, Aider, Codex, Windsurf, Zed) via npm + OpenVSX + Anthropic plugin directory. 89% measured token reduction. Local SQLite, zero cloud, Apache 2.0.","https:\u002F\u002Fgithub.com\u002FNickCirv\u002Fengram",null,"TypeScript",132,13,3,10,0,16,3.44,"Apache License 2.0",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"agent-memory","agent-tools","agents-md","ai","claude-code","claude-code-hooks","cline","context-engineering","context-spine","cursor","developer-tools","engramx","hooks","knowledge-graph","llm","mcp","openvsx","token-optimization","typescript","universal-spine","2026-06-12 02:00:44","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fbanner-v3.png\" alt=\"engramx — the universal context spine for AI coding tools (v4.0 'Skill Pack')\" width=\"100%\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Engram makes your AI coding agent stop re-reading the same files — and stop repeating mistakes your repo already fixed.\u003C\u002Fstrong>\u003Cbr>\n  \u003Csub>One install. 8 IDEs. 89.1% measured token reduction. Bi-temporal mistakes auto-captured from git revert history. Local SQLite, zero cloud, Apache 2.0.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#try-in-30-seconds-no-install\">\u003Cstrong>Try in 30 seconds (no install) ▶\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003C!-- ============================================================\n     24-second product showcase (Hyperframes-rendered MP4 + WebM).\n     Source: docs\u002Fdemos\u002Fshowcase.html · scenes drive both the\n     live HTML player and this MP4. Edit scene-table.md to change.\n     If the MP4 isn't rendered yet, GitHub gracefully shows the\n     poster image and links to the live HTML player.\n     ============================================================ -->\n\u003Cp align=\"center\">\n  \u003Cvideo src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FNickCirv\u002Fengram\u002Fmain\u002Fdocs\u002Fdemos\u002Fshowcase.mp4\"\n         controls\n         muted\n         playsinline\n         poster=\"docs\u002Fdemos\u002Fposter.svg\"\n         width=\"100%\">\n    \u003Ca href=\"docs\u002Fdemos\u002Fshowcase.html\">\n      \u003Cimg src=\"docs\u002Fdemos\u002Fposter.svg\" alt=\"engram — 24-second showcase (click to open the live HTML player)\" width=\"100%\">\n    \u003C\u002Fa>\n  \u003C\u002Fvideo>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Csub>\n    \u003Ca href=\"docs\u002Finstall.html\">\u003Cstrong>Install Page\u003C\u002Fstrong>\u003C\u002Fa> ·\n    \u003Ca href=\"docs\u002Fdemos\u002Fshowcase.html\">\u003Cstrong>Live Demo\u003C\u002Fstrong>\u003C\u002Fa> ·\n    \u003Ca href=\"docs\u002Fdemos\u002Fscene-table.md\">\u003Cstrong>Scene Table\u003C\u002Fstrong>\u003C\u002Fa> ·\n    rendered with \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fheygen-com\u002Fhyperframes\">Hyperframes\u003C\u002Fa>\n  \u003C\u002Fsub>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#install\">\u003Cstrong>Install\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#quickstart\">\u003Cstrong>Quickstart\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#dashboard\">\u003Cstrong>Dashboard\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#benchmark\">\u003Cstrong>Benchmark\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#ide-integrations\">\u003Cstrong>IDE Integrations\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#http-api\">\u003Cstrong>HTTP API\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#ecp-spec\">\u003Cstrong>ECP Spec\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\"#contributing\">\u003Cstrong>Contributing\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FNickCirv\u002Fengram\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FNickCirv\u002Fengram\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fengramx\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fengramx?color=blue&label=engramx\" alt=\"npm engramx\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fengramx-continue\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fengramx-continue?color=blue&label=engramx-continue\" alt=\"npm engramx-continue\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopen-vsx.org\u002Fextension\u002Fnickcirv\u002Fengram-vscode\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fopen-vsx\u002Fv\u002Fnickcirv\u002Fengram-vscode?color=blue&label=OpenVSX\" alt=\"OpenVSX engram-vscode\">\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue\" alt=\"License\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D20-brightgreen\" alt=\"Node\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-1025%20passing-brightgreen\" alt=\"Tests\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftoken%20savings-89.1%25%20measured-orange\" alt=\"89.1% measured savings\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnative%20deps-zero-green\" alt=\"Zero native deps\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLLM%20cost-$0-green\" alt=\"Zero LLM cost\">\n\u003C\u002Fp>\n\n---\n\n## Try in 30 seconds (no install)\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fasciinema.org\u002Fa\u002FGjjvPXVyArnivAog\">\n    \u003Cimg src=\"https:\u002F\u002Fasciinema.org\u002Fa\u002FGjjvPXVyArnivAog.svg\" alt=\"engram v4.0 demo — bi-temporal mistakes auto-captured from git revert (30 seconds)\" width=\"100%\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Csub>▶ \u003Ca href=\"https:\u002F\u002Fasciinema.org\u002Fa\u002FGjjvPXVyArnivAog\">\u003Cstrong>Play the live recording\u003C\u002Fstrong>\u003C\u002Fa> · or get the raw cast at \u003Ca href=\"docs\u002Fdemos\u002Fv4-skill-pack.cast\">\u003Ccode>docs\u002Fdemos\u002Fv4-skill-pack.cast\u003C\u002Fcode>\u003C\u002Fa> (\u003Ccode>asciinema play\u003C\u002Fcode>) · or generate it yourself with \u003Ca href=\"docs\u002Fdemos\u002Fv4-skill-pack-demo.sh\">\u003Ccode>v4-skill-pack-demo.sh\u003C\u002Fcode>\u003C\u002Fa>\u003C\u002Fsub>\n\u003C\u002Fp>\n\nOr paste this into your terminal — same flow, no global install, no commitment. Creates a throwaway repo with a reverted bug, then runs engram against the public npm registry:\n\n```bash\nmkdir -p \u002Ftmp\u002Fengram-demo && cd \u002Ftmp\u002Fengram-demo && \\\n  git init -q && git commit --allow-empty -q -m \"init\" && \\\n  echo \"export const buggy = () => null;\" > src.ts && \\\n  git add -A && git commit -q -m \"feat: add buggy helper returning null causing form crashes\" && \\\n  git revert --no-edit HEAD > \u002Fdev\u002Fnull && \\\n  npx --yes engramx@4.0.0 init . && \\\n  npx --yes engramx@4.0.0 mistakes\n```\n\nYou should see, within 30 seconds, the **bi-temporal pre-mortem** engram auto-captured from your revert:\n\n```\n⚠️  1 mistake(s) recorded:\n\n⚠ Mistake #1 — 2026-05-19\n  ┌─ then you believed: feat: add buggy helper returning null causing form crashes\n  ├─ found false:       2026-05-19\n  └─ truth now:         Reverted in \u003Csha> (2026-05-19)\n     ref:        src.ts\n     applies to: git revert touching src\n```\n\nThat's the rave moment — engram remembering what your AI agent forgot, surfaced *before* the next edit. Multiply this across your actual repo's revert history, and it works on every Claude Code session automatically.\n\nWhen you're ready: scroll to [Install](#install-in-30-seconds) for the global install path.\n\n---\n\n## Why this exists, May 2026\n\nThree things broke at the same time. Cursor went usage-based and people started getting $1,400 surprise bills. Anthropic tightened Claude Code limits, then quietly tested removing it from the $20 Pro plan. Half the AI coding crowd migrated from one tool to the other, hit the new ceiling within a week, and started looking for any way to make a session last longer.\n\nEngramx 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.\n\nOn a real 87-file repo, the measured reduction is **89.1%**. That's not a marketing number. The benchmark is committed to this repo as `bench\u002Freal-world.ts` and runs against any project you point it at. Independent migration guides ([dev.to\u002F56kode](https:\u002F\u002Fdev.to\u002F56_kode\u002Fwhy-were-moving-from-cursor-to-claude-code-and-why-you-should-too-9kh), [SpectrumAI Lab](https:\u002F\u002Fspectrumailab.com\u002Fblog\u002Fclaude-code-vs-cursor)) cite engram as the strongest measured number in the category.\n\nWorks 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.\n\n> **v4.0 \"Skill Pack\" shipped 2026-05-18 — in 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.\n>\n> 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:\u002F\u002Fgithub.com\u002FNickCirv\u002Fengram-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.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Earlier release notes (v3.4 \"Universal Spine\", May 2)\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n**v3.4 \"Universal Spine\" shipped 2026-05-02** — multi-IDE detector covers 8 tools, Anthropic Claude Code plugin submitted to the official directory ([in review](https:\u002F\u002Fclaude.ai\u002Fsettings\u002Fplugins)), VS Code \u002F Cursor extension live as [`nickcirv.engram-vscode`](https:\u002F\u002Fopen-vsx.org\u002Fextension\u002Fnickcirv\u002Fengram-vscode) on OpenVSX, [`engramx-continue`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fengramx-continue) on npm, Cline integration documented. Cost Lens telemetry from v3.3.0 feeds a weekly Markdown digest at `~\u002F.engram\u002Fcost-report-YYYY-Www.md`. 1007 tests, CI green on Ubuntu + Windows × Node 20 + 22.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Earlier release notes (v3.0 \"Spine\", April 24)\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nEngramX v3.0 \"Spine\" shipped 2026-04-24 — the biggest release before v3.4. The spine is **extensible**: any MCP server becomes an EngramX provider via a 10-line plugin file. **Pre-mortem mistake-guard** warns before you repeat a bug. **Bi-temporal mistake memory** — refactored-away mistakes stop firing. **Anthropic Auto-Memory bridge** reads Claude Code's own consolidated memory. **SSE-streaming** packets render progressively. `engram gen` dual-emits `AGENTS.md` + `CLAUDE.md` by default.\n\n\u003C\u002Fdetails>\n\n---\n\n## Install in 30 seconds\n\nThree paths depending on where you want engram to live. All three install the **same engram**; you can stack them.\n\n### 1. CLI (recommended starting point — works in every supported IDE)\n\n```bash\nnpm install -g engramx\ncd ~\u002Fyour-project\nengram setup\n```\n\n`engram setup` auto-detects every supported IDE on your machine (Claude Code, Cursor, Cline, Continue, Aider, Windsurf, Zed, Codex CLI) and prints the next step for each. You don't have to remember which command to run for which tool.\n\n### 2. Cursor \u002F VS Code extension (live on OpenVSX)\n\n```bash\ncode --install-extension nickcirv.engram-vscode\n```\n\nAdds six commands to the Cursor \u002F VS Code command palette plus a status-bar entry that opens the cost dashboard with one click. [Listing on OpenVSX](https:\u002F\u002Fopen-vsx.org\u002Fextension\u002Fnickcirv\u002Fengram-vscode).\n\n### 3. Continue.dev users\n\n```bash\nnpm install engramx-continue\n```\n\nAdds engram as an `@engram` context provider. [Package on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fengramx-continue) · [Integration docs](docs\u002Fintegrations\u002Fcontinue.md).\n\n> The Anthropic Claude Code plugin (`\u002Fplugin install engram` from the official directory) is in review as of 2026-05-02. When it lands, that's a fourth install path with zero CLI steps. Until then, path 1 covers Claude Code via hooks.\n\n---\n\n# EngramX — the cached context spine for AI coding agents.\n\nYour AI coding agent keeps re-reading the same files. Every `Read`, every `Edit`, every `cat` re-pays for context you've already paid for.\n\n**EngramX is the spine.** It intercepts every file read at the tool boundary, answers from a pre-assembled context packet held in **three layers of cache** — a knowledge graph the agent has already \"paid\" to build, a per-provider SQLite cache of external lookups, and an in-memory LRU of recent queries — and hands the agent a single ~500-token response instead of a raw file.\n\nThe agent gets what it needs. You stop paying for context you've already paid for. And **every plugin you add elevates the savings further** — Serena for LSP symbols, GitHub MCP for issue context, Sentry MCP for production errors, Supabase \u002F Neon for schema. Each one closes another context leak the agent would otherwise burn tokens researching.\n\n**Measured savings on a reproducible benchmark: 89.1%.** Not estimated. 85 of 87 real source files saved tokens. Best case 98.4% (18,820 tokens → 306).\n\n### One command to everything\n\n```bash\nnpm install -g engramx\ncd ~\u002Fmy-project\nengram setup\n```\n\nThat's the install. `engram setup` runs `engram init` (builds the graph), `engram install-hook` (wires the Sentinel into your AI tool), detects your IDE, dual-emits `AGENTS.md` + `CLAUDE.md`, then runs `engram doctor` to verify everything green. Under 30 seconds on most projects. Works in Claude Code, Cursor, Codex CLI, Windsurf, GitHub Copilot Chat, JetBrains Junie, Aider, Zed, Continue — any agent that reads `AGENTS.md` or uses MCP.\n\nThe **next session** you open starts with the spine pre-loaded: project brief already in context, file reads intercepted, a live HUD showing cumulative savings, bi-temporal mistakes waiting to warn you, and any plugins you've added already answering their domains.\n\n---\n\n## I'm not a developer — what does this actually do?\n\nShort answer: **your AI coding assistant stops charging you for the same information twice.**\n\nLong answer:\n\n1. You ask your AI assistant (Claude Code, Cursor, Codex, whatever) to help with a file.\n2. The assistant tries to read that file. Normally it reads the whole thing, pays for every byte in tokens, and throws most of it away.\n3. EngramX catches the read, answers with a cached summary (the 50–200 lines the agent actually needs, plus context from your git history, past mistakes, library docs, and anything else useful), and lets the agent work from that.\n4. Your monthly AI bill drops. Multi-hour sessions stop hitting rate limits. The agent stops re-introducing bugs you already fixed — because EngramX remembers what broke.\n\nIt runs on your laptop. It doesn't send your code anywhere. It's Apache 2.0. There's no account, no login, no cloud. You install it once and forget it's there.\n\n**Want even bigger savings?** Install a plugin. Each one closes a different context leak — see [Plugins multiply the savings](#plugins-multiply-the-savings) below. Drop a 10-line `.mjs` file in `~\u002F.engram\u002Fplugins\u002F` and the next session uses it.\n\n**Want out?** Clean uninstall is one command:\n\n```bash\nnpm uninstall -g engramx     # 3.0.1+ auto-runs preuninstall hook-cleanup\n```\n\nIf you installed 3.0.0 and ran `npm uninstall` before the 3.0.1 patch shipped, your Claude Code hooks may be orphaned. Run `engram repair-hooks --scope user` (install 3.0.1 first if needed) or see the [`CHANGELOG.md`](CHANGELOG.md#301--2026-04-24--clean-uninstall) for the manual `jq`-based recovery one-liner.\n\n---\n\n## Proof, not promises\n\nEverything above is measured, not estimated. `bench\u002Freal-world.ts` runs the full resolver against real files in this repo and compares the rich-packet token cost to the raw-file-read cost. Reproducible in one command on any project.\n\nLatest run (2026-04-24, 87 source files — full report at [`bench\u002Fresults\u002Freal-world-2026-04-24.md`](bench\u002Fresults\u002Freal-world-2026-04-24.md)):\n\n| Metric | Value |\n|---|---|\n| Baseline tokens (87 files read raw) | **163,122** |\n| engramx tokens (rich packets) | **17,722** |\n| Aggregate savings | **89.1%** |\n| Median per-file savings | 84.2% |\n| Files where engramx saved tokens | 85 of 87 |\n| Best case (`src\u002Fcli.ts`) | 98.4% (18,820 → 306) |\n\nReproduce on your own code:\n\n```bash\ncd your-project\nengram init                          # first-time setup for this project\nnpx tsx \u002Fpath\u002Fto\u002Fengram\u002Fbench\u002Freal-world.ts --project . --files 50\n```\n\nThe bench writes a JSON + Markdown report per run into `bench\u002Fresults\u002F`. Small projects score lower; dense structural projects score higher. It's real arithmetic on your files — you can audit every number.\n\n---\n\n## What engramx is not\n\nThe \"engram\" name is contested. To save you a search:\n\n- **Not Go-Engram** ([Gentleman-Programming\u002Fengram](https:\u002F\u002Fgithub.com\u002FGentleman-Programming\u002Fengram)) — different project, Go binary, salience-gated chat memory. Ships under `engram` (without the `x`).\n- **Not DeepSeek's \"Engram\" paper** — January 2026 academic work on conditional memory. Research artifact, not a product.\n- **Not MemPalace** — adjacent positioning (\"knowledge-graph memory,\" \"method-of-loci\"), but conversational memory, not code-structural.\n\n`engramx` is specifically: **a local-first context spine for AI coding agents that hooks into your IDE's tool boundary, indexes your code via tree-sitter + LSP, remembers past mistakes, and assembles ~500-token context packets in place of raw file reads.** Open source, Apache 2.0, single npm install.\n\n---\n\n## Dashboard\n\nA zero-dependency web dashboard ships built-in. One command, opens in your browser:\n\n```bash\nengram ui\n```\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fscreenshots\u002F01-overview.png\" alt=\"engram dashboard — Overview tab\" width=\"100%\">\n\u003C\u002Fp>\n\nThe **Overview** tab: real metrics from your sessions — tokens saved, cost saved at $3\u002FM rate, session-level hit rate, cache performance, graph health.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fscreenshots\u002F03-activity.png\" alt=\"engram dashboard — Activity tab\" width=\"100%\">\n\u003C\u002Fp>\n\n**Activity** — live hook events streamed via Server-Sent Events. See every `Read` \u002F `Edit` \u002F `Write` decision (deny = intercepted, passthrough = engram couldn't help). Per-tool breakdown on the right shows where the savings come from.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fscreenshots\u002F04-files.png\" alt=\"engram dashboard — Files heatmap\" width=\"100%\">\n\u003C\u002Fp>\n\n**Files** — the heatmap ranks your hot files by interception count. Cursor knows this view.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fscreenshots\u002F05-graph.png\" alt=\"engram dashboard — Knowledge graph visualization\" width=\"100%\">\n\u003C\u002Fp>\n\n**Graph** — Canvas 2D force-directed visualization of the knowledge graph. God nodes are larger and labeled. Drag to pan, scroll to zoom, click for details. 300+ nodes at 60fps.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fscreenshots\u002F06-providers.png\" alt=\"engram dashboard — Providers + cache health\" width=\"100%\">\n\u003C\u002Fp>\n\n**Providers** — component health (HTTP \u002F LSP \u002F AST \u002F IDE count) and per-layer cache stats (entries + cross-session hit counts).\n\n### Design\n\n- **35KB total** — one HTTP response, zero external CDN calls, works offline and on air-gapped machines.\n- **Zero runtime dependencies** — all CSS and JS inlined as TypeScript template literals; SVG charts and Canvas 2D graph hand-rolled (~400 LOC total).\n- **CSP-hardened** — `default-src 'self'; connect-src 'self'` meta tag plus `esc()` at every data-to-HTML boundary. Defends against attacker-controlled file paths and labels mined from untrusted repos.\n- **Live-updating** — SSE stream pushes new hook events to the Activity tab within 1 second.\n\nSee also the **Sessions** tab (cumulative breakdown + sparkline) in [`assets\u002Fscreenshots\u002F02-sessions.png`](assets\u002Fscreenshots\u002F02-sessions.png).\n\n---\n\n## Benchmark\n\nengramx ships with two benchmarks — use whichever fits your workflow.\n\n### Real-world bench (new in v3.0, preferred)\n\n`npx tsx bench\u002Freal-world.ts --project . --files 50` runs the full resolver against real files in any project and outputs exact token numbers. See the [Proof](#proof-not-promises) section above for the reproducible 89.1% result on engramx itself.\n\n### Structured task bench (CI regression)\n\nMeasured across 10 structured coding tasks against a baseline of reading the relevant files directly. No synthetic data. No cherry-picked queries.\n\n| Task | Baseline (tokens) | engram (tokens) | Savings |\n|------|:-----------------:|:---------------:|:-------:|\n| task-01-find-caller | 4,500 | 650 | 85.6% |\n| task-02-parent-class | 2,800 | 400 | 85.7% |\n| task-03-file-for-class | 3,200 | 300 | 90.6% |\n| task-04-import-graph | 6,800 | 900 | 86.8% |\n| task-05-exported-api | 5,500 | 700 | 87.3% |\n| task-06-landmine-check | 8,200 | 850 | 89.6% |\n| task-07-architecture-sketch | 14,500 | 1,600 | 89.0% |\n| task-08-refactor-scope | 9,200 | 1,100 | 88.0% |\n| task-09-hot-files | 3,800 | 550 | 85.5% |\n| task-10-cross-file-flow | 12,800 | 1,400 | 89.1% |\n| **Aggregate** | **7,130** | **845** | **88.1%** |\n\nRun it yourself: `npx tsx bench\u002Frunner.ts` (structured fixtures) or `npx tsx bench\u002Freal-world.ts` (live resolver on real files).\n\n---\n\n## Plugins multiply the savings\n\nThe 89.1% number is engramx with its 9 built-in providers. Every MCP server you plug in closes another context gap the agent would otherwise burn tokens researching. And because every provider is budget-capped and the resolver is budget-weighted + mistakes-boost reranked, more plugins = more *relevant* context without packet bloat.\n\n| Plugin | Closes this gap | Install |\n|---|---|---|\n| **Serena** (LSP symbols, 20+ languages) | Cross-file references engramx's AST can't resolve precisely — kills the grep-then-read loop | `cp docs\u002Fplugins\u002Fexamples\u002Fserena-plugin.mjs ~\u002F.engram\u002Fplugins\u002F` |\n| **GitHub MCP** (issues, PRs, commits) | Recent PR discussion & issue history for the file being edited | `engram plugin install github` |\n| **Sentry MCP** (production errors) | \"What broke in prod for this file\" — cuts the open-dashboard → paste-trace loop | `engram plugin install sentry` |\n| **Supabase \u002F Neon** (schema, RLS) | Database schema context when editing queries \u002F migrations \u002F ORM models | `engram plugin install supabase` |\n| **Context7** (library docs) | Always-current API surface for your actual imports | shipped as a built-in |\n| **Anthropic Auto-Memory** | Claude Code's own consolidated project memory | shipped — auto-detected when `~\u002F.claude\u002Fprojects\u002F…\u002Fmemory\u002FMEMORY.md` exists |\n\nWriting a plugin is **~10 lines** — see [`docs\u002Fplugins\u002FREADME.md`](docs\u002Fplugins\u002FREADME.md) for the full spec + examples.\n\n---\n\n## What It Does\n\nengram sits between your AI agent and the filesystem. When the agent reads a file, engram checks its knowledge graph. If the file is covered with sufficient confidence, it blocks the read and injects a compact context packet instead. The packet is assembled from up to 9 built-in providers plus any plugins you've added, all pre-cached at session start.\n\n**The 9 built-in providers (v3.0):**\n\n| Provider | Source | Confidence | Latency |\n|----------|--------|:-----------:|:-------:|\n| `engram:ast` | Tree-sitter parse (10 languages) | 1.0 | \u003C50ms |\n| `engram:structure` | Regex heuristics (fallback) | 0.85 | \u003C50ms |\n| `engram:mistakes` | Past failure nodes (bi-temporal — stale mistakes filtered out) | — | \u003C10ms |\n| `anthropic:memory` | Claude Code's auto-managed `MEMORY.md` index (v3.0) | 0.85 | \u003C10ms |\n| `engram:git` | Co-change patterns, churn, authorship | — | \u003C100ms |\n| `mempalace` | Decisions, learnings, project context | — | \u003C5ms cached |\n| `context7` | Library API docs for detected imports | — | \u003C5ms cached |\n| `obsidian` | Project notes, architecture docs | — | \u003C5ms cached |\n| `engram:lsp` | Live diagnostics captured as mistake nodes | — | on-event |\n\nExternal providers cache into SQLite at SessionStart. Per-read resolution is a cache lookup, not a live call. If a provider is unavailable it is skipped silently — you always get at least the structural summary. **Plus: any MCP server becomes a provider via a 10-line plugin file** — see [Plugins multiply the savings](#plugins-multiply-the-savings) above.\n\n**The 9 hook handlers:**\n\n| Hook | What it does |\n|------|-------------|\n| `PreToolUse:Read` | Blocks the read if file is covered. Delivers structural summary as the block reason. |\n| `PreToolUse:Edit` | Passes through. Injects known mistakes as landmine warnings alongside the edit. |\n| `PreToolUse:Write` | Same as Edit — advisory injection only, never blocks writes. |\n| `PreToolUse:Bash` | Catches `cat \\| head \\| tail \\| less \\| more \u003Csingle-file>` and delegates to the Read handler. |\n| `SessionStart` | Injects a compact project brief (god nodes, graph stats, top landmines, git branch). Bundles MemPalace context in parallel. |\n| `UserPromptSubmit` | Extracts keywords from the prompt, runs a budget-capped pre-query, injects results before the agent responds. |\n| `PostToolUse` | Observer only. Writes to `.engram\u002Fhook-log.jsonl` for `hook-stats`. |\n| `PreCompact` | Re-injects god nodes and active landmines right before Claude compresses the conversation. Survives compaction. |\n| `CwdChanged` | Auto-switches project context when you navigate to a different repo mid-session. |\n\n**Ten safety invariants enforced at runtime:**\n\n1. Any handler error → passthrough (Claude Code is never blocked)\n2. 2-second per-handler timeout\n3. Kill switch (`.engram\u002Fhook-disabled`) respected by every handler\n4. Atomic settings.json writes with timestamped backups\n5. Never intercept outside the project root\n6. Never intercept binary files or secrets (`.env`, `.pem`, `.key`, `id_rsa`, etc.)\n7. Never log user prompt content (privacy invariant, asserted in tests)\n8. Never inject more than 8,000 chars per hook response\n9. Stale graph detection — file mtime newer than graph mtime → passthrough\n10. Partial-read bypass — explicit `offset` or `limit` on Read → passthrough\n\n---\n\n## Install\n\n```bash\nnpm install -g engramx\n```\n\nRequires Node.js 20+. Zero native dependencies. No build tools. Local SQLite via sql.js WASM — no Rust, no Python, no system libs.\n\n> **Prefer a designed walkthrough?** Open [**docs\u002Finstall.html**](docs\u002Finstall.html) — three-step install, benefits matrix, IDE coverage, FAQ. Local file, opens in any browser. Brand-matched terminal-mono aesthetic.\n\n---\n\n## Quickstart\n\n**One command, zero friction:**\n\n```bash\ncd ~\u002Fmy-project\nengram setup                     # init + install-hook + adapter detect + doctor\n```\n\n`engram setup` runs the whole first-run flow interactively (or pass `-y` for defaults, `--dry-run` to preview). It is idempotent — safe to re-run, and skips any step already done.\n\n\u003Csub>Prefer the individual commands?\u003C\u002Fsub>\n\n```bash\ncd ~\u002Fmy-project\nengram init                      # scan codebase → .engram\u002Fgraph.db (~40ms, 0 tokens)\nengram install-hook              # wire the Sentinel into Claude Code\nengram ui                        # open the web dashboard in your browser\n```\n\n**Diagnostics + self-update:**\n\n```bash\nengram doctor                    # component health + remediation hints (0=ok, 1=warn, 2=fail)\nengram update                    # check + upgrade via detected pkg manager (no telemetry)\nengram update --check            # check only, dry-probe the registry\n```\n\nSet `ENGRAM_NO_UPDATE_CHECK=1` to disable the passive \"newer version available\" hint on every CLI invocation. `$CI` does the same automatically.\n\nOpen a Claude Code session. When the agent reads a well-covered file you will see a system-reminder with the structural summary instead of file contents. After the session:\n\n```bash\nengram hook-stats                # what was intercepted, tokens saved (CLI)\nengram ui                        # same data, richer view, real-time updates\nengram hook-preview src\u002Fauth.ts  # dry-run: see what the hook would inject for one file\n```\n\n**Full recommended setup (one-time per project):**\n\n```bash\nnpm install -g engramx\ncd ~\u002Fmy-project\nengram init --with-skills        # also index ~\u002F.claude\u002Fskills\u002F into the graph\nengram install-hook              # wire Sentinel into Claude Code\nengram hooks install             # auto-rebuild graph on every git commit\n```\n\n**Experience tiers — each works standalone:**\n\n| Tier | What you run | What you get |\n|------|-------------|-------------|\n| Graph only | `engram init` | CLI queries, MCP server, `engram gen` for CLAUDE.md |\n| + Sentinel | `engram install-hook` | Automatic Read interception, Edit warnings, session briefs, HUD |\n| + Context Spine | Configure providers.json | Rich packets from 9 built-ins + any MCP plugin per read |\n| + Skills index | `engram init --with-skills` | Graph includes your `~\u002F.claude\u002Fskills\u002F` |\n| + Git hooks | `engram hooks install` | Graph rebuilds on every commit, stays current |\n| + HTTP server | `engram server --http` | REST API on port 7337 for external tooling |\n\n---\n\n## IDE Integrations\n\n`engram setup` auto-detects every supported IDE on your machine and prints the right next-step for each. You don't have to remember which command to run — the detector knows.\n\n| IDE | Integration | Setup |\n|-----|------------|-------|\n| **Claude Code** | Hook-based interception (native, automatic) — **plus** `\u002Fplugin install engram` for slash-commands | `engram install-hook` &middot; [docs\u002Fintegrations\u002Fclaude-code.md](docs\u002Fintegrations\u002Fclaude-code.md) |\n| **Cursor** | MDC snapshot + native MCP + VS Code extension on OpenVSX | `engram gen-mdc` &middot; [docs\u002Fintegrations\u002Fcursor-mcp.md](docs\u002Fintegrations\u002Fcursor-mcp.md) |\n| **Cline** | MCP server (5M+ VS Code installs, no native answer to token burn) | [docs\u002Fintegrations\u002Fcline.md](docs\u002Fintegrations\u002Fcline.md) |\n| **Continue.dev** | `@engram` context provider via [`engramx-continue`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fengramx-continue) | [docs\u002Fintegrations\u002Fcontinue.md](docs\u002Fintegrations\u002Fcontinue.md) |\n| **Aider** | Context file generation | `engram gen-aider` &middot; [docs\u002Fintegrations\u002Faider.md](docs\u002Fintegrations\u002Faider.md) |\n| **Windsurf** (Codeium) | `.windsurfrules` snapshot + MCP | `engram gen-windsurfrules` |\n| **Zed** | Context server (`\u002Fengram`) | `engram context-server` &middot; [docs\u002Fintegrations\u002Fzed.md](docs\u002Fintegrations\u002Fzed.md) |\n| **OpenAI Codex CLI** | `AGENTS.md` auto-emit (universal Linux Foundation standard) | `engram gen` (default emits both `AGENTS.md` + `CLAUDE.md`) |\n| **VS Code (any agent)** | Status-bar entry + 6 commands wrapping the CLI | `code --install-extension nickcirv.engram-vscode` ([OpenVSX listing](https:\u002F\u002Fopen-vsx.org\u002Fextension\u002Fnickcirv\u002Fengram-vscode)) |\n| **Neovim** | MCP via codecompanion \u002F avante | [docs\u002Fintegrations\u002Fneovim.md](docs\u002Fintegrations\u002Fneovim.md) |\n| **Emacs** | MCP via gptel-mcp | [docs\u002Fintegrations\u002Femacs.md](docs\u002Fintegrations\u002Femacs.md) |\n\nPer-IDE setup guides are in [`docs\u002Fintegrations\u002F`](docs\u002Fintegrations\u002F).\n\n---\n\n## How It Compares\n\nThe \"context spine\" slot — local-first, code-aware, works in any MCP runtime, with a reproducible benchmark — is currently unowned. Here's the field as of May 2026:\n\n|  | **engramx** | Cursor index | Aider repo map | Cline | Continue.dev | Mem0 | claude-mem | CartoGopher |\n|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n| Works in any MCP runtime | ✅ | IDE-locked | Aider only | VS Code only | VS Code only | ✅ | Claude Code only | ✅ |\n| Local-first (nothing leaves machine) | ✅ | cloud-synced | ✅ | ✅ | ✅ | optional | ✅ | ✅ |\n| Code-aware AST graph | ✅ | proprietary | ✅ | — | — | — | — | ✅ |\n| Reproducible benchmark | ✅ **89.1%** | — | — | — | — | — | — | claims 88% |\n| Bi-temporal mistake memory | ✅ | — | — | — | — | — | partial | — |\n| `AGENTS.md` + `CLAUDE.md` dual-emit | ✅ | — | — | — | — | — | — | — |\n| Single npm install | ✅ | full IDE | pip | VS Code ext | VS Code ext | pip \u002F npm | claude plugin | Go binary |\n| License | Apache 2.0 | proprietary | Apache 2.0 | Apache 2.0 | Apache 2.0 | Apache 2.0 | MIT | unknown |\n| GitHub stars (May 2026) | 108 | proprietary | 39K | 61.2K | 32.4K | 47.8K | new | unknown |\n\nThe matrix isn't a slight at any of them — most do something engram doesn't. Cursor's index is great inside Cursor. Aider's repo map is great in Aider. Cline's full-file rewrite model is honest about what it is. The point is that nobody else covers all eight rows. Engram is the only tool that does.\n\nFor the legacy comparison vs `Continue @RepoMap` \u002F `Cursor .cursorrules` \u002F `@199-bio\u002Fengram` (small repo-map approaches), see the matrix below.\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Legacy detailed comparison\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n| | engram | Continue @RepoMap | Cursor .cursorrules | Aider repo-map | @199-bio\u002Fengram |\n|---|---|---|---|---|---|\n| **Interception model** | Hook-based, automatic on every Read | Fetched at @-mention time | Static file, manual | Per-session map | MCP server, called explicitly |\n| **Cache strategy** | SQLite at SessionStart, \u003C5ms per read | No cache — live fetch | No cache | Per-session only | No cache |\n| **Persistent memory** | Decisions, mistakes, patterns across sessions | No | Manual text file | No | No |\n| **Multiple providers** | 9 (AST, git, mistakes, MemPalace, Context7, Obsidian, LSP, Anthropic Memory, MCP plugins) | Repo structure only | No | Repo structure only | Graph query only |\n| **Mistake tracking** | LSP diagnostics → mistake nodes, ⚠️ on Edit | No | No | No | No |\n| **Survives compaction** | Yes (PreCompact hook) | No | Yes (static file) | No | No |\n| **LLM cost** | $0 | $0 | $0 | $0 | $0 |\n| **Native deps** | Zero | No | No | No | No |\n\n\u003C\u002Fdetails>\n\n---\n\n## Install + Configuration\n\n```bash\nnpm install -g engramx\n```\n\n**providers.json** (optional — auto-detection works for most setups):\n\n```json\n{\n  \"providers\": {\n    \"mempalace\": { \"enabled\": true },\n    \"context7\": { \"enabled\": true },\n    \"obsidian\": { \"enabled\": true, \"vault\": \"~\u002Fvault\" },\n    \"lsp\": { \"enabled\": true }\n  }\n}\n```\n\n**Hook scope options:**\n\n```bash\nengram install-hook                  # default: .claude\u002Fsettings.local.json (gitignored)\nengram install-hook --scope project  # .claude\u002Fsettings.json (committed)\nengram install-hook --scope user     # ~\u002F.claude\u002Fsettings.json (global)\nengram install-hook --dry-run        # preview changes without writing\nengram install-hook --auto-reindex   # also keep the graph fresh after every Edit\u002FWrite\u002FMultiEdit (#8)\n```\n\n**Kill switch (if anything goes wrong):**\n\n```bash\nengram hook-disable    # touches .engram\u002Fhook-disabled — all handlers pass through\nengram hook-enable     # removes the kill switch\nengram uninstall-hook  # surgical removal, preserves other hooks in settings.json\n```\n\n---\n\n## CLI Reference\n\n**Core:**\n\n```bash\nengram init [path]               # scan codebase, build knowledge graph\nengram init --with-skills        # also index ~\u002F.claude\u002Fskills\u002F\nengram query \"how does auth\"     # query the graph (BFS, token-budgeted)\nengram query \"auth\" --dfs        # DFS traversal\nengram gods                      # most connected entities\nengram stats                     # node\u002Fedge counts, confidence breakdown\nengram bench                     # token reduction benchmark (10 tasks)\nengram stress-test               # full stress test suite\nengram path \"auth\" \"database\"    # shortest path between concepts\nengram learn \"chose JWT...\"      # add a decision or pattern to the graph\nengram mistakes                  # list known landmines\n```\n\n**Code generation:**\n\n```bash\nengram gen                       # auto-detect target (CLAUDE.md \u002F .cursorrules \u002F AGENTS.md)\nengram gen --target claude       # write to CLAUDE.md\nengram gen --target cursor       # write to .cursorrules\nengram gen --target agents       # write to AGENTS.md\nengram gen --task bug-fix        # task-aware view (general | bug-fix | feature | refactor)\nengram gen --memory-md           # write structural facts to Claude's native MEMORY.md\nengram gen-mdc                   # generate Cursor MDC rules\nengram gen-aider                 # generate Aider context file\nengram gen-ccs                   # generate CCS-compatible output\n```\n\n**Sentinel:**\n\n```bash\nengram intercept                 # hook entry point (called by Claude Code, reads stdin)\nengram install-hook              # install hooks into Claude Code settings\nengram uninstall-hook            # remove engram entries\nengram hook-stats                # summarize .engram\u002Fhook-log.jsonl\nengram hook-stats --json         # machine-readable output\nengram hook-preview \u003Cfile>       # dry-run Read handler for a specific file\nengram hook-disable              # kill switch\nengram hook-enable               # remove kill switch\n```\n\n**Infrastructure:**\n\n```bash\nengram watch [path]              # live file watcher — incremental re-index on save\nengram reindex \u003Cfile>            # re-index one file (editor\u002Fhook\u002FCI primitive, issue #8)\nengram reindex-hook              # PostToolUse hook entry point (reads JSON from stdin, always exits 0)\nengram dashboard [path]          # live terminal dashboard\nengram hud-label [path]          # JSON label for Claude HUD --extra-cmd integration\nengram hooks install             # install post-commit + post-checkout git hooks\nengram hooks status              # check git hook installation\nengram hooks uninstall           # remove git hooks\nengram server --http             # start HTTP REST server on port 7337\nengram context-server            # start Zed context server\nengram tune --dry-run            # auto-tune provider weights (preview mode)\nengram db status                 # schema version, migration state\nengram init --from-ccs           # import from CCS-format context file\n```\n\n**Claude HUD integration:**\n\nAdd `--extra-cmd=\"engram hud-label\"` to your statusLine command to see live savings:\n\n```\nengram 48.5K saved 75%\n```\n\n---\n\n## HTTP API\n\nStart the server with `engram server --http` (default port 7337).\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `\u002Fhealth` | Server health + graph stats |\n| `POST` | `\u002Fquery` | Query the knowledge graph |\n| `GET` | `\u002Fgods` | Most connected entities |\n| `GET` | `\u002Fstats` | Node\u002Fedge counts, confidence breakdown |\n| `POST` | `\u002Fpath` | Shortest path between two concepts |\n| `GET` | `\u002Fmistakes` | Known failure nodes |\n| `POST` | `\u002Flearn` | Add a decision or pattern |\n| `POST` | `\u002Finit` | Trigger a graph rebuild |\n| `GET` | `\u002Fhook-stats` | Hook interception log summary |\n\nAll responses are JSON. The server is local-only by default — bind address is `127.0.0.1`.\n\n---\n\n## MCP Server\n\n```json\n{\n  \"mcpServers\": {\n    \"engram\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"engramx\", \"serve\", \"\u002Fpath\u002Fto\u002Fyour\u002Fproject\"]\n    }\n  }\n}\n```\n\n**MCP Tools (6):**\n\n- `query_graph` — search the knowledge graph with natural language\n- `god_nodes` — core abstractions (most connected entities)\n- `graph_stats` — node\u002Fedge counts, confidence breakdown\n- `shortest_path` — trace connections between two concepts\n- `benchmark` — token reduction measurement\n- `list_mistakes` — known failure modes from past sessions\n\n**Shell wrapper (for Bash-based agents):**\n\n```bash\ncp scripts\u002Fmcp-engram ~\u002Fbin\u002Fmcp-engram && chmod +x ~\u002Fbin\u002Fmcp-engram\nmcp-engram query \"how does auth work\" -p ~\u002Fmyrepo\n```\n\n---\n\n## ECP Spec\n\nengram v1.0 ships the first draft of the **Engram Context Protocol** (ECP v0.1) — an open specification for how AI coding tools should package and exchange structured context packets.\n\nThe spec defines the wire format, provider negotiation, budget constraints, and confidence scoring used by engram internally. Any tool can implement the spec to produce or consume engram-compatible context packets.\n\n**License:** CC-BY 4.0  \n**Spec:** [`docs\u002Fspecs\u002Fecp-v0.1.md`](docs\u002Fspecs\u002Fecp-v0.1.md)\n\n---\n\n## Programmatic API\n\n```typescript\nimport { init, query, godNodes, stats } from \"engramx\";\n\nconst result = await init(\".\u002Fmy-project\");\nconsole.log(`${result.nodes} nodes, ${result.edges} edges`);\n\nconst answer = await query(\".\u002Fmy-project\", \"how does auth work\");\nconsole.log(answer.text);\n\nconst gods = await godNodes(\".\u002Fmy-project\");\nfor (const g of gods) {\n  console.log(`${g.label} — ${g.degree} connections`);\n}\n```\n\n---\n\n## Architecture\n\n```\nsrc\u002F\n├── cli.ts                 CLI entry point\n├── core.ts                API surface (init, query, stats, learn)\n├── serve.ts               MCP server (6 tools, JSON-RPC stdio)\n├── server.ts              HTTP REST server (port 7337)\n├── hooks.ts               Git hook install\u002Funinstall\n├── autogen.ts             CLAUDE.md \u002F .cursorrules \u002F MDC generation\n├── graph\u002F\n│   ├── schema.ts          Types: nodes, edges, confidence, schema versioning\n│   ├── store.ts           SQLite persistence (sql.js WASM, zero native deps)\n│   └── query.ts           BFS\u002FDFS traversal, shortest path\n├── miners\u002F\n│   ├── ast-miner.ts       Tree-sitter AST extraction (10 languages, confidence 1.0)\n│   ├── git-miner.ts       Change patterns from git history\n│   ├── session-miner.ts   Decisions\u002Fpatterns from AI session docs\n│   └── skills-miner.ts    ~\u002F.claude\u002Fskills\u002F indexer (opt-in)\n├── providers\u002F\n│   ├── context-spine.ts   Provider assembly + budget management\n│   ├── mempalace.ts       MemPalace integration\n│   ├── context7.ts        Context7 library docs\n│   ├── obsidian.ts        Obsidian vault\n│   └── lsp.ts             LSP diagnostic capture\n└── intelligence\u002F\n    └── token-tracker.ts   Cumulative token savings measurement\n```\n\n**Supported languages (AST):** TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, PHP.\n\n---\n\n## Privacy\n\nEverything runs locally. No data leaves your machine. No telemetry. No cloud dependency. The only network call is `npm install`. Prompt content is never logged (asserted in 579 tests).\n\n---\n\n## Contributing\n\nIssues and PRs welcome at [github.com\u002FNickCirv\u002Fengram](https:\u002F\u002Fgithub.com\u002FNickCirv\u002Fengram).\n\nRun `engram init` on a real codebase and share what it got right and wrong. The benchmark suite (`engram bench`) is the fastest way to see the difference on your own code.\n\n---\n\n## License\n\n[Apache 2.0](LICENSE)\n\n---\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F#NickCirv\u002Fengram&Date\">\n    \u003Cimg src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=NickCirv\u002Fengram&type=Date\" alt=\"engram star history\" width=\"80%\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n","Engram是一个用于提升AI编码会话效率的上下文脊柱工具，支持Claude Code、Cursor等8种IDE。其核心功能在于通过减少重复文件读取和避免已修复错误重现来优化AI编码助手的表现，实现高达89%的token使用量减少。技术上，它采用TypeScript编写，利用本地SQLite数据库存储数据，无需云服务介入，确保了用户数据的安全与隐私。适用于需要频繁使用AI辅助进行代码开发或维护的场景中，帮助开发者提高工作效率的同时降低计算成本。",2,"2026-06-11 02:51:41","CREATED_QUERY"]