Self-improving, temporal workspace memory for Claude Code. A marketplace plugin that
turns any project directory into a workspace with persistent memory: it captures your Claude
Code sessions, distills them into a [[wikilinked]] knowledge base plus a bitemporal fact
store, recalls them later, learns how you want it to behave, and lets the workspace grow its
own skills — so you stop re-explaining your environment every session.
Name: EngrAIm = engram (a memory trace) + AI; also "ingrain" — knowledge worked in
deeply over time. Identifiers use lowercase engraim.
- Markdown is canonical, SQLite is a derived index. Knowledge lives in plain markdown
(
.engraim/wiki/, frame files) — diffable, git-friendly, openable in any editor (or Obsidian; not required). The SQLite DB is a rebuildable index. - Prescribed vs generated, strictly separated. This plugin ships only the mechanism —
skills, hooks, the memory server, schema. It contains no domain knowledge. Everything
about your project (facts, wiki pages, calibration, project-specific skills) is
generated into that project's own
.engraim/and.claude/skills/. Plugin updates replace the mechanism and never touch your workspace data. - Pure Node, zero required dependencies. Storage uses built-in
node:sqlite(FTS5); the MCP server speaks JSON-RPC over stdio by hand (no SDK). Nothing topip/npm install. No daemon, no cloud. Semantic recall is an optional add-on (see below).
- Node ≥ 24 (for built-in
node:sqlitewith FTS5 compiled in).node --version. Nothing else required.
/plugin marketplace add redth/engrAIm
/plugin install engraim@engraimThat's the whole install. Installing does not activate memory anywhere — EngrAIm is
opt-in per project. In a project you want memory in, run /engraim:init (or
/engraim:onboard to also scan + seed the frame); that creates .engraim/ and turns it on.
Every other project stays completely untouched — no .engraim/, no injected context, no
nudges — until you opt it in too.
- Capture. A Stop hook stages each session's transcript;
/engraim:curate(or/engraim:backfillfor history) distills it into facts + wiki pages — never raw dumps. - Recall.
recallsearches the wiki + facts (keyword by default; hybrid keyword+vector if semantic is enabled). The SessionStart hook injects a frame snapshot + active rules. - Stay true over time. Re-stating a known fact corroborates it (confidence rises);
changes go through
supersede(history is kept);whats_true(entity, as_of)time-travels. - Self-improve. Corrections become calibration overrides (
/engraim:calibrate) that expire unless reaffirmed and can graduate to permanent rules inframe/SOUL.md; a guarded retrospective (/engraim:retro) consolidates and prunes. - Proactive upkeep — you never have to remember the verbs. Three hooks watch for the
right moment and ask: a UserPromptSubmit hook spots durable, project-wide feedback
("from now on…", "always remember…") and nudges toward
/engraim:calibrate, plus a throttled in-session reminder of pending upkeep; a PostToolUse hook chains the natural next step after a milestone action (calibrate → curate/promote, draft-skill → promote-skill, onboard → backfill); and SessionStart surfaces a/engraim:retropass once its inputs (expiring overrides, promotion candidates, staged sessions) accumulate. - Grow skills. Recurring procedures become workspace skills via a gated ladder
(
/engraim:draft-skill→ review →/engraim:promote-skillinto.claude/skills/). - Notice gaps.
/engraim:lintscans the wiki for dangling links / stubs / orphans and writes a research agenda.
.claude-plugin/marketplace.json ← the marketplace catalog
plugins/engraim/
.claude-plugin/plugin.json ← plugin manifest
.mcp.json ← registers the engraim-memory MCP server (node)
hooks/ session_start · user_prompt · tool_followup (PostToolUse) ·
session_capture (Stop) · pre_compact
commands/ init · status · onboard · curate · backfill · calibrate · retro ·
skills · draft-skill · promote-skill · lint · enable-semantic
skills/ engraim-memory · -research · -curate · -calibrate · -retro ·
-skillsmith · -onboard
server/ store.mjs · cli.mjs · engraim_server.mjs · semantic.mjs
schema/ VERSION + migrations
templates/workspace/ the .engraim/ skeleton copied into each project
scripts/selftest.mjs ← `node scripts/selftest.mjs` verifies a fresh clone
<project>/.engraim/: frame/ (SOUL/ENV/USER hot tiers), wiki/ (canonical knowledge),
sources/, calibration/, registry.md, pending/, and store.db (rebuildable index).
Promoted skills land in <project>/.claude/skills/. Suggested project .gitignore:
.engraim/store.db # rebuildable index
.engraim/vendor/ # optional semantic deps
Commit the rest — the wiki and frame are your durable, diffable knowledge.
The first session auto-creates .engraim/ and nudges /engraim:onboard, which runs a
deterministic project scan (languages, tooling, scripts, git remotes) to seed the frame,
offers /engraim:backfill, and explains the workflow. The nudge stops once onboarded.
Keyword recall works with zero dependencies. For meaning-based recall, run
/engraim:enable-semantic. Two small optional pieces:
- Vector index: the
sqlite-vecpackage (~200K), installed into.engraim/vendor/. - Embedder (pick one): a local Ollama (or any OpenAI-style) HTTP endpoint via
ENGRAIM_EMBED_URL— no npm dependency, justfetch— or@huggingface/transformersfor a fully-local embedder. When neither is present, recall silently stays keyword-only. Hits are taggedvia: fts | semantic | both. Runreindex_semanticonce after enabling.
For skill authoring, EngrAIm composes with Anthropic's skill-creator rather than
vendoring it: /plugin marketplace add anthropics/skills. When present, engraim-skillsmith
hands off authoring/evaluation to it, then runs the result through EngrAIm's
draft→gate→activate pipeline. Not required — there's a built-in authoring checklist fallback.
git clone https://github.com/redth/engrAIm && cd engrAIm
node scripts/selftest.mjs # exercises store, hooks, and the MCP handshake
/plugin marketplace add ./ # dogfood locally before publishing (see SETUP.md)Next: domain-agnostic polish and a first public release. See CHANGELOG.md for version
history. (Domain knowledge — homelab, a specific stack, etc. — is intentionally not shipped
here; it's generated per-workspace.)
MIT — see LICENSE.