engram CLAUDE.md

A persistent memory system for AI agents backed by a local vault of linked notes. Its skills let an agent recall past information, save new memories, orchestrate work, choose subagents, and review pending notes.

In plain words
What is it for?
Use it to recall or save project knowledge, coordinate end-to-end work, route tasks to subagents, write memories to the vault, and curate suggested notes.
Why use it?
It gives agents a place to retain useful context between tasks instead of relying only on the current conversation. Its workflows also add checks around planning, refactoring, documentation, and the final response.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/toejough/engram/claude-md
Clone the repo
git clone --depth 1 https://github.com/toejough/engram
Per session 2,166 This file is loaded in full into every session.
When invoked 2,166 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02166 $0.02166
Opus 5 $0.01083 $0.01083
Sonnet 5 $0.00433 $0.00433
Haiku 4.5 $0.00217 $0.00217

Measured 2d ago against content hash b4eb4f6fc279, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

engram CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Engram

Persistent memory for LLM agents, backed by an agent-memory zettelkasten vault. Two skills — recall and learn — read from and write to the vault on demand; at their write sites they hand off to a fifth skill, write-memory, which composes and executes the vault-write commands (parents judge, the worker writes). A third skill, please, orchestrates end-to-end work by sequencing recall, learn, and other available skills around a user's <ask>, with adversarial review gates over the plan, refactors, docs, and outward prose. A fourth skill, route, encodes the delegate-everything doctrine: it guides subagent selection (agent type, model, effort) rather than doing object-level work itself. please consults it when assigning gate reviewers. A sixth skill, curate, judges engram serve's pending-offer notes against the host vault using the same covered/near/absent reasoning recall's Step 2.5 documents, and is self-contained — it composes and executes engram amend directly rather than handing off to write-memory, since an offer's content already exists as a note file with nothing left to compose from scratch.

Core Principles

  • Verify, don't guess. Always read source code and documentation before guessing at formats, paths, or API contracts. Never assume directory structures or payload fields — verify first.

Directory Structure

engram/
├── cmd/engram/        # CLI binary entry point — single-statement main() + checker-thin per-group functions supplying raw I/O primitives (targ check-thin-api-enforced)
├── internal/          # Non-public implementation
│   ├── chunk/         # Splits memory sources (stripped transcripts, markdown) into embedding-sized chunks for the auto-ingested vector space (pure string logic, no I/O)
│   ├── cli/           # CLI command wiring (targ targets) + composition root: cli.NewDeps builds every production adapter from injected cli.Primitives
│   ├── cluster/       # k-means clustering with silhouette-based auto-K, for recall clustering
│   ├── context/       # Transcript processing for LLM agents
│   ├── debuglog/      # Tail-friendly debug logger
│   ├── embed/         # Embedder interface + Hugot/GoMLX backend, sidecar I/O, state classification
│   ├── luhmann/       # Luhmann zettelkasten ID parsing/sorting
│   ├── transcript/    # Claude Code session transcript reading
│   ├── update/        # `engram update` subcommand
│   └── vaultgraph/    # Wikilink graph analysis of the vault
├── agent-instructions/
│   ├── skills/        # Source for the recall, learn, write-memory, please, and route skills
│   └── guidance/      # Source for the deployable ambient guidance docs — recall-firing (`recall.md`), delegation-firing (`delegate.md`), and learn-firing (`learn.md`) — synced by `engram update --with-guidance` to canonical paths in `~/.claude/engram/guidance/` (Claude Code) and `~/.pi/agent/engram/guidance/` (Pi); compat symlinks at old flat paths keep existing `@import` lines in CLAUDE.md / AGENTS.md resolving (ADR-0022 D9); activated via `@import`
├── openspec/          # Primary behavior specs — one per shipped capability; backfilled 2026-07-27 from docs/FEATURES.md surface
├── dev/               # Build tooling (targ definitions, linter configs)
└── docs/              # Organized by charter — see docs/README.md

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 103 lines · 2,166 tokens per session scan A b4eb4f6fc279

Subscribe to this mod's changes

engram CLAUDE.md is an instructions file published in the GitHub repository toejough/engram (8 stars, last pushed 3d ago), licensed Apache-2.0. It adds 2,166 tokens to every session, about $0.0108 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.