Skip to the page
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.

Read all eight chapters on one page

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.