Skip to the page
Query
“prepare the v0.20 release”
Match
29/96
Packed
12
Tokens
2,567/4,000
Hash
7a30dab1…a550

Context pack

Toy · ee's rule
  1. ## rules

    • 5Run cargo fmt --check before tagging
    • 7Exit 124 on the lane is a timeout, not a red
    • + 3 more
    • + 2 more
  2. ## decisions

    • 1Releases are cut with dsr, not hosted CI
    • 11Verification runs on the pinned lane
    • + 2 more
    • + 1 more
  3. ## failures

    • 3Tag pushed before CHANGELOG broke the installer checksum
    • 6Never re-tag a published version
    • + 1 more
  4. ## evidence

    • 2Session 41: v0.19 sums re-signed with minisign
    • + 1 more
    • + 1 more
  5. ## artifacts

    • 4scripts/release_binary_probe.sh

every item: provenance · scores · why

Memory for AI agents · Rust · local-first

Long-term memory for
coding agents.

Eidetic Engine (ee) records what your agents learn as they work. At the start of each task it hands the agent the part of that record that bears on it, cut to a token budget, with the source of every line.

  • one Rust binary
  • no cloud or API key
  • local store
  • versioned JSON

Pick a task

12of 29 matching memories packed2,567 / 4,000 tokens

4 rules3 decisions2 failures2 evidence1 artifacts

Pick a task or drag the budget slider. The memories that match the task light up, and ee's selection rule packs the most relevant, least redundant ones that fit the budget and the balanced profile's section quotas. The 96 memories are made up for this page. The selection rule and its weights come from src/pack/mod.rs.

Tests
20,700+#[test] functions across src/ and tests/, with 46 property suites and 27 fuzz targets.
Failure modes
630Each fixture triggers a degraded state and records the code it reports, and the repair where there is one.
JSON contracts
280Versioned schemas for the JSON that ee's commands return.
Cloud APIs needed
0Embeddings and storage are local. The network is needed once, to download the model.

Counted in the repository at c05913f2a, 2026-11-24.

The short version

What ee does for an agent.

A coding agent starts every session with an empty context window, so whatever earlier sessions learned is gone unless someone wrote it down.

  1. 1

    Recordee remember · ee outcome

    Agents add lessons as they work and say which ones helped. Recorded sessions can be imported.

  2. 2

    Keep.ee/ee.db

    A local database in the workspace, beside a user-global store under ~/.local/share/ee.

  3. 3

    Packee pack "<task>"

    The memories that match the task, cut to a token budget, each with its source, score and trust level.

A notes file such as CLAUDE.md, compared with ee
PointCLAUDE.mdee
What a session loadsthe whole fileonly what bears on the task
As lessons pile upgrows, and costs morestays inside your budget
A line that stopped helpingnothing marks itthe decay pass demotes, then retires it
Each line saysnothing about itselfits source and score
The same JSON contracts forClaude CodeCodexshell scriptsMCP, in an mcp-feature build
Chapter 01 · Amnesia

Every session starts from zero.

A new agent session re-learns the project's conventions, re-reads what an earlier session already read, and repeats failures an earlier one already hit, because nothing those sessions learned was kept where it could be found.

This chapter on its own page/amnesia

01.1Six sessions, two agents

Without memory, session six repeats session two's mistake.

The harness gives every session a fresh context window. With nowhere durable to put what it learned, an agent spends the start of each session re-learning the project and the middle of it working through problems an earlier session already solved.
Six sessions, two agents

The same repository, with and without a memory.

A toy in your browser · not ee
  • Useful work
  • Re-discovering conventions
  • Re-reading the same files
  • Hitting a trap
  • ee pack · 4k-token budget
  • Recalled · preflight warned
  1. Sess

    01

    No memory

    Hits a trap: the migration test needs a fresh DB

    With ee

    Hits it too, then records it as a rule

  2. Sess

    02

    No memory

    Hits the migration trap again

    With ee

    The rule is in the pack, so it avoids the trap

  3. Sess

    03

    No memory

    Hits a trap: tagging before the changelog lands

    With ee

    Hits a new trap that no memory covers yet

  4. Sess

    04

    No memory

    Hits the migration trap again

    With ee

    Preflight recalls the rule before the test

  5. Sess

    05

    No memory

    Hits the tagging trap again

    With ee

    Preflight on git tag recalls the lesson

  6. Sess

    06

    No memory

    Hits the migration trap again

    With ee

    Rule recalled; most of the session goes to the task

Useful work · no memory

42%

6 traps hit in 6 sessions

Useful work · with ee

75%

2 traps hit: only the new ones

In memory

4 lessons

Each is written once with ee remember and can be packed in any later session.

Sources and assumptions
README.md · Why This Exists (“Coding agents forget”) · the operating loop: ee pack at the start, ee remember and ee outcome as lessons are learned, ee preflight check before a risky command (advisory; it never blocks). The proportions are invented for this page and are not measured.
01.2CLAUDE.md, AGENTS.md, notes.md

What happens as the notes file grows.

A notes file is loaded whole into every session. A vector store returns only the closest matches, but ranks by similarity alone and cannot tell a stale or repeated chunk from a current one. Move through the weeks to compare both with ee.
52 weeks of lessons · three memory setups

What a session gets from a notes file, a vector store and ee.

Derived · arithmetic, not a benchmark

Week 52 · 520 lessons written · 139 now stale · 49 true lessons apply to “fix a flaky test”

  • On-task and true
  • True, off-task
  • Repeats an earlier line
  • Stale or contradicted
  • Empty slot
  1. Notes fileCLAUDE.md · AGENTS.md

    Every line goes into every session, on-task or off. The file has been trimmed 4 times, stale and repeated lines first, and the trims have deleted 201 lessons that were still true.

    8,000 tokens

    Useful
    16%
    Stale
    5
    Repeats
    3
    Missed
    23
    Deleted
    201
  2. Vector storetop 80 by similarity

    Returns up to 80 chunks, the ones most similar to the task. The score does not mark a chunk as stale or as a repeat, and the store keeps no record of what it left out.

    4,000 tokens

    Useful
    38%
    Stale
    27
    Repeats
    12
    Missed
    19
    Listed
    none
  3. ee pack--max-tokens 4000

    Strict MMR fills at most 4,000 tokens of memory text and demotes repeats. Lessons ee has detected as stale are excluded. The 20 candidates it left out are listed, each with a reason, in data.pack.skipped[].

    10,400 tokens · 6,400 of metadata

    Useful
    41%
    Stale
    5
    Repeats
    8
    Missed
    16
    Listed
    20

Useful: on-task, true and not a repeat. Missed: true lessons about this task that the session does not have. Deleted: true lessons the file's trims have removed so far. Listed: candidates the lane reports as left out.

  • Notes file
  • Vector store
  • ee pack
  • File trimmed

Tokens a session

8,000 · 4,000 · 10,400

04k8k12kwk 113263952wk 52

Ranking. The vector store and ee's search use the same similarity score here, so both miss the on-task lessons it scores low. Top-k has no record of which lessons went stale or repeat one already in the session, so it passes them through.

Token cost. ee's budget counts only the memories' own text. In markdown, each item also lists its id, why it was chosen, its trust class and its provenance, about 80 tokens here. A smaller --max-tokens gives a smaller pack.

Keeping AGENTS.md. ee export agentsmd writes the primer's rules and warnings into a marker-delimited block of AGENTS.md, 600 tokens by default. It never edits outside its markers. ee diag agentsmd-drift reports where the file and the memory disagree.

