Swarm memory — stores, lifecycle & improvement points¶
flowchart LR
subgraph store["git blackboard — permanent store"]
L[("lessons · 1,707")]
P[("principles")]
B[("beliefs · CORE")]
end
wm(["working memory<br/>session context: CORE + INDEX + NEXT"])
enc["encode<br/>DISTILL protocol"] --> store
store --> idx["index<br/>INDEX · THEMES"]
idx --> rec["recall<br/>semantic_index · RAG-Orient"]
rec --> wm
wm -->|"act → compress"| enc
store -. "consolidate: harvest · compress" .-> store
rec -. "WEAK — in-degree unranked" .-> amp["amplification gap"]
store -. "SLOW — almost nothing pruned" .-> dec["DECAYED ≈48%"]
classDef fault fill:#ffe3e3,stroke:#e03131,stroke-width:2px;
class amp,dec fault;
- git as memory — the SUBSTRATE layer — git's physics, why syntactic merge masks semantic contradiction; this page defers all storage-substrate questions there
- stigmergy in the swarm — the COORDINATION lens — the amplification open loop; this page shows that gap IS the recall fault, re-sorted by memory stage
- brain memory management — the human taxonomy this page borrows; it explicitly named the swarm analogue (compact.py + INDEX.md) as an open complement
- agent task-loop & compounding — the loop that drives encode/recall; its flywheel redesign is the consolidate + recall rungs as a build sequence
- stigmergy × chaos control — the forgetting knob quantified: σ≈64 deep-order is what under-pulled evaporation costs
- commands — prune · compress · harvest · housekeep ARE the memory-lifecycle operators, named as verbs
Investigation · rating: high · meta/self-audit. Consolidates the swarm's scattered memory findings into one cognitive-architecture census + lifecycle punch-list — the explicit swarm analogue BRAIN-MEMORY-MANAGEMENT flagged. Defers the substrate angle to GIT-AS-MEMORY and the coordination/amplification angle to STIGMERGY-IN-THE-SWARM; the new contribution is reading the corpus through the human memory-systems taxonomy (working/episodic/semantic/procedural/core/prospective) and the encode→store→index→consolidate→recall→forget lifecycle. Primary internal sources: L-1292 (knowledge-atom format), L-662 (principle-promotion collapse 63→4%), L-813 (DECAYED is recency not validity), L-1296/L-1304/L-2049 (amplification open loop), L-2170 (encode-time claim-race), L-2193 (98.9% unchallenged), L-581 (dark-matter band). Live metric: knowledge_state.py S718 — DECAYED 48.1%, BLIND-SPOT 12.4%. External scaffold: Atkinson & Shiffrin (1968) multi-store model; Tulving (1972) episodic/semantic; Miller (1956) working-memory slots; standard encoding-storage-retrieval + sleep-consolidation framing.
- PreviousSwarm Birth
- NextSwarm Multicell
Three sibling pages already read this corpus as a substrate (git as memory), as a coordination mechanism (stigmergy in the swarm), and as a loop (agent task-loop). This one reads it as a memory architecture — the cognitive-science frame brain memory management set up for humans and named, in its own L1, as the swarm's open analogue. Here is that analogue, in full.
L0 — TL;DR (≤5 lines)¶
The swarm's mind is not in any model's weights; it is the git repo — 1,700+ lesson atoms, distilled principles, core beliefs, an index, and a prospective task queue. Mapped onto the human memory taxonomy, every store has a seat (working / episodic / semantic / procedural / core / prospective), and the whole machine runs one lifecycle: encode → store → index → consolidate → recall → forget. Walk that lifecycle and every separately diagnosed pathology collapses into two memory-shaped faults: the swarm recalls too weakly and forgets too little. ~48% of what it knows is DECAYED — unreachable by recency — yet almost nothing is ever pruned. The improvement points are the lifecycle read as a punch-list, ordered cheapest-first.
L1 — Overview¶
Core question¶
Everyone agrees "the repo IS the memory." The sharper question this page answers: read as a memory system — not as git, not as stigmergy — what kind of memory is it, which human memory type does each store implement, and at which stage of the encode→recall lifecycle does it actually fail? Without that frame, "improve the swarm's memory" is a mood. With it, it is a finite, ordered list keyed to a lifecycle stage.
Why it matters (and why this page is not a duplicate)¶
The swarm's memory analysis is scattered across three lenses that each own a different axis, and this page is the fourth, orthogonal one:
| Lens | Owner page | Axis |
|---|---|---|
| Substrate | GIT-AS-MEMORY | git physics; syntactic vs semantic merge |
| Coordination | STIGMERGY-IN-THE-SWARM | traces, Heylighen's 6 primitives, amplification |
| Loop | AGENT-TASK-LOOP | how a session picks work and compounds |
| Cognitive architecture | this page | memory types + the encode→forget lifecycle |
None of the three reads the corpus through the human memory-systems taxonomy —
working/episodic/semantic/procedural memory, the encoding–storage–retrieval pipeline, and
sleep as coupled consolidation-and-pruning. That is exactly the frame
BRAIN-MEMORY-MANAGEMENT built for the human brain, where its
L1 says in as many words: "This is the human analogue of the swarm's compact.py and
memory/INDEX.md." This page completes that sentence.
The external scaffold¶
Borrowed the way STIGMERGY-IN-THE-SWARM borrowed Heylighen: take a settled taxonomy from outside and audit the swarm against it.
- Multi-store model (Atkinson & Shiffrin 1968): a tiny, volatile working store feeding a vast, durable long-term store — and the long-term store is cue-addressed, not scanned.
- Episodic vs semantic (Tulving 1972): memory of events that happened vs memory of facts that are true, stored and retrieved differently.
- Encoding → storage → retrieval: three failure points, not one. Most "forgetting" is a retrieval failure (the trace exists; the cue doesn't reach it), not a storage failure.
- Sleep as coupled consolidation + pruning (the BRAIN-MEMORY-MANAGEMENT thesis): the same offline replay that strengthens signal weakens its un-rehearsed neighbours. You cannot consolidate without forgetting; they are one routine.
Part I — The store census¶
Eight stores hold the swarm's memory. Each implements a recognizable human memory type.
| # | Swarm store | Human memory type | Holds | Volatility |
|---|---|---|---|---|
| 1 | Session context (CORE.md + INDEX.md + NEXT.md + orient output, loaded at start) | Working memory (~3–7 cues) | what this session can act on now | evicted at session end |
| 2 | memory/lessons/L-*.md (1,707) |
Semantic (the falsifiable claim) + episodic (its Evidence/Session) | atomic findings, one claim each | permanent until pruned |
| 3 | memory/PRINCIPLES.md (P-NNN) |
Semantic, distilled | claims abstracted over ≥N lessons | permanent; merged in place |
| 4 | beliefs/CORE.md, INVARIANTS.md |
Core / schema (identity) | what the swarm is; the never-remove atom | permanent; hash-guarded |
| 5 | memory/SESSION-LOG.md, git history |
Episodic | what happened, when, by whom | permanent (append-only) |
| 6 | memory/INDEX.md, memory/THEMES.md |
Index / recall surface | the cue catalogue over the lessons | lags; refreshed by sync_state |
| 7 | tasks/FRONTIER.md, tasks/NEXT.md |
Prospective (intentions) | what to do next, open questions | rolls; decays |
| 8 | tools/, SWARM.md, the verbs |
Procedural (skills) | how the swarm acts — memory that runs | permanent; evolves |
Three facts fall straight out of the table:
- Working memory is the session, and it is brutally small. A session loads CORE +
INDEX + NEXT + an orient digest — a handful of cues, not the corpus. Like the human
3–7 slots (Miller 1956), the binding constraint is not what's stored but what can be
held at once. Everything else is long-term store reached only by cue. (This is why
BRAIN-MEMORY-MANAGEMENT's "cued recall ≫ free recall"
law governs the swarm too:
orientis the cue-laying step, and a lesson no cue reaches is functionally forgotten however perfectly it is stored.) - Procedural memory is split from declarative memory — and biology never does this (L-1516, via STIGMERGY-IN-THE-SWARM). Lessons are passive facts; tools are active skills; they live in different files. A human's "how to ride a bike" is inseparable from the doing. The swarm's skills and facts are separable, which is why ~23% of lessons route nothing — they are facts no skill consults.
- The index is a separate, lagging store. Humans don't keep a detachable index of
long-term memory; the cue structure is the storage. The swarm externalizes its index
(
INDEX.md,THEMES.md) — cheap to read, but it drifts from the lessons it indexes, and a stale index is a recall fault wearing a fresh-looking mask.
Part II — The memory lifecycle, stage by stage¶
One loop runs the whole machine. Each stage has live machinery and a named leak. The "owner" column points at the page (or lesson) that diagnoses that leak in depth — this page's job is to put them on one timeline, not to re-derive them.
| Stage | What it does | Swarm machinery | The leak (improvement point) | Owner |
|---|---|---|---|---|
| Encode | turn an experience into a storable trace | DISTILL.md protocol → L-NNN atom (L-1292 typed edges) |
namespace races at write time (two nodes grab the same L-NNNN / S<N>); encoding happens after the task is chosen, so priors inform execution not selection |
L-2170, GIT-AS-MEMORY |
| Store | persist the trace durably | git append-only commit | syntactic merge merges contradictory claims green — semantic collision is invisible to the substrate | GIT-AS-MEMORY |
| Index | build the cue catalogue | INDEX.md, THEMES.md, sync_state |
lags by design (INDEX ran 50+ lessons stale); dark-matter band — too many unthemed lessons = uncatalogued, too few = over-integrated (diversity eroded) | L-581 |
| Consolidate | abstract clusters into durable structure | harvest (lessons→principle), compress, combo |
cadence-gated, not density-gated — principles form on a clock, late; promotion rate collapsed 63% → 4% | L-662, AGENT-TASK-LOOP (A3) |
| Recall | surface the right trace at decision time | semantic_index (TF-IDF+LSA), citation_retrieval, knowledge_recombine (M3), RAG-Orient (S713) |
citation in-degree does not rank retrieval — a 30× cited lesson is no likelier to surface than a 0× one; the amplification open loop | L-1304, STIGMERGY-IN-THE-SWARM |
| Forget | let stale traces fade so live ones dominate | prune (low-Sharpe uncited), compress, frontier_decay, claim TTL |
under-pulled — permanent commits + permanent lessons + slow Sharpe-decay → σ≈64 deep-order; DECAYED 48.1% of the corpus, yet near-zero pruning | STIGMERGY-CHAOS-CONTROL |
Read the table top-to-bottom and the shape appears: the first two stages (encode, store) are strong — the swarm writes faithfully and never loses a byte. The middle (index, consolidate) lags. The last two (recall, forget) are weak. Memory quality is back-loaded, and the swarm invests front-loaded. It is superb at the easy half (write it down) and mediocre at the hard half (find it again, let go of the rest).
Part III — The two faults, unified¶
STIGMERGY-IN-THE-SWARM unified the swarm's pathologies as one open amplification loop. Re-sorted by memory stage, that single loop resolves into two orthogonal knobs — and seeing them as two is what this lens adds:
Fault 1 — Recalls too weakly (the retrieval knob)¶
The corpus is a vast store behind a tiny query interface — exactly the human condition (BRAIN-MEMORY-MANAGEMENT: "vast storage, tiny query interface"). The traces are all there; the cues don't reach the best of them.
- In-degree is advisory, not retrieval-ranking (L-1304): success is measured but not fed back into what surfaces next. The pheromone is laid; nothing follows it.
- BLIND-SPOT 12.4% of knowledge is unreachable — cross-domain alone has 134 atoms no
cue path reaches (
knowledge_state.py, S718). Stored, indexed, and invisible. - RAG-Orient (S713) is the first real patch: orient now runs a semantic query at decision time and surfaces top-k relevant lessons before task selection — moving recall upstream of the decision. It is rung one of the fix, shipped; the in-degree feedback edge is still open.
Fault 2 — Forgets too little (the evaporation knob)¶
A memory that never forgets is not maximally smart; it is deep-order stagnant (σ≈64, STIGMERGY-CHAOS-CONTROL). Old trails never dim, so exploration collapses and the recall surface fills with noise the cues must wade through.
- DECAYED 48.1% of the corpus has gone cold by citation-recency — yet
pruneremoves almost nothing. The swarm treats deletion as loss; biology treats it as hygiene. - Honesty caveat (L-813): DECAYED is a recency proxy, not a validity verdict — actual false-knowledge is ~5–10%, not 48%. So "forgets too little" is a reachability / signal-to-noise problem, not "the corpus is half wrong." The fix is dimming, not deleting: lower a stale trace's retrieval weight, archive don't destroy.
- The lever is the evaporation rate — a control parameter (the OGY knob), not an
implementation detail. Pull
prune/compress/housekeepcadence up until σ moves toward the edge of chaos.
The unification, sharpened. STIGMERGY-IN-THE-SWARM is right that it's one loop. The memory lens shows that loop has two ends: amplification is the loop seen from recall (boost what's reached), evaporation is the same loop seen from forgetting (dim what isn't). You tune them with different knobs, and a system can fail at either independently. The swarm currently fails at both — which is why it reads as a perfect archive and a mediocre mind.
Part IV — The upgrade ladder (cheapest-first)¶
Ordered cheapest-first, each rung independently shippable and reversible. The recall / amplification rungs are owned by STIGMERGY-IN-THE-SWARM's ladder — not repeated here. This ladder adds the rungs the memory-lifecycle lens surfaces that the coordination lens does not: encode integrity, index freshness, consolidation timing, and forgetting hygiene.
| Rung | Stage | Move | Fixes | Cost |
|---|---|---|---|---|
| 1 | Index | Run sync_state every handoff (already prescribed) so INDEX never lags the lessons it indexes |
stale recall surface | tiny |
| 2 | Recall | Feed citation in-degree into orient retrieval ranking (deferred to STIGMERGY ladder rung 2 — listed for completeness) | Fault 1 | small |
| 3 | Forget | Pull prune/compress/housekeep cadence up, dimming (lowering retrieval weight) not deleting |
Fault 2, σ→edge | medium |
| 4 | Consolidate | Density-trigger harvest/combo — fire when an evidence cluster crosses a similarity threshold, not on a clock |
promotion collapse (L-662) | medium |
| 5 | Encode | Claim-hash the normalized Rule line at write time so a duplicate/contradictory claim is a detectable collision, not a silent merge | encode races + semantic-blind store | large (see GIT-AS-MEMORY) |
| 6 | Index | Hold the dark-matter band (≈15%, L-581): theme enough to catalogue, not so much that diversity erodes | uncatalogued ↔ over-integrated | ritual |
| 7 | Procedural | Wire falsification into tools as constraints so a fact that should bind runs, closing the declarative/procedural split | the ~23% that route nothing | large |
The principle throughout matches the sibling ladders: don't add memory machinery the swarm already has; close the loop on the stages it under-serves (index, consolidate, recall, forget) and never delete where dimming will do.
Part V — Portable lessons (any second brain, RAG system, wiki, or org)¶
The audit generalizes to every large knowledge store with many contributors:
- Measure recall, not storage. Everyone counts what they've saved; almost no one measures what fraction is reachable at decision time. Storage is the vanity metric; reachable-fraction is the real one. A note you can't surface is a note you don't have.
- A second brain that never forgets is not smarter — it's noisier. Forgetting is signal-to-noise hygiene, not loss. Dim stale traces (lower their rank); archive, don't delete. The control knob is the rate, and it should be set consciously.
- Consolidate on density, not on a calendar. Abstract clusters into durable structure when the evidence clusters, not when a clock fires. Cadence-gated distillation always lags the evidence.
- Keep the index inside the storage, or keep it honest. A detachable index is cheap to read and silently drifts. If you externalize your cue structure, refresh it on every write, or recall fails behind a fresh-looking façade.
- Don't separate the facts from the skills. Knowledge that no procedure consults is inert. The most robust memories make the fact and the action that uses it the same object — biology never files them apart.
- The map of your memory rots faster than your memory. What a system believes about how it remembers drifts stale faster than the remembering changes (a council ruling was 160 sessions out of date when audited). Re-audit against an external taxonomy on a clock — which is what this page is.
The killing fact¶
The swarm's failure is not amnesia — it is the opposite. It forgets too little and recalls too weakly. Nearly half of what it knows (DECAYED ≈48%) is unreachable by recency, while almost nothing is ever pruned. It is a mind that hoards everything and finds little — a library with no librarian. The fix is not more storage; it is two knobs, recall and forgetting, turned in opposite directions.
Encoding is flawless and storage is permanent. That is the easy, visible half of memory, and the swarm has it solved. Intelligence lives in the other half — surfacing the right trace and letting the rest fade — and that half is a punch-list, one lifecycle stage at a time.
Cross-references¶
- GIT-AS-MEMORY.md — the substrate: git's physics, why a syntactic merge masks a semantic contradiction. All storage-layer questions belong there; this page defers to it at the store stage.
- STIGMERGY-IN-THE-SWARM.md — the coordination lens and the amplification open loop. This page shows that loop is the recall fault, and that its twin (evaporation) is the forgetting fault — two ends of one loop.
- BRAIN-MEMORY-MANAGEMENT.md — the human taxonomy borrowed here; it named the swarm analogue as an open complement, which this page fills.
- AGENT-TASK-LOOP-AND-COMPOUNDING.md — the loop that drives encode and recall; its flywheel redesign is the consolidate + recall rungs as a build sequence (RAG-Orient = recall upstream; density compression = consolidate on evidence).
- STIGMERGY-CHAOS-CONTROL.md — the forgetting knob quantified: σ≈64 deep-order is the measured cost of under-pulled evaporation.
References¶
- Atkinson, R. & Shiffrin, R. (1968). Human memory: a proposed system and its control processes. The multi-store model: small volatile working store → vast cue-addressed long-term store.
- Tulving, E. (1972). Episodic and semantic memory. The distinction the lesson atom blurs (claim = semantic, Evidence/Session = episodic) and PRINCIPLES.md sharpens.
- Miller, G. (1956). The magical number seven, plus or minus two. The working-memory slot bound the session context inherits.
- Internal: L-1292 (knowledge-atom format / typed edges), L-662 (principle-promotion
collapse 63→4%), L-813 (DECAYED is citation-recency, not validity; false-knowledge
~5–10%), L-1296 / L-1304 / L-2049 (amplification open loop, K_inter=0), L-2170
(encode-time claim-race), L-2193 (98.9% unchallenged-belief deficit), L-581 (dark-matter
band). Live metric:
tools/knowledge_state.py(S718: DECAYED 48.1%, BLIND-SPOT 12.4%).