Sources and assumptions
A model, not a benchmark: one seeded draw of 520 lessons that all three lanes share. Assumed: 10 lessons a week, 50 tokens each · one new lesson in 5 restates one still true · each week 1.5% of true lessons are overtaken · the file is trimmed past 200 lines back to 120, stale and repeated lines first, then the oldest · the vector store returns 80 bare chunks, the 4,000 tokens of lessons ee's budget buys · both rank by one similarity: on-task lessons 0.3 to 1, others 0 to 0.58 · ee notices a stale lesson with chance 15% a week (a revision, a harmful outcome, the contradiction guard, decay) · MMR similarity 0.9 for two copies of a lesson, 0.3 within a topic, 0.1 otherwise · an ee item's id, why, trust and provenance lines about 80 tokens · not modeled: section quotas, the preview and link-only tiers, the query-relative relevance cutoff, the memory-tier boost, and the helpful/harmful outcome bias (at most ±0.05, AGENT_PROFILE_BIAS_CAP in src/models/context_profile.rs). ee's side: src/pack/mod.rs · DEFAULT_CONTEXT_MAX_TOKENS 4,000 (counted on each memory's own text) · DEFAULT_MMR_RELEVANCE_WEIGHT 0.75 · DEFAULT_COVERAGE_FILL_RELEVANCE_FLOOR 0.05 · PackOmissionReason · apply_contradiction_guard · the markdown renderer · tests/fixtures/golden/agent/context_pack.md.golden · src/config/merge.rs · [pack] candidate_pool 100 · src/output/mod.rs · data.pack.skipped[], skippedTotal · src/core/context.rs · include_tombstoned · src/core/agentsmd.rs · src/core/primer.rs · PRIMER_DEFAULT_BUDGET_TOKENS 600 · README.md · Agent Harness Integration.
01.3Where ee sits

ee is a command the harness calls.

Claude Code, Codex or a shell script keeps its own tools, approvals and prompt loop. Agents call ee to record evidence and to fetch context, through one CLI with a stable JSON contract.
Who owns what

Agents write evidence to ee and read context from it.

Diagram · not program output
Agent harnessClaude Code · Codexany shell · MCPowns tools, approvalsand the prompt loopplanactobservePUSH INPULL OUTremember · outcome · casspack · recall · search · whyeestores memoryFrankenSQLite + SQLModelSOURCE OF TRUTHDERIVED · REBUILDABLEee index rebuildFrankensearch indexBM25 + Model2Vec vectorsGraph snapshotFrankenNetworkXCachesquery plans, warm packs

Push in · writes

Pull out · reads

readtouches source of truth · index · graph

ee pack "<task>" --workspace . --max-tokens 4000 --format markdown

Assembles a token-budgeted context pack; every item carries an evidence pointer and a score breakdown.

The harness keeps its tools, approvals and prompt loop; ee stores memory and answers queries. The dashed boxes are derived data: if the index is lost, ee index rebuild regenerates it from the source of truth.

Sources and assumptions
README.md · Agent Operating Loop, Design Philosophy §2 (harness agnostic) and §6 (search indexes are derived assets) · src/cli/mod.rs (the commands) · src/db (FrankenSQLite + SQLModel, the source of truth)
01.4Five commands

The basic loop in five commands.

Open a workspace, record a rule, pack it into the next session, report whether it helped, and ask why it was chosen. The later chapters show what each of these steps does in detail.
  1. 1

    Open a workspace

    ee init --workspace .

    Idempotent. The store is FrankenSQLite under .ee/; indexes beside it are derived and rebuildable.

  2. 2

    Teach it a rule

    ee remember "Run cargo fmt --check before tagging a release." \
      --workspace . --level procedural --kind rule --json

    Text that looks like a secret is refused with exit 7, and the error says where it matched. A memory written this way starts in the human_explicit trust class.

  3. 3

    Hand the next session a pack

    ee pack "prepare the release" --workspace . \
      --max-tokens 4000 --format markdown

    Rules, decisions, failures and evidence that match the task, within the budget, each with provenance and a score.

  4. 4

    Say what helped

    ee outcome <memory-id> --workspace . --signal helpful \
      --reason "caught the unformatted file before the tag"

    Feedback moves the memory's posterior. Harmful counts 2.5 times as much as helpful.

  5. 5

    Ask why

    ee why <memory-id> --workspace . --json

    Where a memory came from, what supports it, how fresh and how trusted it is, and what would change its rank.

Chapter 02 · Memory

Typed memories with half-lives.

A scratch note is useful for a day and a procedural rule for a year, so ee stores memories at four levels, each with its own half-life. When the decay pass runs, a stale memory is demoted, then leaves retrieval with an audit entry.

This chapter on its own page/memory

02.1Decay and demotion

How fast each level fades.

Freshness halves on a schedule set by the kind of memory: a day for working notes, a year for a procedural rule. The decay pass (ee maintenance run --include-decay) weighs freshness × confidence × utility to demote or tombstone a memory, with an audit entry either way.
Half-lives by kind

Age, confidence and utility decide when a memory is demoted or tombstoned.

ee's rule, computed here
0.25.50.75101d1w1mo3mo6mo1y2yTIME SINCE LAST USE · LOG SCALEFRESHNESSdemote · lifecycle < 0.053 mo

Preserve

3

Demote

1

Tombstone

1

Confidence × utility

0.25

Demote once freshness drops below 0.2; tombstone below 0.04.

KindHalf-lifeFreshnessLifecycleDecisionDemotes after
Working1 d00tombstone2.3 d
Episodic event30 d0.1250.0313demote2.3 mo
Episodic failure90 d0.50.125preserve6.9 mo
Semantic fact180 d0.7070.1768preserve13.7 mo
Procedural rule365 d0.8430.2107preserve2.3 y

Age. Age runs from the latest of a memory’s creation, update and last access, so a memory that keeps being recalled stays fresh.

Demotion. A demoted procedural memory moves down to semantic and a semantic one to episodic, and its importance halves.

Tombstones. A tombstoned memory leaves retrieval and gets an audit entry. The row is kept, and ee curate untombstone <id> restores it.

Sources and assumptions
src/policy/memory_decay.rs · MemoryDecayHalfLives::default (working 1 d, episodic event 30 d, episodic failure 90 d, semantic fact 180 d, procedural rule 365 d) · memory_decay_freshness_score · DEFAULT_DECAY_DEMOTE_THRESHOLD 0.05 · DEFAULT_DECAY_FORGET_THRESHOLD 0.01 · demoted_memory_level · src/steward/mod.rs · memory_decay_reference_time · src/core/curate.rs · run_curate_untombstone

working

Task notes, scratch, in-progress facts

decay
fastest
packing
low; suppressed across sessions

episodic

“On 2026-03-12 the release failed because…”

decay
medium
packing
medium

semantic

Project conventions, architectural facts

decay
slow
packing
high

procedural

Rules, anti-patterns, playbooks

decay
slowest
packing
highest
02.2Typed fields

Fields a search can filter on.

A failure records its cause and the commit that reverted it; a decision, its options and when to revisit it. Search filters on those fields by name (--kind failure --field family^rustc). Plain prose gets no typed fields; ee does not invent them.

rule

procedural
  • condition
  • action
  • exceptions

condition: before tagging · action: cargo fmt --check

anti-pattern

procedural
  • trigger
  • blast_radius
  • safer_alternative

trigger: git rebase on main · safer: merge

decision

semantic
  • options
  • chosen
  • rationale
  • supersedes
  • revisit_by

chosen: Asupersync · rationale: no Tokio

convention

semantic
  • scope
  • pattern

scope: tests/*.rs · pattern: allow header after //!

command

procedural
  • command
  • when_to_use
  • exit_meaning

exit_meaning: 124 means the command timed out

failure

episodic
  • cause
  • regression_surface
  • reverted_at_sha
  • family

family: rustc E0277 · cause: missing bound

Every memory also carries its level, kind, content hash, tags, confidence, utility, importance, access count, source, evidence spans, links and trust class. README, “Memory Model”.

Chapter 03 · The pack

How ee builds a pack.

The pack is what an agent reads at the start of a task: the memories that match it, within a token budget, near-duplicates dropped, each item with its source and score. The same inputs give the same pack.

This chapter on its own page/pack

03.1ee pack, stage by stage

A pipeline of timed stages.

ee pack runs a fixed pipeline. It validates the request, retrieves with lexical and semantic search fused by rank, resolves and admits candidates, selects under quotas, and assembles the pack with provenance. It reports every degradation, and --explain-performance adds each stage's time.
Pack assembly · the trace, in order

Twelve of ee pack's timed stages, in order.

Diagram · not program output

ee pack times each of these stages and names it in its timing trace (--explain-performance). Select a stage to read what it does; Play steps through them.

bars: candidates remaining, illustrative conditional opt-in unavailable

01 / 12Validate the requestrequestValidateevery pack

Parses the task, profile and budget, and caps the token budget and candidate pool to the workspace's runtime profile. Every built-in profile asks for a pool of 64.

Search · lexical and semantic, fused

Lexical · BM25

exact words, names, flags

Reciprocal-rank fusion

Σ 1 / (60 + rank)

weights 0.45 · 0.45

Semantic · Model2Vec

potion-multilingual-128M · 256-d

Both searches run locally. If the model cannot load, a deterministic hash embedder replaces it and gets no semantic credit; lexical scores take the semantic weight, and the response records this in degraded.

Ordering · quality multipliers

score = base × recency × confidence × utility × maturity × harmful × scope + anchor match (±0.08)

  • recencyexp(−age / 30 days), floor 0.5
  • confidencethe memory's confidence, floor 0.1
  • utility0.5 + 0.5 × utility
  • maturityrules: retired 0 · candidate 0.5 · established 1 · proven 1.5
  • harmful1 − 0.1 per harmful report, floor 0.2
  • scope× 1.2 on an exact workspace or scope match

Recency, confidence and harmful reports each have a floor, so they can lower a memory's rank but cannot remove it. Maturity is the only multiplier that reaches 0, for a deprecated or retired rule. Memories that are not rules have maturity 1.

Sources and assumptions
src/core/context.rs · the spans recorded by trace.record_elapsed, apply_memory_tier_candidate_admission (CONTEXT_MEMORY_TIER_HOT_BOOST 0.025, WARM 0.010), filter_candidates_by_instruction_authority, apply_personalized_pagerank_rerank · src/core/search.rs · DEFAULT_SEARCH_LEXICAL_WEIGHT 0.45, DEFAULT_SEARCH_SEMANTIC_WEIGHT 0.45, RRF k = 60 · src/search/scoring.rs · SearchScoreComponents · README · Limitations (personalized PageRank). The trace also records embedderPrepare, the daemon handoff's validation, sub-spans and the total, which the figure leaves out. Candidate counts on the stages are illustrative.
03.2ee's selection rule, on your screen

Build a pack yourself.

Change the profile and the budget, and every candidate says why it is in or out. Switch off the redundancy penalty and near-duplicates crowd out the failure the task needed.
Pack assembly · nineteen candidates

Set a profile and a budget, and see what ee's rule packs.

ee's rule, computed here

$ ee pack "prepare the v0.20 release" --profile balanced --max-tokens 800 --explain

Profile

Selection

Candidates · ranked by relevance

select one to see its arithmetic

  1. Why · m04 · 62 tokens · procedural:rule:release

    • gain = 0.75 × 0.87 − 0.25 × 0.95 = 0.415
    • max similarity 0.95 with m01 (same diversity key procedural:rule:release)
    • room for 30 of its 62 tokens under the procedural_rules quota, and the preview tier (20%) was spent: a link, “Memory m04”, 14 tokens, in the peripheral index

Budget spent

680 / 800

full ≤ 560preview ≤ 160link ≤ 80
  • procedural_rules224/240
  • decisions160/160
  • failures160/160
  • evidence108/160
  • artifacts28/80

Items

14

6 full · 3 preview · 5 link

Omitted

5

each with a reason

Avg relevance

0.70

of what was chosen

Near-duplicates in

1 / 3

redundancy lowers gain

# Context Pack: prepare the v0.20 release

**Profile:** balanced | **Budget:** 680/800 tokens

## What NOT to do

### 1. m02 (110 tokens)

Tag pushed before CHANGELOG.md was updated; the installer checksum went stale for a day.

## procedural_rules

### 2. m01 (60 tokens)

Run cargo fmt --check and the clippy gate before tagging.

### 3. m03 (70 tokens)

Bump Cargo.toml and CHANGELOG.md in the same commit as the version tag.

### 4. m09 (80 tokens)

Publish to crates.io only after the GitHub release assets verify.

## decisions

### 5. m06 (90 tokens)

Releases are cut locally with dsr, never with GitHub Actions.

### 6. m10 (70 tokens)

Installers verify SHA-256 sidecars and minisign signatures; ...

## failures

### 7. m08 (50 tokens)

The Homebrew tap was refreshed before the ...

## evidence

### 8. m11 (40 tokens)

cass session, v0.19.0 release ...

### 9. m19 (40 tokens)

cass session: the v0.18.0 release notes were drafted in the same session as the tag.

## Peripheral Index

- `m12` (artifacts)

- `m13` (evidence)

- `m14` (artifacts)

- `m04` (procedural_rules)

- `m15` (evidence)

Sources and assumptions
src/pack/mod.rs · DEFAULT_MMR_RELEVANCE_WEIGHT 0.75, DEFAULT_COVERAGE_FILL_RELEVANCE_FLOOR 0.05, strict_mmr_marginal_gain, candidate_signature_similarity, normalized_terms, quota_for_basis_points, pack_lod_candidate_plan, PackLodBudgetShares::default_70_20_10 · src/models/context_profile.rs · built-in section mixes · src/core/context.rs · diversity_key_for_memory. Candidates, scores and token sizes are invented for this page; ee's submodular profile uses facility location instead of MMR. On a real store, run ee pack "<task>" --explain --json and ee why-not <memory-id> --task "<task>".
03.3Explainable retrieval

Six questions every item answers.

To weigh a memory, an agent needs to know why it was returned. Every returned memory carries its answers to six questions, and ee why and ee pack --explain show the full detail.

01

Why selected?

Score components for each stage of the pipeline.

02

What supports it?

Provenance URIs back to the session, file or command.

03

How fresh?

The recency term: a 30-day time constant, floored at 0.5, the same for every level.

04

How reliable?

Confidence, evidence count, and the weight of harmful feedback.

05

What scores mattered?

The final score, its kind, a normalized relevance, and the raw breakdown.

06

What would change it?

A counterfactual hint, when there is one.

What the scores do not mean

Relevance scores rank results; they are not probabilities that a result answers the task. When results exist, ee reports retrieval quality as unknown rather than inventing a number, because score size, result count and interval coverage do not establish that an answer is correct. Judge a memory by its content and its evidence.

README, “Explainable Retrieval”

03.4Deterministic by default

A pack hash that reproduces.

Given the same snapshots, config, profile, budget and query, ties break the same way and the pack hash reproduces, so a pack can be cited, compared and replayed. The first version of the hash had a collision, which the figure below lets you recreate.
Pack identity · ee.pack.hash_input.v7

The bytes behind a pack's hash.

ee's rule, computed here

A pack's hash is a BLAKE3 digest of ten component digests (nine when the pack leaves out its skipped list), each over labeled fields. The first version fed a provenance's uri and note as raw adjacent bytes, so two different packs could get the same hash. Edit the fields below; the digests are BLAKE3, computed in your browser.

uri ‖ note

Pack A

Bytes fed to the hash

file://abc

10 bytes · blake3

08c2db064656d895354dc8141e164f10869474e638ae198fe5acf14b9a087d81

Pack B

Bytes fed to the hash

file://abc

10 bytes · blake3

08c2db064656d895354dc8141e164f10869474e638ae198fe5acf14b9a087d81

Same hashThese packs differ but get the same hash, so replay, caching and audit would treat them as one pack.

Scores, quantized before hashing

Every score the hash consumes is first rounded to Q20.12 fixed point (round(x × 4096) as a u32), so floating-point noise far below a quantum (1/4096 ≈ 0.000244) usually leaves the bytes, and the hash, unchanged. The exception is two scores on either side of a half-step: they round to different quanta however close they are.

Score A (f32)

0.75

× 4096 = 3072.0000

Score B (f32)

0.75000006

× 4096 = 3072.0002

Q20.12 A

3072

00 0c 00 00

Q20.12 B

3072

00 0c 00 00 · same bytes

Guaranteed

  • Same source and index snapshots, config, profile, budget, seed, query and decision inputs: ties resolve the same way and the pack hash reproduces.
  • The composite is built from tagged component digests, so the component two packs differ in can be found.

Not yet

  • Selection itself still compares raw f32 scores.
  • v7 does not yet establish cross-process or cross-host determinism gates (ADR 0087).
Sources and assumptions
src/core/context.rs · hash_labeled_bytes, hash_pack_hash_provenance (the labels item.provenance.uri and item.provenance.note), compute_context_pack_hash_components (ten components: request, items, omitted, degraded, effective_config, quality_scoring, reference_time, rendered_text, store_scopes, coordination) · src/core/context_test_module.rs · pack_hash_v2_separates_flat_feed_provenance_collision · src/pack/mod.rs · quantize_q20_12 · docs/adr/0087-canonical-deterministic-response-contract.md
Chapter 04 · Learning

It learns from outcomes.

Agents report whether a memory helped or misled them. ee keeps a Bayesian posterior for every memory, promotes it only when the evidence is clear, demotes it faster than it promotes, and does not let an agent's report stand in for a person's.

This chapter on its own page/learning

04.1Bayesian trust classes

A posterior for every memory.

A memory's trust class comes from how it was written: human_explicit for an ordinary ee remember, agent_assertion for a registered agent's attempt-family write, cass_evidence for a line imported from a session. Outcomes move a Beta posterior, and the class changes only when its 90% interval crosses a threshold.
Outcome feedback · a Beta posterior per memory

How outcomes move a memory's trust class.

ee's rule, computed here
Memory starts as
00.250.50.751helpful ratelower > 0.70upper < 0.35mean 0.5

Outcomes, sized by weight

1 2.5

No outcomes yet: the prior, Beta(0.5, 0.5).

α helpful

0.5

β harmful

0.5

Mean

0.5

the legacy confidence

CI90

0.01–0.99

α + β

1

sample-size gate

Helpful outcomes

0

The trust ladder

  1. human_explicit0.85
  2. peer_human_attested0.75
  3. agent_validated0.65
  4. agent_assertion0.5

    Agent claim with no outcome yet

    Promote when

    • CI90 lower > 0.70now 0.006
    • α + β ≥ 6now 1

    Demote when

    • CI90 upper < 0.35now 0.994
  5. cass_evidence0.45
  6. legacy_import0.3

Last class change

None yet. Every change writes a trust_class.transition audit row.

  • Harm weighs 2.5 times

    harmful β + 2.5 · helpful α + 1

    So the mean falls faster than it rises.

  • The 90% interval decides

    Promote when the lower bound clears one threshold, demote when the upper bound falls below another. In between, the class holds.

  • The top class needs a person

    No number of ordinary outcomes reaches human_explicit. It takes --source-type human_explicit, a named --actor and a --reason.

Sources and assumptions
src/core/bayes.rs · Jeffreys prior Beta(0.5, 0.5), helpful α + 1, harmful β + DEFAULT_HARMFUL_WEIGHT (2.5), equal-tailed 90% interval by bisection on I_x(α, β), trust_class_transition (ADR 0032) · src/core/outcome.rs · one transition evaluated per outcome · src/models/trust.rs · initial_confidence. The figure applies every outcome; ee holds a source’s harmful outcomes for review once it passes 5 in an hour (DEFAULT_HARMFUL_PER_SOURCE_PER_HOUR) or a sequential test (SPRT) flags the source.
04.2Failure-to-fix recall

Fixes from past sessions.

ee imports your past agent sessions through cass, finds the failures that were fixed and verified, and keeps each as a short incident card keyed by the error's fingerprint. When that error class appears again, ee diagnose-error or ee pack --error-log returns the fix with its provenance.
CASS import · failure-to-fix recall

Fixes recalled by error fingerprint.

Diagram · not program output

cass-session://ses_01J…7Q · an agent's session, as cass recorded it

A toy in your browser · not ee
  1. L1
    $ cargo test --lib
  2. L2
    error[E0277]: the trait bound `Widget: Serialize` is not satisfied
      --> src/widget.rs:41:9

    the failure

  3. L3
    Let me look at the widget module.

    narration: dropped

  4. L4
    Widget needs to derive Serialize: add #[derive(Serialize)] to the struct.

    the fix

  5. L5
    $ cargo test --lib
  6. L6
    test result: ok. 3 passed; 0 failed

    the proof

ee import cass reads the sessions your agents already recorded. It pairs each failing tool result with the assistant turns that explained the fix and a later successful run of the identical command that proved it.

Only admitted assistant sentences can become the fix. Narration is dropped, and a bare exit code is never an error class on its own.

Sources and assumptions
docs/adr/0091-derived-incident-cards.md · extractive facets, ≤ 120 tokens (INCIDENT_CARD_TOKEN_BUDGET) · src/core/incident_card.rs · header and facet format · src/core/error_recall.rs · canonical_message_template, layered_key · src/core/cass_error_recall_go.rs, cass_error_recall_js_tests.rs · go test and Vitest/Jest diagnostics · the transcripts are shortened, illustrative excerpts; ee parses a test report only when it is complete and its counts agree
04.3No silent memory mutation

Proposed changes go through review.

What ee proposes starts as a reviewable candidate, and applying one writes an audit entry. A person can also tombstone a memory directly, and the decay pass, run with --include-decay, demotes and tombstones on its own; both are audited. No LLM turns a session journal into candidates.
  1. Propose

    Candidates come from journals, imported sessions, consolidation and the steward. Nothing is applied yet.

    ee curate candidates --workspace . --json
  2. Validate

    Each candidate is checked against policy, duplicates and contradictions before anyone can apply it.

    ee curate validate <candidate-id> --workspace . --json
  3. Apply

    Applying writes the change and an audit entry together. Promotions, merges and tombstones are all logged.

    ee curate apply <candidate-id> --workspace . --json
04.4Privacy and trust

Checks on the way in and out.

Anything written to the store can reach every later session. ee refuses to store a memory that contains a secret, screens stored memories for injected instructions before it packs them, and only advises on commands: no ee check can stop the agent from running one. The trust model.

ee remember refuses secrets

Text that looks like an API key, JWT, password, private or SSH key, AWS secret or OAuth token is refused with exit 7, and the error says where it matched. --allow-secret-mention stores it anyway and writes an audit entry. Commands that export take a redaction level from none to paranoid.

Stored instructions are screened

Before packing, stored memories are screened for role overrides, hidden-prompt requests, credential requests and authority claims. A match is omitted with an explanation and kept for inspection.

Preflight only advises

ee preflight looks up the risk history of a command before you run it. It reports what it finds, and the risk it finds does not change its exit code; it does not block the command, and no ee hook denies one.

Imported evidence is committed

Session lines imported since v0.19.0 carry keyed BLAKE3 commitments under the store's root key, so evidence can be checked without keeping raw digests of it.

$ ee remember "DATABASE_URL=postgres://user:hunter2@host/db"
# refused: exit 7, policy_denied, detectedPattern database_url; nothing is written
Chapter 05 · Campaigns

For work that runs for weeks.

Some work runs for weeks: a performance hunt, a recurring incident, a research question you keep returning to. ee records each attempt as evidence, can propose a repeated family of failures as a rule, and keeps each session's pack within the same budget as the store grows.

This chapter on its own page/campaigns

05.1A simulated campaign

Twenty-six weeks of one campaign.

Drag through half a year of one campaign. Working notes expire, failures accumulate and are distilled into rules, decisions come up for review, and a rule that starts misleading is demoted. For any day, the figure also shows the pack the next session would start with.
Five campaigns · 26 weeks each

As the store grows, each pack stays within 4,000 tokens.

A toy in your browser · not ee

Query-engine performance

A coding agent and its benchmarking skill, one repository

./optimization/query-engine

  • Memories live
  • working0t½ 1 d
  • episodic160t½ 30 / 90 d
  • semantic92t½ 180 d
  • procedural13t½ 365 d
KICKOFFPUSH0100200300W1W3W5W7W9W11W13W15W17W19W21W23PROCEDURAL RULES IN FORCE+1+4+5−1+4Week 2 · Tue · Target recorded: p99 latency1Week 4 · Thu · Three prefetch regressions become an anti-pattern2Week 6 · Fri · Playbook extract: four rules3Week 9 · Tue · The bench-noise rule is validated4Week 12 · Wed · Five more rules from the profiling work5Week 15 · Mon · Revisit due: the p99 target6Week 21 · Thu · The arena rule is deprecated7Week 23 · Wed · Four rules from the second half8Week 25 · Sun · Decay sweeps: 60 stale notes tombstoned9W26

Memories live

265

1,825 written · 1,560 retired

Procedural rules

13

+14 promoted · −1 deprecated

Pack tokens

3,715

of a fixed 4,000; the store holds ≈ 27k

Dead ends avoided

43

a known failure surfaced before a retry

9Decay sweepWeek 25 · Sun

Decay sweeps: 60 stale notes tombstoned

This week's sweep took 10. Bench notes unrecalled for months fall below lifecycle 0.01 and are tombstoned: an audited, reversible removal from retrieval.

$ ee maintenance run --job decay_sweep --include-decay

Event 9, Week 25 · Sun: Decay sweeps: 60 stale notes tombstoned

Monday · week 26

3,715 / 4,000 tokens

The session starts with this pack

$ ee pack “find the next p99 win on oltp-mixed” --max-tokens 4000

  1. ## procedural_rules1,115/1,200
    • Don't prefetch B-tree leaves on a fixed stride: three regressions on small-N reads, all cache pollution.

      procedural · anti-patternagent_assertion

      bench-run://2026-09-12T14:23/oltp-mixed-small-n

    • Every optimization lands with a median-of-3 bench diff and its revert SHA.

      procedural · rulehuman_explicit

      git-sha://5d1e0a7

    • + 11 more · 955 tokens
  2. ## decisions730/800
    • Keep the B-tree. An LSM rewrite was rejected as too much risk for one campaign.

      semantic · decisionhuman_explicitrevisit due

      design-review://w08/storage

    • p99 target reaffirmed at 2.0 ms after the revisit; supersedes the first.

      semantic · decisionhuman_explicit

      charter://oltp-campaign/v2

    • + 6 more · 570 tokens
  3. ## failures755/800
    • After the allocator switch, 64 KiB arenas cost +18% p99 on two runs.

      episodic · failurecass_evidence

      bench-run://alloc/post-switch

    • + 7 more · 675 tokens
  4. ## evidence715/800
    • p99 at 1.9 ms: under target for the first time.

      episodic · factcass_evidence

      bench-run://oltp-mixed/w24

    • + 6 more · 635 tokens
  5. ## artifacts400/400
    • docs/perf/negative-ledger.md: every attempt that lost, and why.

      semantic · artifactagent_assertion

      file://docs/perf/negative-ledger.md

    • + 6 more · 345 tokens

spend by sectionbudget 4,000, a hard cap

Rules from repeated lessons. When three notes carry the same lesson, ee playbook extract proposes a rule candidate, which a reviewer validates and applies. Three harmful outcomes from two sources propose an anti-pattern.

Revisit dates. ee decide record stores the choice, the alternatives and the reason. With --revisit-by +90d, the decision is listed by ee decide revisit when it falls due, and the new decision supersedes the old one.

What leaves the store. Scratch expires when its workflow closes. The decay sweep tombstones notes that nobody recalls. A rule with harmful outcomes from two sources is deprecated through curation. The pack stays within its budget however large the store gets.

Sources and assumptions
A toy: five invented campaigns simulated in your browser, nothing measured. The pack here puts an anti-pattern first, as ee’s does, then ranks by trust and recency, where ee’s pack uses MMR. ee’s own: src/policy/memory_decay.rs · MemoryDecayHalfLives::default (working 1 d, episodic event 30 d, failure 90 d, semantic 180 d, procedural 365 d) · DEFAULT_DECAY_FORGET_THRESHOLD 0.01 · src/pack/mod.rs · DEFAULT_CONTEXT_MAX_TOKENS 4000 · src/models/context_profile.rs · balanced mix 30/20/20/20/10 · src/models/trust.rs · TrustClass · src/core/rule.rs · PLAYBOOK_MIN_EVIDENCE 3, portable_import_trust_class · src/core/outcome.rs · ANTI_PATTERN_PROPOSAL_THRESHOLD 3 from two sources · src/models/rule.rs · has_harmful_quorum (deprecation through curation) · src/core/bayes.rs · trust_class_transition · src/cli/mod.rs · ee decide record --revisit-by, ee decide revisit, ee maintenance run --include-decay · README.md · Beyond Coding, Negative Evidence Ledger, Memory Model
05.2Negative evidence

A ledger of failed attempts.

In a long optimization or research campaign most attempts fail, and each one costs time. A failure recorded with its family and cause warns later sessions before they repeat it, and after review, repeated failures in one family can become an anti-pattern rule for that family.
One campaign, two agents

The same search, with and without a failure ledger.

A toy in your browser · not ee
  • Brighter: looks more promising
  • Tried, failed
  • A known dead end, tried again
  • Pruned by an anti-pattern
  • A win
  • This session's attempts

No memory

Each session starts with no record of the others

approach →parameter →22352323223322324523

Dead ends re-tried

35

of 96 attempts

First win

S18

2 of 3 found

Families pruned

0

70 tries spent in them

With ee

Each session starts from the ledger's pack

approach →parameter →anti-pattern Aanti-pattern Banti-pattern Canti-pattern Danti-pattern Eanti-pattern F

Dead ends re-tried

0

of 96 attempts

First win

S8

3 of 3 found

Families pruned

6 of 6

71 untried cells ruled out

Session 24/24

96 attempts each · landscape #22

Session 24 of 24. No memory: 3 of 4 attempts repeated a known dead end, and one hit a win. With ee: 4 attempts, none on a recorded failure or a pruned family.

The ledger, by family

distilled at 3 recorded failures

FamilyWith eeNo memory
Aanti-pattern from S612 cells never tried10 tries · 4 again
Banti-pattern from S129 cells never tried4 tries · 1 again
Canti-pattern from S412 cells never tried23 tries · 11 again
Danti-pattern from S314 cells never tried22 tries · 13 again
Eanti-pattern from S712 cells never tried7 tries
Fanti-pattern from S812 cells never tried4 tries

The ee commands in this loop

  1. 1

    Capture

    $ ee remember "Tried … Family: B. Cause: …" --level episodic --kind failure

  2. 2

    Group

    $ ee search "<the idea>" --kind failure --field family=B

  3. 3

    Distill

    $ ee curate validate <id> · ee curate apply <id>

  4. 4

    Pack

    $ ee pack "<the next idea>"

Invented for this page

  • The landscape, the agent, and its taste for promising-looking ideas.
  • Curation running by itself at a family’s third failure.
  • No family ever holding a win. A real one might, so an anti-pattern stays an audited rule with its evidence attached.

ee’s own

  • A failure carries its family as a typed field, and a search on that field returns the family’s failures together.
  • A rule exists only once ee curate apply accepts it, and the next pack puts what not to do first.
  • Three is ee’s threshold: ee playbook extract waits for three notes carrying one lesson, and three harmful outcomes propose an anti-pattern.
Sources and assumptions
README.md · Negative Evidence Ledger · src/models/memory.rs · FAILURE_TYPED_MEMORY_FIELDS: cause, regression_surface, reverted_at_sha, family (from “Family:” in the body, or --field family=…) · src/cli/mod.rs · ee search <query> --kind failure --field family=…; attempt families are a separate ledger (ee remember --family --of-n --attempt --attempt-outcome, ee search --family) · src/core/rule.rs · PLAYBOOK_MIN_EVIDENCE = 3 · src/core/outcome.rs · ANTI_PATTERN_PROPOSAL_THRESHOLD = 3, from at least two sources · src/core/curate.rs · an applied anti_pattern_proposal becomes a protected procedural rule · src/pack/mod.rs · include_anti_pattern_first (“What NOT to do”) · docs/adr/0006-procedural-memory-requires-evidence.md. The landscape, the agent and the automatic distillation are invented for this page.
05.3Beyond code

Any work with sources and decisions.

Nothing in the memory model is specific to software: one workspace per matter, position or incident, every memory pointing back at its source. Privileged work can opt out of the shared lane entirely.
  • Investment researchper a position

    Thesis revisions, valuation methods, failed screens, peer sets

    $ ee init --workspace ./positions/AAPL-long

    • sec-filing://…
    • earnings-call://…
    • analyst-note://…
  • Legal workper a matter

    Case rules, drafting conventions, negotiation outcomes, due-diligence steps

    $ ee init --workspace ./matters/smith-v-jones

    • case://…
    • pacer://…
    • westlaw://…
  • Security and incident responseper an incident

    IOCs, TTPs, response playbooks, detection-rule outcomes

    $ ee init --workspace ./incidents/2026-11-phish

    • cve://…
    • mitre://…
    • incident://…
  • Marketing analysisper a program

    Campaign retrospectives, A/B results, channel rules, segmentation methods

    $ ee init --workspace ./growth/q4-launch

    • ga4://…
    • mixpanel://…
    • campaign://…
  • Product managementper a product line

    User research, launch retrospectives, personas, prioritization rules

    $ ee init --workspace ./product/onboarding

    • interview://…
    • linear://…
    • notion://…
  • Medicine or clinical operationsper a protocol

    Guideline facts, near misses, differential-diagnosis procedures

    $ ee init --workspace ./clinic/sepsis-pathway

    • pubmed://…
    • guideline://…
    • emr://…
  • Sales and account workper an account

    Call notes, objection patterns, account maps, qualification playbooks

    $ ee init --workspace ./deals/2026-q3-acme

    • crm://…
    • salesforce://…
    • gong://…
  • Privileged work

    A matter-confidential or patient-adjacent workspace should neither read shared memories nor leak its own into them. One setting takes it out of the user-global lane; retrieval then says so in degraded instead of silently narrowing.

    $ ee config set memory.participate false

README, “Beyond Coding”. The URIs are what you pass to ee remember --source; ee records them as provenance and does not fetch them. Session import through cass is coding-specific; elsewhere, use ee remember or ee import jsonl.

05.4Scale

From one agent to a team.

One store serves one agent on one repository or a swarm of agents working at once. A small team can link their stores to share what each member learns, and a user-global lane follows you across every workspace you open. When two lanes disagree, ee records the conflict.
Zoom out · four scales

How ee's memory works at four scales.

Diagram · not program output

The same store, trust classes and rules at every scale, and none of them needs a server.

your-repo/src/tests/docs/README.md.ee/the store, in the repoee.dbFrankenSQLiteSOURCE OF TRUTHindex/BM25 + vectorsDERIVEDREBUILDABLEee index rebuildremember · outcomepack · search · recall1 agentone-shot CLI

A write goes into the database, the index is derived from it, and a pack reads from both.

Agents

1

a one-shot CLI

Writers at once

1

one write lock per store

Stores

1

.ee/ee.db, in the repository

Incoming trust class

human_explicit

a direct ee remember · the highest class

01 / 04One agent in one workspace

The store lives in the repository's own .ee directory. It holds one database, and everything else in it is derived from that database.

  • .ee/ee.db is a FrankenSQLite database and the source of truth. Its search index is stored next to it in .ee/index/. src/core/status.rs · src/config/workspace.rs
  • Indexes, embeddings, graph snapshots and caches are derived data. If the index is lost, ee index rebuild regenerates it from the database. README.md · Design Philosophy §6
  • Every core workflow runs as a one-shot command and needs no daemon, network or cloud. README.md · Design Philosophy §1, §3
  • Every promotion, consolidation, replacement and tombstone writes an audit entry. README.md · Design Philosophy §9

Commands

ee init --workspace .
ee remember "<lesson>" --workspace . --json
ee pack "<task>" --workspace . --max-tokens 4000 --format markdown
ee index rebuild --workspace .

Lanes · fixed precedence on overlap

  1. 1workspacethis repository's own .ee store
  2. 2teamteammates' rows, peer_human_attestedzoom out
  3. 3globalyour house rules, in global/zoom out
  • Same subject, same text: the workspace row wins over the team copy, and the decision is recorded.
  • Same subject, different text: both stay in the pack, flagged, and ranking does not choose between them (team_lane_conflict_deferred, global_lane_conflict_deferred).
Sources and assumptions
Each fact names its own source above. Also: src/daemon/server.rs (the write actor: 64 rows, 1,000 µs) · src/core/global_store.rs (lane_specificity_rank, surface_precedence_conflicts) · src/core/context.rs (the lane-conflict codes) · docs/adr/0077, 0083, 0086. The agents, people, workspaces and memories drawn are illustrative, and every motion is slowed down.
Chapter 06 · For agents

Output an agent can act on.

Most of ee's callers are agents. With --json, every command answers in one versioned JSON envelope with a typed exit code; anything that ran in a reduced mode is listed with a code, and errors carry a recovery plan when ee has one.

This chapter on its own page/agents

06.1The agent's loop

A session, the way an agent runs it.

From resume to handoff, every step but the work itself is one ee command, and its JSON answer has named fields the next step reads.
For agents · one session, command by command

The ee commands in one agent session.

Diagram · not program output

Nine stations: five only read from ee, three write to it, one is the harness's own work. Pick one to see its command and the JSON it returns, or press Play.

resumeREAD-ONLYorientREAD-ONLYpackREAD-ONLYrecallREAD-ONLYpreflightADVISORYthe workHARNESSrememberWRITESoutcomeWRITEShandoffWRITES
  • reads only
  • writes
  • the harness
  • between sessions
What it returns
The last three sessions' episodic memories, decisions waiting on a revisit, items tagged next, todo, blocking and the like, and a stale flag on any item a newer memory has superseded.
Why it works this way
When the store is missing or empty, resume still succeeds. It returns an empty report that lists populated stores nearby with the exact command to retarget, and it never creates a store. An agent started in the wrong directory is given the command for the right store, and resume does not suggest ee init.

checked against src/core/resume.rs · src/cli/mod.rs · docs/schemas/ee.resume.v1.json · src/core/effect.rs

01 / 09
Resume the last session
read-only

Where was I?

$ ee resume --workspace . --json
The agent reads
data.report.sessionsdata.report.openLoopsdata.report.nearbyStoresdata.report.nextCommands

What comes back · a store with nothing to resumeexcerpt · highlighted: what the agent reads

{  "schema": "ee.response.v2",  "data": {    "report": {      "schema": "ee.resume.v1",      "episodicTotal": 0,      "sessions": [],      "openLoops": { "revisitDecisionsTotal": 0, … },      "nearbyStores": {        "stores": [{ "documents": …, "provenance": "child_scan", … }],        "outcome": "complete"      },      "nextCommands": ["ee resume --workspace … --database … --json", …]    }  },  "degraded": [{ "code": "resume_no_session_evidence", … }]}
Sources and assumptions
README.md · Agent Operating Loop · src/cli/mod.rs · ResumeArgs, OrientArgs, PackArgs (--read-only), RecallArgs (--diff-staged), PreflightGuardArgs, RememberArgs (--idempotency-key), OutcomeArgs (--event-id), HandoffCreateArgs, handle_resume, handle_orient · src/core/effect.rs (which commands read and which write) · src/core/resume.rs · src/core/preflight_guard.rs · src/core/outcome.rs (DEFAULT_HARMFUL_PER_SOURCE_PER_HOUR 5, DEFAULT_HARMFUL_BURST_WINDOW_SECONDS 3600) · src/core/handoff.rs · src/output/mod.rs (build_pack_skipped_item, render_handoff_create_json) · docs/schemas · ee.response.v2, ee.resume.v1, ee.orient.v1, ee.pack.v2, ee.recall.v1, ee.preflight.guard.v1. Field names are spelled as those files spell them; each excerpt is a selection of fields, values are illustrative, and … marks a cut. web/tests/session-loop.test.ts checks every key against the files each station cites.
06.2ee.error.v2

Errors that say what to do next.

An error message written for a person leaves an agent guessing. An ee error states what broke and how serious it is, and where ee knows the repair, it names the command, whether it is safe to run unattended, and whether a person has to approve it first.
For agents · the error contract

How an agent reads an ee error or degraded result.

From the record

A typical CLI

A toy in your browser · not ee
Error: search index is out of date.
Please rebuild the index and try again.
exit 1

The message names no command and does not say whether a rebuild is safe to run unattended.

ee · stdoutexit 4

$ ee … --json

{"schema": "ee.error.v2","error": {"code": "search_index","message": "Index is stale (generation 9, database generation 12).","severity": "medium","repair": "ee index rebuild","repairKind": "actionable","details": {"recovery": [{"priority": 1,"kind": "migration","rationale": "Rebuild the index from current memory state; idempotent.","riskClass": "idempotent_refresh","requiresHumanApproval": false,… 5 more"command": "ee index rebuild --workspace ."},{"priority": 2,"kind": "migration","rationale": "Inspect index state before rebuilding (faster diagnosis).","riskClass": "read_only_probe","requiresHumanApproval": false,… 4 more"command": "ee index status --workspace . --json"}]}}}

pinned: tests/snapshots/error_envelope_golden__error_envelope_search_index.snap

An agent’s reading

Read 7 of 7 · Re-check

Exit 0, and no index code left in degraded[].

VerdictRetry automatically

Each risk class and its next action

ee's rule, computed here
  • read_only_proberun it
  • idempotent_refreshrun it · preflight if given · ask if approval
  • mutating_local_repairrun it · preflight if given · ask if approval
  • mutating_external_coordination_repaircoordinate first · ask if approval
  • approval_required_repairask a human
  • destructive_or_irreversible_repairask a human
  • unavailable_or_manual_onlymanual only

From repair_command_preflight_policy in src/core/preflight_guard.rs. Two classes always lead to ask_human and one to manual_only; three more lead to ask_human when requiresHumanApproval is true.

Sources and assumptions
src/models/mod.rs · ProcessExitCode (0–10, 130), ERROR_SCHEMA_V2, RESPONSE_SCHEMA_V2, RecoveryKind, RepairActionRiskClass, repair_action_safety · src/output/mod.rs · error_response_json, build_recovery_action_fields · src/core/preflight_guard.rs · repair_command_preflight_policy · docs/schemas/ee.error.v2.json · this record: tests/snapshots/error_envelope_golden__error_envelope_search_index.snap, pinned by tests/error_envelope_golden.rs · error_envelope_search_index · “…” marks a cut and <…> a runtime value · the typical CLI is invented for the contrast
06.3Self-documenting

It documents itself to the agent.

An agent can learn ee without a person explaining it. The documentation, the command tree and the schemas are all commands that return JSON, and every outcome has an exit code the agent can branch on.
  • ee --agent-docs

    A machine-readable overview of ee and the index of every documentation topic.

  • ee agent-docs recipes

    32 workflows, each with its command, a jq selector for the answer, a success check and its failure branches.

  • ee agent-docs <topic>

    Twelve focused topics: guide, commands, contracts, schemas, paths, env, exit-codes, fields, errors, formats, examples, recipes.

  • ee --help-json

    The whole command tree as JSON, so a harness can build its own tool list.

  • ee schema list

    Every public JSON Schema by id; ee schema export <id> prints one to validate against.

  • ee introspect

    ee's command, schema and error maps in one response.

  • ee capabilities

    What this build can do: feature flags, the binaries it found, the environment overrides in force.

Exit codes · one per class of failure
  1. 0successread data
  2. 1usagefix the call
  3. 2configurationfix the config
  4. 3storagefollow repair
  5. 4search indexrebuild the index
  6. 5importcheck the source
  7. 6degraded, required mode unmetrelax or repair
  8. 7policy deniedask a human
  9. 8migration requiredee migrate run
  10. 9eval found regressionsread the report
  11. 10workspace store missingcheck the path; don't init blindly
  12. 130cancelledretry with more budget

ProcessExitCode, src/models/mod.rs · stdout carries JSON, stderr carries diagnostics

Five postures

ee status reports one of five postures, so an agent can tell a store that is still warming up from one that needs a repair and one it must not touch. ee doctor uses three of them: ok, degraded_recoverable and blocked.

  1. ok
  2. initializing
  3. degraded_recoverable
  4. degraded_required
  5. blocked

src/models/posture.rs

Chapter 07 · Graph

Memories form a graph.

A rule supports a decision, a failure derives from a session, one fact contradicts another. ee stores those links and finds the memories many others rest on, and the ones that are a topic's only bridge to the rest.

This chapter on its own page/graph

07.1Graph lenses

What the links show.

Similarity search finds memories whose text looks like the task. The links find others that text similarity misses, such as the rule twelve decisions rest on or the only fact connecting two topics. Tap a lens, then a memory.
FrankenNetworkX · graph analytics over memory links

Five lenses on a toy graph of 22 memories.

A toy in your browser · not ee
debug is 10x slowerv0.19 cut by handsingle-writer WALtimeout ≠ OOMrefresh the tappin a warm workermigration V133SIGKILL: no verdictflaky CI testbump the versionsign SHA256SUMSfmt before tagverify before tag--locked requiredrelease checklistno down-migrationrelease notesskip fmt if rushedtask: cut v0.20back up firstdaemon write ownerAPFS export base
workingepisodicsemanticproceduralsupportsderived_fromcontradictsrelatedco_mention

The question

Which memories does everything else lean on?

  • $ ee graph pagerank --limit 10
  • $ ee graph centrality --algorithm pagerank

Rank flows from each memory to the memories it leans on, so it collects in the facts and incidents the rules were built from. In this toy a contradicts link passes no rank.

Highest under this lens

Tap a memory to see its neighborhood.

  • On demand

    Each lens is a command you run over your own store.

  • Off by default

    The features that would change ranking, retention or pack explanations (Pack DNA, proximity, HITS profiles, structural decay), and the knowledge skyline. Each is a graph.feature.* flag.

  • Not available

    Personalized PageRank: a request reports graph_ppr_upstream_unavailable and falls back to textual ranking.

Sources and assumptions
README · Graph and Graph-derived insights command tables · docs/configuration/graph.md · every graph.feature.* flag defaults to false · src/db/mod.rs · MemoryLinkRelation · src/models/context_profile.rs · hits_boost_weights (grounding, orientation, balanced) · src/graph/decay.rs · compute_onion_layers · personalized PageRank: graph_ppr_upstream_unavailable
07.2FrankenNetworkX, in the CLI

Each algorithm answers a question.

Each is a command with deterministic JSON output. Graph feature flags are off by default, and a tool that needs one names the ee config set line that turns it on. Provenance, not the graph, stays the record of where a memory came from.
  • PageRank

    Which memories does everything else lean on?

    ee graph pagerank --limit 10

  • HITS

    Which memories are hubs that point at good ones, and which are the authorities?

    ee graph hits --limit 10

  • Articulation points

    Which single memory, if wrong, cuts a topic off from the rest?

    ee graph articulation

  • Louvain communities

    Which memories form a topic, whatever their tags say?

    ee graph louvain

  • k-core

    Where is the knowledge dense, and where is it thin?

    ee graph k-core --json

  • Link prediction

    Which links are missing? Proposed, never written silently.

    ee graph suggest-links --propose

  • Gomory-Hu proximity

    How tightly are two memories bound, and through what?

    ee proximity <memory-a> <memory-b> --json

    needs ee config set graph.feature.proximity.enabled true

  • k-truss and contradiction clusters

    Which groups of memories hold together, and where do contradictions cluster?

    ee health --robot-insights --json

    needs ee config set graph.feature.structural_health.enabled true

  • Causal paths

    What chain of events led to this failure?

    ee why <memory-id> --causal-explain --json

    needs ee config set graph.feature.causal_explain.enabled true

  • Pack DNA

    Why does this pack look the way it does: dominators, communities, ego graphs.

    ee pack "<task>" --explain --json

    needs ee config set graph.feature.pack_dna.enabled true

  • Knowledge skyline

    The store's posture across layers, communities, trust, age and support.

    ee insights --section knowledgeSkyline --json

    needs ee config set graph.feature.skyline.enabled true

Chapter 08 · Proof

Evidence, limits and install.

A wrong memory misleads every session that reads it, so ee is held to strict rules: a check that refuses banned dependencies, 630 failure-mode fixtures, 280 versioned JSON schemas, and a published list of what does not work yet. The chapter ends with the install commands.

This chapter on its own page/proof

08.1Comparison

ee beside the alternatives.

A vector database returns text that looks similar to the query. A notes file holds whatever someone last wrote down. ee also records what kind of thing each memory is, how far to trust it, how old it is, and why it was put in this pack.

Swipe the table for the other three →

ee compared with a vector database, an MCP memory server and plain notes
FeatureeeVector DB (Chroma, Qdrant)MCP memory serverCLAUDE.md / notes
Local-first by defaultyesvariesvariesyes
Hybrid lexical + semantic retrievalyesvariespartialno
Provenance for every itemyesnopartialmanual
Procedural rules that decayyesnonono
Anti-patterns and harmful feedbackyesnonomanual
Explainable scoresyesnopartialn/a
Graph analytics over memoriesyesnonono
Deterministic JSON outputyesvariesvariesn/a
Imports past agent sessionsyesmanual ETLnomanual
Works with no daemon runningyesvariesnoyes
Single-binary installyesvariesnon/a
Audit log of curationyesnonogit only
README, “Comparison”. “Graph analytics” excludes personalized PageRank, which is pending upstream.
08.2Graceful degradation

Commands still answer with parts missing.

Search, packs and the graph still answer when an optional part is missing, and report what they lost as a code, a severity and, where ee has one, a repair. A cass import is the exception: without cass it fails, with the same entry in its error.
Graceful degradation

What still works when a part is missing.

From the record

Still working

8/9

capabilities not switched off

Entries

1

what ee reports, below

Failure modes

630

documented, one fixture each

  • worksCapture · remember, journal, outcomewrites go to the source of truth
  • worksLexical search · BM25full
  • offSemantic similaritylexical search answers the query
  • degradedHybrid fusion · RRFlexical arm only
  • worksRerankingoptional, local
  • worksGraph boosts and enrichmentcurrent links
  • worksSession evidence importee import cass
  • degradedContext packs · ee packbuilt from the lexical arm
  • worksProvenance and the JSON contracton every --json response

What ee reports, and where

// ee search … --json · data.degraded[]
// src/core/search.rs
{
  "code": "embed_model_unavailable",
  "severity": "warning",
  "message": "Embedding model unavailable (<reason>); semantic similarity is disabled and lexical search remains available.",
  "repair": "ee index reembed --workspace ."
}

Working offline. With the model cached, going offline changes nothing. A machine that has never downloaded the model falls back to deterministic hash embeddings and reports embed_model_unavailable.

Stale index. When a read-only request’s whole corpus fits within 4,096 rows and 16 MiB, ee searches a complete in-memory snapshot instead of the index and reports search_live_snapshot_lexical.

Sources and assumptions
tests/fixtures/failure_modes/*.json (630 fixtures, one per degraded code: embed_model_unavailable, search_index_stale, graph_snapshot_stale, cass_unavailable, rerank_model_unavailable, …) · the messages from the files named on each entry · the reranker under data.rerank.advisory: tests/rerank_posture_contract.rs · README.md · Design Philosophy §7, Graceful Degradation
08.3Hard requirements

Dependencies the checks refuse.

Each line below is a dependency that fails ee's forbidden-dependency check, and what ee uses instead. Together they keep ee a single binary with its own runtime and storage stack and no HTTP framework. Hybrid search comes from one crate, Frankensearch, by convention; no check enforces that one.
  • Tokio, async-std, smol

    Asupersync

    Structured concurrency, cancellation as a value, deterministic lab tests.

  • rusqlite, SQLx, Diesel

    FrankenSQLite + SQLModel

    One Rust storage stack with MVCC, owned end to end.

  • petgraph

    FrankenNetworkX

    Graph algorithms with NetworkX semantics, in Rust.

  • hyper, axum, reqwest

    No HTTP framework

    Memory needs no network. The optional ee serve is a loopback server on Rust's standard library.

lines of Rust in src/
1.44M771 files; another 443k lines of tests.
architecture decisions
91Numbered ADRs in docs/adr, each with a status.
forward-only migrations
133No down-migrations: back up, then move forward.
commits
14,486Since the first one, 2026-04-29.
Built on the FrankenSuite
  • Asupersyncruntime

    Structured concurrency with cancellation as a value.

  • FrankenSQLitestore

    The source of truth, with MVCC, through SQLModel.

  • Frankensearchsearch

    BM25 and Model2Vec vectors, fused by reciprocal rank.

  • FrankenNetworkXgraph

    PageRank, HITS, communities, cores, cuts.

  • cassevidence

    Search over your past Claude Code, Codex, Cursor and Gemini sessions.

Releases
  1. v0.12026-05-15

    First release: remember, search, pack.

  2. v0.132026-07-30

    A user-global memory lane beside each workspace.

  3. v0.142026-08-18

    Team confederation: signed, hash-chained sharing between stores.

  4. v0.152026-09-12

    Published on crates.io.

  5. v0.162026-09-27

    ee ask answers from procedural rules and imported session evidence.

  6. v0.172026-10-02

    Retrieval quality ranking, and a Pareto-frontier knowledge skyline.

  7. v0.182026-10-14

    Failure-to-fix recall from imported sessions.

  8. v0.192026-11-21

    Keyed CASS commitments, warm daemon packs, Go/Rust/Vitest/Jest error recall, cargo audit 12 → 0.

From the tags and CHANGELOG.md.

08.4Limitations

What is not done yet.

Drawn from the README, the ADRs and the CHANGELOG, as of v0.19.0.
  • Personalized PageRank is unavailable

    The pinned graph library has no deterministic personalized PageRank yet, so that ranking signal and Pack DNA's PPR neighbors are unavailable; both report graph_ppr_upstream_unavailable and fall back. PageRank, HITS, Louvain and articulation points are unaffected.

  • Most graph views are opt-in

    Every graph.feature.* flag defaults to off, so ee proximity, ee why --causal-explain, ee health --robot-insights, the knowledge skyline and Pack DNA report graph_feature_disabled until you run ee config set graph.feature.<name>.enabled true. PageRank, HITS, Louvain and articulation points need no flag.

  • Determinism is per platform, and not yet gated across hosts

    The pack hash binds the target architecture, OS and enabled features, so the same inputs give the same hash on the same platform. Tie-breaks still compare raw f32, and no gate yet checks determinism across processes or hosts (ADR 0087).

  • Heavy write swarms need a write owner

    Many agents can read at once. FrankenSQLite is single-process MVCC, so heavy concurrent writing goes through job locks or the optional daemon.

  • Releases are signed but carry no SLSA provenance

    Current releases ship SHA-256 sums and minisign signatures. There are no Sigstore bundles or SLSA provenance, so --require-provenance fails by design.

  • Some performance gates are unproven

    Since v0.16.0, a read-only pack through a warm daemon measured 708 ms against 3,155 ms for the same pack built locally, on one worker; the 10,000-memory, 2x median gate is still unverified.

08.5v0.19.0 · 2026-11-21

Install it and connect your harness.

Install the binary, open a workspace, and let your harness call it. The installer verifies the release checksum, adds shell completions, runs a self-test and tells you which agent harnesses it found; it does not touch their settings.

# Release installer: checks SHA-256, installs to ~/.local/bin, runs a self-test

curl -fsSL https://github.com/Dicklesworthstone/eidetic_engine_cli/releases/download/v0.19.0/install.sh -o install.sh
EE_VERSION=v0.19.0 bash install.sh --easy-mode --verify

# Homebrew (macOS, Linux)

brew install Dicklesworthstone/tap/ee

# From crates.io (nightly Rust)

cargo +nightly install eidetic-engine --version 0.19.0 --locked
Then wire it into your harness
  • Claude Code

    ee hook claude-code --install --workspace . --json

    Four managed hooks: orientation at session start, recall before an edit, a journal entry when a Bash command fails, and capture suggestions at the end. They fail open and never deny a command.

  • Codex

    ee hook codex --install --workspace . --json

    Codex shells out, so every ee command works as is; ee pack --json drops straight into a message.

  • MCP

    ee mcp manifest --json

    The stdio adapter needs a build with --features mcp; without it the manifest reports the adapter as disabled. Its tools, such as ee_context, ee_search and ee_remember, follow the CLI's contracts.

  • Anything with a shell

    ee pack "<task>" --workspace . --format markdown

    Scripts and people get the same commands and the same JSON as the agents.