{
 "paper": "instant-recall",
 "a": "7.0",
 "b": "7.1",
 "summary": "From v7.0 (1 Apr) to v7.1 (2 Jun): 4,889 words to 6,494 words, 2,344 words in new or rewritten paragraphs and 739 taken out, 107 paragraphs changed.",
 "note": {
  "title": "Explained through the human brain; three new ranking signals",
  "kind": "revision",
  "body": "## Summary\n\nThe opening now starts from the human hippocampus and the patient H.M., who kept his old memories but could no longer form new ones, and everyday comparisons run through the text. The improvement notes asked for both, and for each companion paper to be summarised in place where it is mentioned.\n\n- New section on where the index sits: a storage layer below it, a nightly reflection layer above it.\n- The index is said to work over any store that gives text, a time and a source.\n- New: three ranking signals beyond similarity. A fact carries the dates it was true; code carries how well it was checked; related pieces keep links to each other.\n- New: parameters tuned by the nightly reflection, and a retry when every match is weak.\n- The file-by-file implementation listing is replaced by a short status section and a reproducibility note.",
  "source": "change note"
 },
 "paragraphs_changed": 107,
 "changes": [
  {
   "section": "Instant Recall: A Pre-Computed Concept Index for O(1) Memory Retrieval in Persistent AI Agents",
   "old": "**Oscar Serra¹** ¹Independent Research _Version 7.0 — March 2026_",
   "new": "**Oscar Serra¹** ¹Independent Research _Version 7.1 — June 2026_",
   "marked": "**Oscar Serra¹** ¹Independent Research _Version [-7.0-] {+7.1+} — [-March-] {+June+} 2026_"
  },
  {
   "section": "Abstract",
   "old": "Persistent AI agents accumulate months of interaction history yet routinely fail to retrieve knowledge they demonstrably own. We formalize this as **Contextual Ownership Retrieval Failure (CORF)**, identify four failure modes from eighteen months of deployment logs, and introduce **Instant Recall** — a pre-computed concept-to-memory index that resolves retrieval _before the model processes the prompt_. By mapping anchor vocabulary terms to pre-ranked memory clusters offline, Instant Recall achieves 0.85 CORF-Recall@20 at 54ms p95 latency — a 5.9× speedup over MemGPT-style sequential retrieval (0.79 at 320ms) — with a false positive rate of 0.18 and zero inference-time search computation. A probabilistic source-coverage analysis establishes that parallel source aggregation, not query quality, is the binding constraint on retrieval completeness. Concept anchoring closes the 9-point recall gap that remains after source coverage is saturated.",
   "new": "Persistent AI agents accumulate months of interaction history yet routinely fail to retrieve knowledge they demonstrably own. We formalize this as **Contextual Ownership Retrieval Failure (CORF)**, identify four failure modes from eighteen months of deployment logs, and introduce **Instant Recall** — a pre-computed concept-to-memory index that resolves retrieval _before the model processes the prompt_. By mapping anchor vocabulary terms to pre-ranked memory clusters offline, Instant Recall achieves 0.85 CORF-Recall@20 at 54ms p95 latency — a 5.9× speedup over MemGPT-style sequential retrieval (0.79 at 320ms) — with a false positive rate of 0.18 and zero inference-time search computation. A probabilistic source-coverage analysis establishes that parallel source aggregation, not query quality, is the binding constraint on retrieval completeness. Concept anchoring closes the 9-point recall gap that remains after source coverage is saturated. Beyond similarity, the index carries three additional retrieval signals — validity over time, code-trust, and inter-chunk links — so that the highest-cosine chunk is not automatically the one returned.",
   "marked": "Persistent AI agents accumulate months of interaction history yet routinely fail to retrieve knowledge they demonstrably own. We formalize this as **Contextual Ownership Retrieval Failure (CORF)**, identify four failure modes from eighteen months of deployment logs, and introduce **Instant Recall** — a pre-computed concept-to-memory index that resolves retrieval _before the model processes the prompt_. By mapping anchor vocabulary terms to pre-ranked memory clusters offline, Instant Recall achieves 0.85 CORF-Recall@20 at 54ms p95 latency — a 5.9× speedup over MemGPT-style sequential retrieval (0.79 at 320ms) — with a false positive rate of 0.18 and zero inference-time search computation. A probabilistic source-coverage analysis establishes that parallel source aggregation, not query quality, is the binding constraint on retrieval completeness. Concept anchoring closes the 9-point recall gap that remains after source coverage is [-saturated.-] {+saturated. Beyond similarity, the index carries three additional retrieval signals — validity over time, code-trust, and inter-chunk links — so that the highest-cosine chunk is not automatically the one returned.+}"
  },
  {
   "section": "Abstract",
   "old": "**Keywords:** AI agent memory, episodic retrieval, cognitive architectures, RAG, hippocampal indexing, context management, Sleep Consolidation, CORF",
   "new": "**Keywords:** AI agent memory, episodic retrieval, cognitive architectures, RAG, hippocampal indexing, context management, sleep consolidation, CORF",
   "marked": "**Keywords:** AI agent memory, episodic retrieval, cognitive architectures, RAG, hippocampal indexing, context management, [-Sleep Consolidation,-] {+sleep consolidation,+} CORF"
  },
  {
   "section": "1. Introduction",
   "old": "We call this **Contextual Ownership Retrieval Failure (CORF)** and argue it is endemic to current agent memory architectures.",
   "new": "We call this **Contextual Ownership Retrieval Failure (CORF)** and argue it is endemic to current agent memory architectures. CORF is the digital version of a familiar frustration: you know you own a particular book, but you cannot find it on your shelves. The book exists; the index just cannot locate it.",
   "marked": "We call this **Contextual Ownership Retrieval Failure (CORF)** and argue it is endemic to current agent memory [-architectures.-] {+architectures. CORF is the digital version of a familiar frustration: you know you own a particular book, but you cannot find it on your shelves. The book exists; the index just cannot locate it.+}"
  },
  {
   "section": "1. Introduction",
   "old": "The solution — **Instant Recall** — draws on a structural analogy from neuroscience. The biological hippocampus does not store long-term memories; it indexes them [Teyler & DiScenna, 1986]. Instant Recall implements this separation of indexing from storage computationally: a pre-computed concept index, built offline during a Sleep Consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding space. The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place.",
   "new": "The solution takes its name and its shape from the brain. The human hippocampus is not where memories are stored — long-term memories live distributed across the neocortex. The hippocampus is the brain's *indexing organ*: it knows where every memory lives and how to retrieve it. The clinical evidence is stark. Patient H.M., who had both hippocampi removed to treat epilepsy, retained his old memories intact but could no longer form or retrieve new ones — the store was fine; the index was gone [Scoville & Milner, 1957]. **Instant Recall is our attempt to build the AI equivalent of this biological indexing organ — the layer that makes the difference between *having* memories and being *able to use them*.** It draws the same structural separation: a pre-computed concept index, built offline during a Sleep Consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding space [Teyler & DiScenna, 1986]. The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place.",
   "marked": "The solution {+takes its name and its shape from the brain. The human hippocampus is not where memories are stored+} — {+long-term memories live distributed across the neocortex. The hippocampus is the brain's *indexing organ*: it knows where every memory lives and how to retrieve it. The clinical evidence is stark. Patient H.M., who had both hippocampi removed to treat epilepsy, retained his old memories intact but could no longer form or retrieve new ones — the store was fine; the index was gone [Scoville & Milner, 1957].+} **Instant [-Recall**-] {+Recall is our attempt to build the AI equivalent of this biological indexing organ+} — {+the layer that makes the difference between *having* memories and being *able to use them*.** It+} draws [-on a-] {+the same+} structural [-analogy from neuroscience. The biological hippocampus does not store long-term memories; it indexes them [Teyler & DiScenna, 1986]. Instant Recall implements this separation of indexing from storage computationally:-] {+separation:+} a pre-computed concept index, built offline during a Sleep Consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding [-space.-] {+space [Teyler & DiScenna, 1986].+} The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place."
  },
  {
   "section": "1. Introduction",
   "old": null,
   "new": "The anchor index behaves like the index at the back of a book. Look up \"photosynthesis\" and it tells you pages 42, 87, and 156. The index is tiny compared to the book, but without it you would have to read every page to find what you need. Instant Recall builds that index once, offline, so that every query is a lookup rather than a full-text scan.",
   "marked": "{+The anchor index behaves like the index at the back of a book. Look up \"photosynthesis\" and it tells you pages 42, 87, and 156. The index is tiny compared to the book, but without it you would have to read every page to find what you need. Instant Recall builds that index once, offline, so that every query is a lookup rather than a full-text scan.+}"
  },
  {
   "section": "1. Introduction",
   "old": "Instant Recall is the second layer in a three-tier cognitive architecture stack: **Total Recall** (storage and compaction; Serra, 2026a) → **Instant Recall** (concept index) → **Identity Persistence** (agent identity; Serra, 2026b). Identity Persistence's Tier 3 retrieval slots are supplied by Instant Recall lookups. Humor Embeddings (Serra, 2026d) relies on Instant Recall anchor clusters to load humor-relevant episodic context during bridge discovery. Round Table (Serra, 2026e) coordinates nightly rebuild scheduling across modules.",
   "new": null,
   "marked": "[-Instant Recall is the second layer in a three-tier cognitive architecture stack: **Total Recall** (storage and compaction; Serra, 2026a) → **Instant Recall** (concept index) → **Identity Persistence** (agent identity; Serra, 2026b). Identity Persistence's Tier 3 retrieval slots are supplied by Instant Recall lookups. Humor Embeddings (Serra, 2026d) relies on Instant Recall anchor clusters to load humor-relevant episodic context during bridge discovery. Round Table (Serra, 2026e) coordinates nightly rebuild scheduling across modules.-]"
  },
  {
   "section": "1.1 The Three-Layer Memory System",
   "old": null,
   "new": "### 1.1 The Three-Layer Memory System",
   "marked": "{+### 1.1 The Three-Layer Memory System+}"
  },
  {
   "section": "1.1 The Three-Layer Memory System",
   "old": null,
   "new": "Instant Recall is one layer of a three-paper memory system. Each layer is independently useful; together they compound.",
   "marked": "{+Instant Recall is one layer of a three-paper memory system. Each layer is independently useful; together they compound.+}"
  },
  {
   "section": "1.1 The Three-Layer Memory System",
   "old": null,
   "new": "- **Storage layer (Total Recall; Serra, 2026a).** Persists every interaction as a typed, timestamped event and compacts older events into lightweight pointers — summaries that preserve the essential content while reducing storage by 80–95%. It stores without loss of meaning. - **Retrieval layer (Instant Recall; this paper).** Indexes those pointers and full events alike, making the compaction transparent to retrieval, and surfaces the right chunk in O(1) at inference time. - **Reflection layer (Sleep Consolidation; Serra, 2026e).** A nightly cycle reviews which retrievals succeeded and which failed, then adjusts the index parameters — anchor term selection, importance weights, chunk boundaries — based on observed patterns. The retrieval layer gets better without any code change.",
   "marked": "{+- **Storage layer (Total Recall; Serra, 2026a).** Persists every interaction as a typed, timestamped event and compacts older events into lightweight pointers — summaries that preserve the essential content while reducing storage by 80–95%. It stores without loss of meaning. - **Retrieval layer (Instant Recall; this paper).** Indexes those pointers and full events alike, making the compaction transparent to retrieval, and surfaces the right chunk in O(1) at inference time. - **Reflection layer (Sleep Consolidation; Serra, 2026e).** A nightly cycle reviews which retrievals succeeded and which failed, then adjusts the index parameters — anchor term selection, importance weights, chunk boundaries — based on observed patterns. The retrieval layer gets better without any code change.+}"
  },
  {
   "section": "1.1 The Three-Layer Memory System",
   "old": null,
   "new": "In one line: the storage layer stores without losing, the retrieval layer recalls in constant time, and the reflection layer refines both. The rest of this paper concerns the middle layer.",
   "marked": "{+In one line: the storage layer stores without losing, the retrieval layer recalls in constant time, and the reflection layer refines both. The rest of this paper concerns the middle layer.+}"
  },
  {
   "section": "1.1 The Three-Layer Memory System",
   "old": "1. **Formal CORF definition and taxonomy** — four failure modes with empirical frequency estimates and a source-coverage upper bound separating _coverage_ error from _ranking_ error. 2. **Instant Recall architecture** — including real-time incremental index updating as a first-class component. 3. **Importance scoring** — weighted retrieval prioritizing decisions, entities, and user-engaged content. 4. **Deduplication via similarity check** — prevents index bloat from recurring logs. 5. **Post-retrieval re-ranking** — reduces false positive injection. 6. **Design space analysis** — comparison against inverted index, all-sources ANN, multi-source RAG, knowledge graph, and vector database alternatives. 7. **Evaluation protocol + artifacts** — metrics, baselines, ablations, and an annotated CORF dataset from deployment logs.",
   "new": "1. **Formal CORF definition and taxonomy** — four failure modes with empirical frequency estimates and a source-coverage upper bound separating _coverage_ error from _ranking_ error. 2. **Instant Recall architecture** — including real-time incremental index updating as a first-class component. 3. **Importance scoring** — weighted retrieval prioritizing decisions, entities, and user-engaged content. 4. **Deduplication via similarity check** — prevents index bloat from recurring logs. 5. **Post-retrieval re-ranking** — reduces false positive injection. 6. **Beyond-cosine retrieval signals** — bi-temporal validity, code-trust, and durable inter-chunk links, so ranking weights more than embedding distance (§4.9). 7. **Design space analysis** — comparison against inverted index, all-sources ANN, multi-source RAG, knowledge graph, and vector database alternatives. 8. **Evaluation protocol + artifacts** — metrics, baselines, ablations, and an annotated CORF dataset from deployment logs.",
   "marked": "1. **Formal CORF definition and taxonomy** — four failure modes with empirical frequency estimates and a source-coverage upper bound separating _coverage_ error from _ranking_ error. 2. **Instant Recall architecture** — including real-time incremental index updating as a first-class component. 3. **Importance scoring** — weighted retrieval prioritizing decisions, entities, and user-engaged content. 4. **Deduplication via similarity check** — prevents index bloat from recurring logs. 5. **Post-retrieval re-ranking** — reduces false positive injection. 6. {+**Beyond-cosine retrieval signals** — bi-temporal validity, code-trust, and durable inter-chunk links, so ranking weights more than embedding distance (§4.9). 7.+} **Design space analysis** — comparison against inverted index, all-sources ANN, multi-source RAG, knowledge graph, and vector database alternatives. [-7.-] {+8.+} **Evaluation protocol + artifacts** — metrics, baselines, ablations, and an annotated CORF dataset from deployment logs."
  },
  {
   "section": "2.1 Persistent Agent Memory Systems",
   "old": "Recent work has expanded the landscape. A-MEM [Xu et al., 2025] introduces agentic memory where the agent manages its own retrieval strategies. Memory-R1 [Yan et al., 2025] applies reinforcement learning to memory management policies. LongMemEval [Wu et al., 2024] benchmarks long-term interactive memory. MemGPT [Packer et al., 2023] introduced virtual context management inspired by OS paging. Mem0 [MemoryOS, 2024] builds a multi-level memory architecture. RAPTOR [Sarthi et al., 2024] addresses multi-hop retrieval via recursive tree summarization.",
   "new": "Recent work has expanded the field. A-MEM [Xu et al., 2025] introduces agentic memory where the agent manages its own retrieval strategies. Memory-R1 [Yan et al., 2025] applies reinforcement learning to memory management policies. LongMemEval [Wu et al., 2024] benchmarks long-term interactive memory. MemGPT [Packer et al., 2023] introduced virtual context management inspired by OS paging. Mem0 [MemoryOS, 2024] builds a multi-level memory architecture. RAPTOR [Sarthi et al., 2024] addresses multi-hop retrieval via recursive tree summarization.",
   "marked": "Recent work has expanded the [-landscape.-] {+field.+} A-MEM [Xu et al., 2025] introduces agentic memory where the agent manages its own retrieval strategies. Memory-R1 [Yan et al., 2025] applies reinforcement learning to memory management policies. LongMemEval [Wu et al., 2024] benchmarks long-term interactive memory. MemGPT [Packer et al., 2023] introduced virtual context management inspired by OS paging. Mem0 [MemoryOS, 2024] builds a multi-level memory architecture. RAPTOR [Sarthi et al., 2024] addresses multi-hop retrieval via recursive tree summarization."
  },
  {
   "section": "2.2 The Total Recall and Identity Persistence Architectures",
   "old": "### 2.2 The Total Recall and Identity Persistence Architectures",
   "new": null,
   "marked": "[-### 2.2 The Total Recall and Identity Persistence Architectures-]"
  },
  {
   "section": "2.2 The Storage and Reflection Layers",
   "old": null,
   "new": "### 2.2 The Storage and Reflection Layers",
   "marked": "{+### 2.2 The Storage and Reflection Layers+}"
  },
  {
   "section": "2.2 The Storage and Reflection Layers",
   "old": "Total Recall [Serra, 2026a] defines persistent agent memory as a compaction-based cache eviction system. Raw events are stored in an event log; a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content. Total Recall provides the storage substrate on which Instant Recall operates: `runHippocampusRebuild()` (§8a) consumes Total Recall event files as its primary input.",
   "new": "The storage layer [Serra, 2026a] defines persistent agent memory as a compaction-based cache eviction system. Raw events are stored in an event log; a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content. It provides the substrate Instant Recall operates on: the nightly rebuild consumes the storage layer's event files as its primary input.",
   "marked": "[-Total Recall-] {+The storage layer+} [Serra, 2026a] defines persistent agent memory as a compaction-based cache eviction system. Raw events are stored in an event log; a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content. [-Total Recall-] {+It+} provides the [-storage-] substrate [-on which-] Instant Recall [-operates: `runHippocampusRebuild()` (§8a)-] {+operates on: the nightly rebuild+} consumes [-Total Recall-] {+the storage layer's+} event files as its primary input."
  },
  {
   "section": "2.2 The Storage and Reflection Layers",
   "old": "Identity Persistence [Serra, 2026b] addresses agent identity drift across session boundaries via a PersonaState structure injected into every session's system prompt. Identity Persistence assumes relevant memories can be retrieved; Instant Recall makes this assumption true — supplying Tier 3 context chunks at every prompt, before the model begins processing.",
   "new": "The identity layer [Serra, 2026b] addresses agent identity drift across session boundaries via a persona-state structure injected into every session's system prompt. It assumes relevant memories can be retrieved; Instant Recall makes that assumption true — supplying context chunks at every prompt, before the model begins processing.",
   "marked": "[-Identity Persistence-] {+The identity layer+} [Serra, 2026b] addresses agent identity drift across session boundaries via a [-PersonaState-] {+persona-state+} structure injected into every session's system prompt. [-Identity Persistence-] {+It+} assumes relevant memories can be retrieved; Instant Recall makes [-this-] {+that+} assumption true — supplying [-Tier 3-] context chunks at every prompt, before the model begins processing."
  },
  {
   "section": "2.2 The Storage and Reflection Layers",
   "old": null,
   "new": "The reflection layer [Serra, 2026e] runs a nightly cycle that audits retrieval outcomes and tunes Instant Recall's parameters (§4.10). This is the orchestration boundary: Instant Recall builds and serves the index; the reflection layer decides *how* it should be built next time.",
   "marked": "{+The reflection layer [Serra, 2026e] runs a nightly cycle that audits retrieval outcomes and tunes Instant Recall's parameters (§4.10). This is the orchestration boundary: Instant Recall builds and serves the index; the reflection layer decides *how* it should be built next time.+}"
  },
  {
   "section": "2.3 Neuroscience Basis",
   "old": "The biological hippocampus is a medial temporal lobe structure critical for episodic memory formation and retrieval. Lesion studies establish that it does not store long-term memories — those are distributed across neocortical areas — but encodes _indices_ [Teyler & DiScenna, 1986; Squire, 1992].",
   "new": "The biological hippocampus is a medial temporal lobe structure critical for episodic memory formation and retrieval. Lesion studies establish that it does not store long-term memories — those are distributed across neocortical areas — but encodes _indices_ [Teyler & DiScenna, 1986; Squire, 1992]. Patient H.M.'s preserved-store-but-lost-index profile [Scoville & Milner, 1957] is the clinical anchor for the architecture: damage the index, not the store, and you lose access without losing data — precisely CORF.",
   "marked": "The biological hippocampus is a medial temporal lobe structure critical for episodic memory formation and retrieval. Lesion studies establish that it does not store long-term memories — those are distributed across neocortical areas — but encodes _indices_ [Teyler & DiScenna, 1986; Squire, [-1992].-] {+1992]. Patient H.M.'s preserved-store-but-lost-index profile [Scoville & Milner, 1957] is the clinical anchor for the architecture: damage the index, not the store, and you lose access without losing data — precisely CORF.+}"
  },
  {
   "section": "2.3 Neuroscience Basis",
   "old": "During sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage sites. This offline consolidation is what our Sleep Consolidation phase implements.",
   "new": "During sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage sites [Wilson & McNaughton, 1994]. This offline consolidation is what our Sleep Consolidation phase implements.",
   "marked": "During sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage [-sites.-] {+sites [Wilson & McNaughton, 1994].+} This offline consolidation is what our Sleep Consolidation phase implements."
  },
  {
   "section": "4.2 What Instant Recall Indexes",
   "old": null,
   "new": "### 4.2 What Instant Recall Indexes",
   "marked": "{+### 4.2 What Instant Recall Indexes+}"
  },
  {
   "section": "4.2 What Instant Recall Indexes",
   "old": null,
   "new": "Instant Recall does not require the storage layer described in §2.2; it requires only that a memory store expose, per chunk, three things: a content string, a timestamp, and a source label. Any store satisfying that contract — an event log, a flat directory of Markdown files, an email archive — can be indexed. The architecture is store-agnostic by design.",
   "marked": "{+Instant Recall does not require the storage layer described in §2.2; it requires only that a memory store expose, per chunk, three things: a content string, a timestamp, and a source label. Any store satisfying that contract — an event log, a flat directory of Markdown files, an email archive — can be indexed. The architecture is store-agnostic by design.+}"
  },
  {
   "section": "4.2 What Instant Recall Indexes",
   "old": null,
   "new": "Two stores are concrete in the reference deployment. The default is a single-writer relational store keyed by chunk; an optional columnar vector store implements the same interface for large-corpus experiments. Because both implement one storage contract, any schema addition (§4.9) is applied to both or explicitly scoped to the relational path. The point for this paper is that Instant Recall sits *above* the store and treats it as a source of `(content, timestamp, source)` triples — it inherits the storage layer's loss-free compaction for free, but does not depend on it.",
   "marked": "{+Two stores are concrete in the reference deployment. The default is a single-writer relational store keyed by chunk; an optional columnar vector store implements the same interface for large-corpus experiments. Because both implement one storage contract, any schema addition (§4.9) is applied to both or explicitly scoped to the relational path. The point for this paper is that Instant Recall sits *above* the store and treats it as a source of `(content, timestamp, source)` triples — it inherits the storage layer's loss-free compaction for free, but does not depend on it.+}"
  },
  {
   "section": "4.3 Anchor Vocabulary",
   "old": "### 4.2 Anchor Vocabulary",
   "new": "### 4.3 Anchor Vocabulary",
   "marked": "### [-4.2-] {+4.3+} Anchor Vocabulary"
  },
  {
   "section": "4.4 Concept Embedding and KNN Clustering",
   "old": "### 4.3 Concept Embedding and KNN Clustering",
   "new": "### 4.4 Concept Embedding and KNN Clustering",
   "marked": "### [-4.3-] {+4.4+} Concept Embedding and KNN Clustering"
  },
  {
   "section": "4.5 Pre-Computed Index Structure",
   "old": "### 4.4 Pre-Computed Index Structure",
   "new": "### 4.5 Pre-Computed Index Structure",
   "marked": "### [-4.4-] {+4.5+} Pre-Computed Index Structure"
  },
  {
   "section": "4.5 Pre-Computed Index Structure",
   "old": "```json { \"version\": \"1.3\", \"built_at\": \"2026-02-19T03:00:00Z\", \"model\": \"text-embedding-3-small\", \"anchor_count\": 287, \"entries\": { \"paper\": { \"chunks\": [ \"memory/projects/engram/engram-v3.md#chunk-4\", \"archive/chatgpt-import/2025-07-laser-paper.md#chunk-1\" ], \"scores\": [0.94, 0.91], \"sources\": [\"memory/\", \"archive/\"] } } } ```",
   "new": "```json { \"version\": \"1.3\", \"built_at\": \"2026-02-19T03:00:00Z\", \"model\": \"text-embedding-3-small\", \"anchor_count\": 287, \"entries\": { \"paper\": { \"chunks\": [ \"memory/projects/total-recall/total-recall-v3.md#chunk-4\", \"archive/chatgpt-import/2025-07-laser-paper.md#chunk-1\" ], \"scores\": [0.94, 0.91], \"sources\": [\"memory/\", \"archive/\"] } } } ```",
   "marked": "```json { \"version\": \"1.3\", \"built_at\": \"2026-02-19T03:00:00Z\", \"model\": \"text-embedding-3-small\", \"anchor_count\": 287, \"entries\": { \"paper\": { \"chunks\": [ [-\"memory/projects/engram/engram-v3.md#chunk-4\",-] {+\"memory/projects/total-recall/total-recall-v3.md#chunk-4\",+} \"archive/chatgpt-import/2025-07-laser-paper.md#chunk-1\" ], \"scores\": [0.94, 0.91], \"sources\": [\"memory/\", \"archive/\"] } } } ```"
  },
  {
   "section": "4.6 Nightly Sleep Consolidation (Full Rebuild)",
   "old": "### 4.5 Nightly Sleep Consolidation (Full Rebuild)",
   "new": "### 4.6 Nightly Sleep Consolidation (Full Rebuild)",
   "marked": "### [-4.5-] {+4.6+} Nightly Sleep Consolidation (Full Rebuild)"
  },
  {
   "section": "4.6 Nightly Sleep Consolidation (Full Rebuild)",
   "old": "The rebuild algorithm: (1) scan all memory sources, chunking long documents into 256–512 token segments; (2) embed all chunks (batch, cached by content hash); (3) build salience-weighted anchor vocabulary; (4) build index using ANN for large corpora, exact KNN for <50k chunks; (5) write atomic JSON artifact. Implementation: `runHippocampusRebuild()` in `src/memory/engram/hippocampus-rebuild.ts` (450 LOC).",
   "new": "The rebuild algorithm: (1) scan all memory sources, chunking long documents into 256–512 token segments; (2) embed all chunks (batch, cached by content hash); (3) build salience-weighted anchor vocabulary; (4) build index using ANN for large corpora, exact KNN for <50k chunks; (5) write atomic JSON artifact. The rebuild entry point consumes the storage layer's event files and writes the index in a single pass (~450 lines of orchestration code in the reference implementation).",
   "marked": "The rebuild algorithm: (1) scan all memory sources, chunking long documents into 256–512 token segments; (2) embed all chunks (batch, cached by content hash); (3) build salience-weighted anchor vocabulary; (4) build index using ANN for large corpora, exact KNN for <50k chunks; (5) write atomic JSON artifact. [-Implementation: `runHippocampusRebuild()`-] {+The rebuild entry point consumes the storage layer's event files and writes the index+} in [-`src/memory/engram/hippocampus-rebuild.ts` (450 LOC).-] {+a single pass (~450 lines of orchestration code in the reference implementation).+}"
  },
  {
   "section": "4.6a Deduplication via Similarity Check",
   "old": "### 4.5a Deduplication via Similarity Check",
   "new": "### 4.6a Deduplication via Similarity Check",
   "marked": "### [-4.5a-] {+4.6a+} Deduplication via Similarity Check"
  },
  {
   "section": "4.6b Real-Time Anchor Discovery",
   "old": "### 4.5b Real-Time Anchor Discovery",
   "new": "### 4.6b Real-Time Anchor Discovery",
   "marked": "### [-4.5b-] {+4.6b+} Real-Time Anchor Discovery"
  },
  {
   "section": "4.6b Real-Time Anchor Discovery",
   "old": "Novel concepts emerging between nightly rebuilds are detected and indexed within 10–30 seconds via a lightweight micro-rebuild. A new anchor is created when its salience score (§4.2) exceeds the emergence threshold of 0.75 — a normalized value on the [0, 1] salience scale — computed over content ingested since the last nightly build.",
   "new": "Novel concepts emerging between nightly rebuilds are detected and indexed within 10–30 seconds via a lightweight micro-rebuild. A new anchor is created when its salience score (§4.3) exceeds the emergence threshold of 0.75 — a normalized value on the [0, 1] salience scale — computed over content ingested since the last nightly build.",
   "marked": "Novel concepts emerging between nightly rebuilds are detected and indexed within 10–30 seconds via a lightweight micro-rebuild. A new anchor is created when its salience score [-(§4.2)-] {+(§4.3)+} exceeds the emergence threshold of 0.75 — a normalized value on the [0, 1] salience scale — computed over content ingested since the last nightly build."
  },
  {
   "section": "4.7 Two-Tier Memory: Episodic and Semantic",
   "old": "### 4.6 Two-Tier Memory: Episodic and Semantic",
   "new": "### 4.7 Two-Tier Memory: Episodic and Semantic",
   "marked": "### [-4.6-] {+4.7+} Two-Tier Memory: Episodic and Semantic"
  },
  {
   "section": "4.7 Two-Tier Memory: Episodic and Semantic",
   "old": "**Episodic tier (real-time).** When a new memory chunk is written, it is immediately inserted into the index via `ON_MEMORY_WRITE()`. This tier contains raw, unprocessed facts — always current, with <2-minute freshness.",
   "new": "**Episodic tier (real-time).** When a new memory chunk is written, it is immediately inserted into the index. This tier contains raw, unprocessed facts — always current, with <2-minute freshness. The desk-versus-filing-cabinet distinction is the right intuition: what you used in the last hour stays within arm's reach.",
   "marked": "**Episodic tier (real-time).** When a new memory chunk is written, it is immediately inserted into the [-index via `ON_MEMORY_WRITE()`.-] {+index.+} This tier contains raw, unprocessed facts — always current, with <2-minute [-freshness.-] {+freshness. The desk-versus-filing-cabinet distinction is the right intuition: what you used in the last hour stays within arm's reach.+}"
  },
  {
   "section": "4.7 Two-Tier Memory: Episodic and Semantic",
   "old": "**Semantic tier (nightly rebuild).** At 04:15 each night, the full index is rebuilt from scratch, reflecting abstracted, consolidated understanding — concepts that have risen to sufficient salience and relationships visible across many episodes. Implementation: `EpisodicBuffer` class in `src/memory/engram/hippocampus-enhancement.ts` (468 LOC).",
   "new": "**Semantic tier (nightly rebuild).** At 04:15 each night, the full index is rebuilt from scratch, reflecting abstracted, consolidated understanding — concepts that have risen to sufficient salience and relationships visible across many episodes.",
   "marked": "**Semantic tier (nightly rebuild).** At 04:15 each night, the full index is rebuilt from scratch, reflecting abstracted, consolidated understanding — concepts that have risen to sufficient salience and relationships visible across many [-episodes. Implementation: `EpisodicBuffer` class in `src/memory/engram/hippocampus-enhancement.ts` (468 LOC).-] {+episodes.+}"
  },
  {
   "section": "4.7 Two-Tier Memory: Episodic and Semantic",
   "old": null,
   "new": "The episodic tier doubles as a fix for a subtler retrieval failure: the agent has *written* a correct fact in today's notes but acts against it before the nightly rebuild can index it. A same-day hot cache that unconditionally injects today's self-written log closes that window, so the agent does not contradict notes it wrote an hour ago.",
   "marked": "{+The episodic tier doubles as a fix for a subtler retrieval failure: the agent has *written* a correct fact in today's notes but acts against it before the nightly rebuild can index it. A same-day hot cache that unconditionally injects today's self-written log closes that window, so the agent does not contradict notes it wrote an hour ago.+}"
  },
  {
   "section": "4.8 Importance Scoring",
   "old": "### 4.6a Importance Scoring",
   "new": "### 4.8 Importance Scoring",
   "marked": "### [-4.6a-] {+4.8+} Importance Scoring"
  },
  {
   "section": "4.8 Importance Scoring",
   "old": "Default weights: $w_1 = 3.0$, $w_2 = 3.0$, $w_3 = 2.5$, $w_4 = 1.5$. Each component is normalized to [0, 1] before weighting, so the raw weighted sum falls in [0, 10] and is clamped to [1, 10]. The importance score modulates effective similarity during K-slot ranking:",
   "new": "Default weights: $w_1 = 3.0$, $w_2 = 3.0$, $w_3 = 2.5$, $w_4 = 1.5$. Each component is normalized to [0, 1] before weighting, so the raw weighted sum falls in [0, 10] and is clamped to [1, 10]. Importance scoring works like an editor deciding the front page — recency, weight, and relevance to what the reader is currently asking about. The importance score modulates effective similarity during K-slot ranking:",
   "marked": "Default weights: $w_1 = 3.0$, $w_2 = 3.0$, $w_3 = 2.5$, $w_4 = 1.5$. Each component is normalized to [0, 1] before weighting, so the raw weighted sum falls in [0, 10] and is clamped to [1, 10]. {+Importance scoring works like an editor deciding the front page — recency, weight, and relevance to what the reader is currently asking about.+} The importance score modulates effective similarity during K-slot ranking:"
  },
  {
   "section": "4.6a Importance Scoring",
   "old": "where $\\alpha = 0.15$. Implementation: `computeImportance()` and `weightedScore()` in `src/memory/engram/hippocampus-enhancement.ts`.",
   "new": null,
   "marked": "[-where $\\alpha = 0.15$. Implementation: `computeImportance()` and `weightedScore()` in `src/memory/engram/hippocampus-enhancement.ts`.-]"
  },
  {
   "section": "4.8 Importance Scoring",
   "old": null,
   "new": "where $\\alpha = 0.15$. A connection-count bonus (+1 per three related links, capped at +1) lets well-connected chunks rise — anticipating the link signal of §4.9.",
   "marked": "{+where $\\alpha = 0.15$. A connection-count bonus (+1 per three related links, capped at +1) lets well-connected chunks rise — anticipating the link signal of §4.9.+}"
  },
  {
   "section": "4.7 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": "### 4.7 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "new": null,
   "marked": "[-### 4.7 Inference-Time Lookup with Post-Retrieval Re-ranking-]"
  },
  {
   "section": "4.7 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": "Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **O(1) index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6) and query-specific cosine similarity (weight 0.4); (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.",
   "new": null,
   "marked": "[-Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **O(1) index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6) and query-specific cosine similarity (weight 0.4); (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.-]"
  },
  {
   "section": "4.7 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": "The re-ranking step discards false positives — chunks matching the anchor word but semantically unrelated to the specific query — without an additional retrieval pass. The candidate set is small (K×|A| ≤ 100 chunks), making re-ranking fast (~10ms). Implementation: `registerHippocampusHook()` in `src/plugins/hippocampus-hook.ts` (131 LOC).",
   "new": null,
   "marked": "[-The re-ranking step discards false positives — chunks matching the anchor word but semantically unrelated to the specific query — without an additional retrieval pass. The candidate set is small (K×|A| ≤ 100 chunks), making re-ranking fast (~10ms). Implementation: `registerHippocampusHook()` in `src/plugins/hippocampus-hook.ts` (131 LOC).-]"
  },
  {
   "section": "4.8 Full Inference Pipeline Integration",
   "old": "### 4.8 Full Inference Pipeline Integration",
   "new": null,
   "marked": "[-### 4.8 Full Inference Pipeline Integration-]"
  },
  {
   "section": "4.8 Full Inference Pipeline Integration",
   "old": "``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Always-loaded context (O(1), ~500 tokens) base_context = load(agent_config.persona_state) # Identity Persistence project_index = load(\"memory/projects-master.md\")",
   "new": null,
   "marked": "[-``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Always-loaded context (O(1), ~500 tokens) base_context = load(agent_config.persona_state) # Identity Persistence project_index = load(\"memory/projects-master.md\")-]"
  },
  {
   "section": "Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) instant_recall_index = load_cached(\"memory/hippocampus-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, instant_recall_index)",
   "old": "# Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) instant_recall_index = load_cached(\"memory/hippocampus-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, instant_recall_index)",
   "new": null,
   "marked": "[-# Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) instant_recall_index = load_cached(\"memory/hippocampus-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, instant_recall_index)-]"
  },
  {
   "section": "Layer 2: Assemble context window context = [base_context, project_index, *memory_chunks, user_message]",
   "old": "# Layer 2: Assemble context window context = [base_context, project_index, *memory_chunks, user_message]",
   "new": null,
   "marked": "[-# Layer 2: Assemble context window context = [base_context, project_index, *memory_chunks, user_message]-]"
  },
  {
   "section": "Layer 3: Total Recall compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = TOTAL_RECALL_COMPACT(context)",
   "old": "# Layer 3: Total Recall compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = TOTAL_RECALL_COMPACT(context)",
   "new": null,
   "marked": "[-# Layer 3: Total Recall compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = TOTAL_RECALL_COMPACT(context)-]"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "### 4.9 Beyond Cosine: Validity, Trust, and Links",
   "marked": "{+### 4.9 Beyond Cosine: Validity, Trust, and Links+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "A pure similarity index treats the highest-cosine chunk as the best answer. Production exposed three cases where that is wrong, and Instant Recall now carries three additional per-chunk signals that ranking weights alongside cosine. Each is the same move — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — applied to a different dimension.",
   "marked": "{+A pure similarity index treats the highest-cosine chunk as the best answer. Production exposed three cases where that is wrong, and Instant Recall now carries three additional per-chunk signals that ranking weights alongside cosine. Each is the same move — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — applied to a different dimension.+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer \"what did we believe was true *as of* date X,\" not only \"what is the latest snapshot.\" Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. v1 exposes an `invalidate()` API and leaves contradiction *detection* to the nightly reflection layer.",
   "marked": "{+**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer \"what did we believe was true *as of* date X,\" not only \"what is the latest snapshot.\" Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. v1 exposes an `invalidate()` API and leaves contradiction *detection* to the nightly reflection layer.+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "**Trust (verified-code retrieval).** When the index holds code chunks — from source files and from session transcripts — an embedding match treats a battle-tested function and an unreviewed scratch snippet as equals. For an agent that *acts* on retrieved code, the highest-cosine match may be the least trustworthy. Each code chunk carries a `verification_status` (`unverified | partial | verified | failed`) and a test-coverage percentage; a verification-aware re-rank multiplies the score by ×1.5 (verified), ×1.2 (partial), ×1.0 (unverified), or ×0.5 (failed). Penalized chunks are demoted, not dropped, unless the caller explicitly requires verification. Coverage is populated by a nightly batch that maps test-runner coverage back to chunk line ranges — keeping metadata churn off the inference path. Transcript code, which has no coverage map, stays `unverified` by default.",
   "marked": "{+**Trust (verified-code retrieval).** When the index holds code chunks — from source files and from session transcripts — an embedding match treats a battle-tested function and an unreviewed scratch snippet as equals. For an agent that *acts* on retrieved code, the highest-cosine match may be the least trustworthy. Each code chunk carries a `verification_status` (`unverified | partial | verified | failed`) and a test-coverage percentage; a verification-aware re-rank multiplies the score by ×1.5 (verified), ×1.2 (partial), ×1.0 (unverified), or ×0.5 (failed). Penalized chunks are demoted, not dropped, unless the caller explicitly requires verification. Coverage is populated by a nightly batch that maps test-runner coverage back to chunk line ranges — keeping metadata churn off the inference path. Transcript code, which has no coverage map, stays `unverified` by default.+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "**Links (durable inter-chunk edges).** A Zettelkasten's power is not the notes but the links between them — retrieving one note surfaces the web it sits in. The deduplication pass (§4.6a) already computes relatedness but historically discarded it. Those edges are now persisted in a `backlinks` table (authoritative) with a denormalized JSON cache on the chunk row: `link_type='duplicate'` for similarity > 0.9, `'related'` for 0.7–0.9, with a link strength blending similarity, recency, and access count. A search can opt in to hydrate each result with its top backlinks, and a depth-capped, cycle-safe breadth-first walk can pull in a chunk's k-hop neighbourhood. Out-degree is bounded by linking only the top-k similar chunks per insert, avoiding the O(n²) link-explosion trap.",
   "marked": "{+**Links (durable inter-chunk edges).** A Zettelkasten's power is not the notes but the links between them — retrieving one note surfaces the web it sits in. The deduplication pass (§4.6a) already computes relatedness but historically discarded it. Those edges are now persisted in a `backlinks` table (authoritative) with a denormalized JSON cache on the chunk row: `link_type='duplicate'` for similarity > 0.9, `'related'` for 0.7–0.9, with a link strength blending similarity, recency, and access count. A search can opt in to hydrate each result with its top backlinks, and a depth-capped, cycle-safe breadth-first walk can pull in a chunk's k-hop neighbourhood. Out-degree is bounded by linking only the top-k similar chunks per insert, avoiding the O(n²) link-explosion trap.+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": null,
   "new": "These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the inference-path lookup stays O(1).",
   "marked": "{+These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the inference-path lookup stays O(1).+}"
  },
  {
   "section": "4.10 Reflection-Tuned Parameters",
   "old": null,
   "new": "### 4.10 Reflection-Tuned Parameters",
   "marked": "{+### 4.10 Reflection-Tuned Parameters+}"
  },
  {
   "section": "4.10 Reflection-Tuned Parameters",
   "old": null,
   "new": "The nightly reflection layer (§2.2) audits the previous day's retrievals — which anchors fired, which returned chunks the agent then used, which returned chunks it ignored — and adjusts three knobs for the next rebuild: anchor term selection (promote anchors that produced used chunks, prune anchors that only produced ignored ones), importance weights ($w_1 \\ldots w_4$), and chunk boundaries. The retrieval layer thus improves without code change; the reflection layer owns the *policy*, Instant Recall owns the *mechanism*.",
   "marked": "{+The nightly reflection layer (§2.2) audits the previous day's retrievals — which anchors fired, which returned chunks the agent then used, which returned chunks it ignored — and adjusts three knobs for the next rebuild: anchor term selection (promote anchors that produced used chunks, prune anchors that only produced ignored ones), importance weights ($w_1 \\ldots w_4$), and chunk boundaries. The retrieval layer thus improves without code change; the reflection layer owns the *policy*, Instant Recall owns the *mechanism*.+}"
  },
  {
   "section": "4.11 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": null,
   "new": "### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "marked": "{+### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking+}"
  },
  {
   "section": "4.11 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": null,
   "new": "Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **O(1) index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.",
   "marked": "{+Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **O(1) index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.+}"
  },
  {
   "section": "4.11 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": null,
   "new": "The re-ranking step discards false positives — chunks matching the anchor word but semantically unrelated to the specific query — without an additional retrieval pass. The candidate set is small (K×|A| ≤ 100 chunks), making re-ranking fast (~10ms).",
   "marked": "{+The re-ranking step discards false positives — chunks matching the anchor word but semantically unrelated to the specific query — without an additional retrieval pass. The candidate set is small (K×|A| ≤ 100 chunks), making re-ranking fast (~10ms).+}"
  },
  {
   "section": "4.12 Low-Confidence Reformulation",
   "old": null,
   "new": "### 4.12 Low-Confidence Reformulation",
   "marked": "{+### 4.12 Low-Confidence Reformulation+}"
  },
  {
   "section": "4.12 Low-Confidence Reformulation",
   "old": null,
   "new": "The pipeline above assumes one query attempt. Production showed a distinct failure: when retrieval scores are uniformly low (max cosine < 0.5 across all results), the agent accepts the best-of-bad matches as authoritative rather than recognizing that retrieval *failed*. Instant Recall adds a reformulation gate. When max(scores) falls below a confidence threshold **and** the query carries ownership signals (\"our\", \"we\", \"my\", \"the [noun] we [verb]\"), it (1) extracts domain-anchor nouns and re-searches on those alone, (2) searches explicitly for known project and paper titles, and (3) if still low, broadens to a file-path search — the knowledge may live in a file whose *name* matches even when its *text* does not. This addresses the dominant residual: a 2026-04-01 incident in which the agent searched memory-retrieval content, scored 0.47–0.49 across all results, and accepted the wrong files with no retry. The keyword channel matters here too: a hybrid store weighting vector and keyword search 70/30 can let the BM25 channel rescue a bad embedding match — but only if the indexed text contains the query terms. Papers about \"compaction\" do not match queries about \"retrieval.\" A concept→keyword routing table, built during Sleep Consolidation, stores 10–20 human-search keywords per project (e.g., Total Recall → [\"memory\", \"retrieval\", \"forgetting\", \"context\", \"compaction\", \"eviction\", \"recall\"]) even when those words never appear in the body text.",
   "marked": "{+The pipeline above assumes one query attempt. Production showed a distinct failure: when retrieval scores are uniformly low (max cosine < 0.5 across all results), the agent accepts the best-of-bad matches as authoritative rather than recognizing that retrieval *failed*. Instant Recall adds a reformulation gate. When max(scores) falls below a confidence threshold **and** the query carries ownership signals (\"our\", \"we\", \"my\", \"the [noun] we [verb]\"), it (1) extracts domain-anchor nouns and re-searches on those alone, (2) searches explicitly for known project and paper titles, and (3) if still low, broadens to a file-path search — the knowledge may live in a file whose *name* matches even when its *text* does not. This addresses the dominant residual: a 2026-04-01 incident in which the agent searched memory-retrieval content, scored 0.47–0.49 across all results, and accepted the wrong files with no retry. The keyword channel matters here too: a hybrid store weighting vector and keyword search 70/30 can let the BM25 channel rescue a bad embedding match — but only if the indexed text contains the query terms. Papers about \"compaction\" do not match queries about \"retrieval.\" A concept→keyword routing table, built during Sleep Consolidation, stores 10–20 human-search keywords per project (e.g., Total Recall → [\"memory\", \"retrieval\", \"forgetting\", \"context\", \"compaction\", \"eviction\", \"recall\"]) even when those words never appear in the body text.+}"
  },
  {
   "section": "4.13 Full Inference Pipeline Integration",
   "old": null,
   "new": "### 4.13 Full Inference Pipeline Integration",
   "marked": "{+### 4.13 Full Inference Pipeline Integration+}"
  },
  {
   "section": "4.13 Full Inference Pipeline Integration",
   "old": null,
   "new": "``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Always-loaded context (O(1), ~500 tokens) base_context = load(agent_config.persona_state) # Identity layer project_index = load(\"memory/projects-master.md\") today_log = load_today_self_written_log() # episodic hot cache",
   "marked": "{+``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Always-loaded context (O(1), ~500 tokens) base_context = load(agent_config.persona_state) # Identity layer project_index = load(\"memory/projects-master.md\") today_log = load_today_self_written_log() # episodic hot cache+}"
  },
  {
   "section": "Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) index = load_cached(\"memory/instant-recall-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, index) if max_score(memory_chunks) < CONFIDENCE_THRESHOLD and has_ownership_signal(user_message): memory_chunks = REFORMULATE_AND_RETRY(user_message, index) # §4.12",
   "old": null,
   "new": "# Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) index = load_cached(\"memory/instant-recall-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, index) if max_score(memory_chunks) < CONFIDENCE_THRESHOLD and has_ownership_signal(user_message): memory_chunks = REFORMULATE_AND_RETRY(user_message, index) # §4.12",
   "marked": "{+# Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) index = load_cached(\"memory/instant-recall-index.json\") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, index) if max_score(memory_chunks) < CONFIDENCE_THRESHOLD and has_ownership_signal(user_message): memory_chunks = REFORMULATE_AND_RETRY(user_message, index) # §4.12+}"
  },
  {
   "section": "Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "old": null,
   "new": "# Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "marked": "{+# Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]+}"
  },
  {
   "section": "Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "old": null,
   "new": "# Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "marked": "{+# Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)+}"
  },
  {
   "section": "5.1 Amortized Complexity Analysis",
   "old": "| Method | Per-query inference cost | Build cost | | -------------------------------------------- | ------------------------ | ---------- | --- | --- | ---- | --- | --- | --- | --- | ----------- | | Single-source exact KNN | O(n) | — | | Single-source ANN (FAISS) | O(log n) | O(n log n) | | Instant Recall (+ semantic anchor expansion) | O( | V | + | A | + K· | A | ) | O( | V | ·n) offline |",
   "new": "| Method | Per-query inference cost | Build cost | | -------------------------- | ------------------------ | -------------- | | Single-source exact KNN | O(n) | — | | Single-source ANN (FAISS) | O(log n) | O(n log n) | | Instant Recall (+ semantic anchor expansion) | O(\\|V\\| + \\|A\\| + K·\\|A\\|) | O(\\|V\\|·n) offline |",
   "marked": "| Method | Per-query inference cost | Build cost | | [----------------------------------------------] {+--------------------------+} | ------------------------ | [----------- | --- | --- | ---- | --- | --- | --- | --- | ------------] {+--------------+} | | Single-source exact KNN | O(n) | — | | Single-source ANN (FAISS) | O(log n) | O(n log n) | | Instant Recall (+ semantic anchor expansion) | [-O(-] {+O(\\|V\\| + \\|A\\| + K·\\|A\\|)+} | [-V | + | A | + K· | A | ) | O( | V | ·n)-] {+O(\\|V\\|·n)+} offline |"
  },
  {
   "section": "6.4 Alternative 4: Knowledge Graph Overlay",
   "old": "Preferred when relationship types between concepts matter (e.g., causal chains, temporal ordering). A natural Instant Recall extension for structured domains (future work, §8.6).",
   "new": "Preferred when relationship types between concepts matter (e.g., causal chains, temporal ordering). The durable backlink edges of §4.9 are a step in this direction; richer typed edges are a natural extension for structured domains (future work, §8.6).",
   "marked": "Preferred when relationship types between concepts matter (e.g., causal chains, temporal ordering). [-A-] {+The durable backlink edges of §4.9 are a step in this direction; richer typed edges are a+} natural [-Instant Recall-] extension for structured domains (future work, §8.6)."
  },
  {
   "section": "7.2 Results",
   "old": "- **Recall–latency tradeoff.** MS-RAG achieves the highest recall (0.87) but at 418ms — 7.7× slower than Instant Recall. For personal assistant workloads where sub-100ms retrieval is required for responsive interaction, Instant Recall's 0.85 recall at 54ms represents a favorable operating point on the Pareto frontier. - **Concept anchoring value.** The 9-point gap between AS-ANN (0.76) and Instant Recall (0.85) isolates the benefit of pre-computed concept clustering beyond source coverage. - **False positive control.** Post-retrieval re-ranking gives Instant Recall the lowest FPR (0.18) of any method achieving >0.75 recall. - **MS-RAG ceiling.** MS-RAG's 2-point recall advantage over Instant Recall comes entirely from queries where no anchor term matches the relevant concept — a limitation addressable through vocabulary expansion rather than architectural change.",
   "new": "- **Recall–latency tradeoff.** MS-RAG achieves the highest recall (0.87) but at 418ms — 7.7× slower than Instant Recall. For personal assistant workloads where sub-100ms retrieval is required for responsive interaction, Instant Recall's 0.85 recall at 54ms is a favorable operating point on the Pareto frontier. - **Concept anchoring value.** The 9-point gap between AS-ANN (0.76) and Instant Recall (0.85) isolates the benefit of pre-computed concept clustering beyond source coverage. - **False positive control.** Post-retrieval re-ranking gives Instant Recall the lowest FPR (0.18) of any method achieving >0.75 recall. - **MS-RAG ceiling.** MS-RAG's 2-point recall advantage over Instant Recall comes entirely from queries where no anchor term matches the relevant concept — a limitation addressable through vocabulary expansion rather than architectural change.",
   "marked": "- **Recall–latency tradeoff.** MS-RAG achieves the highest recall (0.87) but at 418ms — 7.7× slower than Instant Recall. For personal assistant workloads where sub-100ms retrieval is required for responsive interaction, Instant Recall's 0.85 recall at 54ms [-represents-] {+is+} a favorable operating point on the Pareto frontier. - **Concept anchoring value.** The 9-point gap between AS-ANN (0.76) and Instant Recall (0.85) isolates the benefit of pre-computed concept clustering beyond source coverage. - **False positive control.** Post-retrieval re-ranking gives Instant Recall the lowest FPR (0.18) of any method achieving >0.75 recall. - **MS-RAG ceiling.** MS-RAG's 2-point recall advantage over Instant Recall comes entirely from queries where no anchor term matches the relevant concept — a limitation addressable through vocabulary expansion rather than architectural change."
  },
  {
   "section": "7.4 Unit Benchmark Validation",
   "old": "### 7.4 Unit Benchmark Validation",
   "new": null,
   "marked": "[-### 7.4 Unit Benchmark Validation-]"
  },
  {
   "section": "7.4 Unit Benchmark Validation",
   "old": "**Phase 6.2 Instant Recall full test suite summary (2026-02-24, Vitest v4.0.18):**",
   "new": null,
   "marked": "[-**Phase 6.2 Instant Recall full test suite summary (2026-02-24, Vitest v4.0.18):**-]"
  },
  {
   "section": "7.4 Unit Benchmark Validation",
   "old": "| Metric | Value | | -------------------------- | -------- | | Total tests (src + mirror) | 158 | | Passed | 154 | | Failed | **0** | | Skipped / Todo | 0 / 4 | | Pass rate | **100%** | | Total execution time | 968 ms |",
   "new": null,
   "marked": "[-| Metric | Value | | -------------------------- | -------- | | Total tests (src + mirror) | 158 | | Passed | 154 | | Failed | **0** | | Skipped / Todo | 0 / 4 | | Pass rate | **100%** | | Total execution time | 968 ms |-]"
  },
  {
   "section": "7.4 Unit Benchmark Validation",
   "old": "The 4 todo items correspond to pronoun expansion unit tests (A1), pending implementation in the `hippocampus-enhancement` API. All other assertions — including A2 importance re-ranking, A3 episodic tier freshness, and combined-query deduplication — pass at 100%.",
   "new": null,
   "marked": "[-The 4 todo items correspond to pronoun expansion unit tests (A1), pending implementation in the `hippocampus-enhancement` API. All other assertions — including A2 importance re-ranking, A3 episodic tier freshness, and combined-query deduplication — pass at 100%.-]"
  },
  {
   "section": "7.4 Implementation Status",
   "old": null,
   "new": "### 7.4 Implementation Status",
   "marked": "{+### 7.4 Implementation Status+}"
  },
  {
   "section": "7.4 Implementation Status",
   "old": null,
   "new": "The reference implementation is TypeScript (ESM, Node 22+), organized around an enhancement module (importance scoring, episodic buffer, deduplication, ~480 lines), a rebuild module (nightly orchestration, anchor extraction, incremental mtime-diff state, ~470 lines), and a co-located unit test suite. The beyond-cosine signals of §4.9 are present in the live schema and ranking path: bi-temporal validity columns and a covering index, a verification-status column with a coverage-mapping batch and a verification-aware re-rank, and a `backlinks` table with backlink hydration and a depth-capped k-hop walk on the manager. Exact line counts and test totals vary as the code evolves; the architectural claims above are the stable contract.",
   "marked": "{+The reference implementation is TypeScript (ESM, Node 22+), organized around an enhancement module (importance scoring, episodic buffer, deduplication, ~480 lines), a rebuild module (nightly orchestration, anchor extraction, incremental mtime-diff state, ~470 lines), and a co-located unit test suite. The beyond-cosine signals of §4.9 are present in the live schema and ranking path: bi-temporal validity columns and a covering index, a verification-status column with a coverage-mapping batch and a verification-aware re-rank, and a `backlinks` table with backlink hydration and a depth-capped k-hop walk on the manager. Exact line counts and test totals vary as the code evolves; the architectural claims above are the stable contract.+}"
  },
  {
   "section": "7.5 Threats to Validity",
   "old": "**Single-deployment evaluation.** All results come from one personal assistant deployment with one user. Interaction patterns, source distributions, and vocabulary characteristics may not generalize to other domains (e.g., enterprise knowledge management, multi-user systems). We mitigate this partially through ablation analysis, which demonstrates that each architectural component contributes independently, but cross-deployment validation remains necessary future work.",
   "new": "**Single-deployment evaluation.** All results come from one personal assistant deployment with one user. Interaction patterns, source distributions, and vocabulary characteristics may not generalize to other domains (e.g., enterprise knowledge management, multi-user systems). We mitigate this partially through ablation analysis, which shows each architectural component contributes independently, but cross-deployment validation remains necessary future work.",
   "marked": "**Single-deployment evaluation.** All results come from one personal assistant deployment with one user. Interaction patterns, source distributions, and vocabulary characteristics may not generalize to other domains (e.g., enterprise knowledge management, multi-user systems). We mitigate this partially through ablation analysis, which [-demonstrates that-] {+shows+} each architectural component contributes independently, but cross-deployment validation remains necessary future work."
  },
  {
   "section": "7.5 Threats to Validity",
   "old": "**Synthetic ablation corpus.** Unit benchmark ablations (§7.4) run on a synthetic corpus that is geometrically simpler than the deployment corpus. Deployment-scale ablation numbers (§7.3) are the authoritative benchmarks.",
   "new": null,
   "marked": "[-**Synthetic ablation corpus.** Unit benchmark ablations (§7.4) run on a synthetic corpus that is geometrically simpler than the deployment corpus. Deployment-scale ablation numbers (§7.3) are the authoritative benchmarks.-]"
  },
  {
   "section": "7.5 Threats to Validity",
   "old": null,
   "new": "**Beyond-cosine signals not yet in the benchmark.** The validity, trust, and link signals of §4.9 are implemented but were added after the §7.2 benchmark was frozen; their retrieval-quality contribution is not yet isolated in an ablation. Quantifying each is the next evaluation priority.",
   "marked": "{+**Beyond-cosine signals not yet in the benchmark.** The validity, trust, and link signals of §4.9 are implemented but were added after the §7.2 benchmark was frozen; their retrieval-quality contribution is not yet isolated in an ablation. Quantifying each is the next evaluation priority.+}"
  },
  {
   "section": "8.1 Limitations and Mitigation Strategies",
   "old": null,
   "new": "**Contradiction detection boundary.** The validity machinery (§4.9) can close a fact's interval, but *deciding* that a new fact contradicts an old one is left to the reflection layer. Until that detector is in place, validity intervals are only as good as the heuristics that call `invalidate()`.",
   "marked": "{+**Contradiction detection boundary.** The validity machinery (§4.9) can close a fact's interval, but *deciding* that a new fact contradicts an old one is left to the reflection layer. Until that detector is in place, validity intervals are only as good as the heuristics that call `invalidate()`.+}"
  },
  {
   "section": "8.2 Large-Scale Deployment (n > 100,000 chunks)",
   "old": "†Projected from extrapolation; not empirically validated at this scale.",
   "new": null,
   "marked": "[-†Projected from extrapolation; not empirically validated at this scale.-]"
  },
  {
   "section": "8.2 Large-Scale Deployment (n > 100,000 chunks)",
   "old": null,
   "new": "†Projected from extrapolation; not empirically validated at this scale. The reference deployment is approaching the 50k ceiling; scaling observations beyond it are forthcoming rather than reported here.",
   "marked": "{+†Projected from extrapolation; not empirically validated at this scale. The reference deployment is approaching the 50k ceiling; scaling observations beyond it are forthcoming rather than reported here.+}"
  },
  {
   "section": "8.3 Ethical Considerations",
   "old": "Instant Recall indexes personal interaction history, including potentially sensitive content. The local-first architecture (no cloud embedding storage, no external API calls for retrieval) mitigates data exfiltration risks. However, the index itself — a JSON file mapping anchor terms to memory paths — constitutes a condensed summary of what the agent knows about its user. Deployments should encrypt the index at rest and restrict file-system access. The importance scoring system (§4.6a) introduces implicit content prioritization that could surface sensitive memories preferentially; operators should review weight configurations for their context.",
   "new": "Instant Recall indexes personal interaction history, including potentially sensitive content. The local-first architecture (no cloud embedding storage, no external API calls for retrieval) mitigates data exfiltration risks. However, the index itself — a JSON file mapping anchor terms to memory paths — is a condensed summary of what the agent knows about its user. Deployments should encrypt the index at rest and restrict file-system access. The importance scoring system (§4.8) introduces implicit content prioritization that could surface sensitive memories preferentially; operators should review weight configurations for their context. The bi-temporal store (§4.9) also retains superseded facts indefinitely; a retention or hard-delete policy for closed validity intervals is a deployment responsibility.",
   "marked": "Instant Recall indexes personal interaction history, including potentially sensitive content. The local-first architecture (no cloud embedding storage, no external API calls for retrieval) mitigates data exfiltration risks. However, the index itself — a JSON file mapping anchor terms to memory paths — [-constitutes-] {+is+} a condensed summary of what the agent knows about its user. Deployments should encrypt the index at rest and restrict file-system access. The importance scoring system [-(§4.6a)-] {+(§4.8)+} introduces implicit content prioritization that could surface sensitive memories preferentially; operators should review weight configurations for their [-context.-] {+context. The bi-temporal store (§4.9) also retains superseded facts indefinitely; a retention or hard-delete policy for closed validity intervals is a deployment responsibility.+}"
  },
  {
   "section": "8a. Implementation",
   "old": "### 8a. Implementation",
   "new": null,
   "marked": "[-### 8a. Implementation-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "### 8a.1 Source Files and Line Counts",
   "new": null,
   "marked": "[-### 8a.1 Source Files and Line Counts-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "The Instant Recall module is implemented in TypeScript (ESM, Node 22+):",
   "new": null,
   "marked": "[-The Instant Recall module is implemented in TypeScript (ESM, Node 22+):-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "**Core module (`src/memory/engram/`):**",
   "new": null,
   "marked": "[-**Core module (`src/memory/engram/`):**-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "| File | LOC | Role | | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------- | | `hippocampus-enhancement.ts` | 468 | `EpisodicBuffer`, `computeImportance()`, `weightedScore()`, `enhanceIndex()`, deduplication logic | | `hippocampus-rebuild.ts` | 450 | `runHippocampusRebuild()`, `scheduleNightlyRebuild()`, `buildAnchorFromFile()`, mtime-diff state | | **Subtotal (core)** | **918** | |",
   "new": null,
   "marked": "[-| File | LOC | Role | | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------- | | `hippocampus-enhancement.ts` | 468 | `EpisodicBuffer`, `computeImportance()`, `weightedScore()`, `enhanceIndex()`, deduplication logic | | `hippocampus-rebuild.ts` | 450 | `runHippocampusRebuild()`, `scheduleNightlyRebuild()`, `buildAnchorFromFile()`, mtime-diff state | | **Subtotal (core)** | **918** | |-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "**Plugin (`src/plugins/`):**",
   "new": null,
   "marked": "[-**Plugin (`src/plugins/`):**-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "| File | LOC | Role | | --------------------- | ------- | --------------------------------------------------------------------------- | | `hippocampus-hook.ts` | 131 | `registerHippocampusHook()` — wires Instant Recall into the plugin registry | | **Subtotal (plugin)** | **131** | |",
   "new": null,
   "marked": "[-| File | LOC | Role | | --------------------- | ------- | --------------------------------------------------------------------------- | | `hippocampus-hook.ts` | 131 | `registerHippocampusHook()` — wires Instant Recall into the plugin registry | | **Subtotal (plugin)** | **131** | |-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "**Test files (`src/memory/engram/`):**",
   "new": null,
   "marked": "[-**Test files (`src/memory/engram/`):**-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "| File | LOC | Role | | --------------------------------- | --------- | ---------------------------------------------------------------- | | `hippocampus-enhancement.test.ts` | 608 | Unit tests for EpisodicBuffer, importance scoring, deduplication | | `hippocampus-benchmark.test.ts` | 269 | A2/A3 ablation benchmarks; A1 pronoun expansion (4 todo) | | `hippocampus-rebuild.test.ts` | 360 | Nightly rebuild, mtime-diff, anchor extraction | | **Subtotal (tests)** | **1,237** | |",
   "new": null,
   "marked": "[-| File | LOC | Role | | --------------------------------- | --------- | ---------------------------------------------------------------- | | `hippocampus-enhancement.test.ts` | 608 | Unit tests for EpisodicBuffer, importance scoring, deduplication | | `hippocampus-benchmark.test.ts` | 269 | A2/A3 ablation benchmarks; A1 pronoun expansion (4 todo) | | `hippocampus-rebuild.test.ts` | 360 | Nightly rebuild, mtime-diff, anchor extraction | | **Subtotal (tests)** | **1,237** | |-]"
  },
  {
   "section": "8a.1 Source Files and Line Counts",
   "old": "**Grand total: 2,286 LOC** (918 core + 131 plugin + 1,237 tests).",
   "new": null,
   "marked": "[-**Grand total: 2,286 LOC** (918 core + 131 plugin + 1,237 tests).-]"
  },
  {
   "section": "8a.2 Architecture and Data Flow",
   "old": "### 8a.2 Architecture and Data Flow",
   "new": null,
   "marked": "[-### 8a.2 Architecture and Data Flow-]"
  },
  {
   "section": "8a.2 Architecture and Data Flow",
   "old": "``` Total Recall event files (memory/, archive/, emails/) │ ▼ hippocampus-rebuild.ts ├─ collectFiles() ← scans all source directories ├─ buildAnchorFromFile() ← extracts anchor terms per file ├─ reindexPhase() ← builds anchor→chunk KNN index ├─ scheduleNightlyRebuild() ← cron at 04:15; mtime-diff incremental └─ runHippocampusRebuild() ← main entry point",
   "new": null,
   "marked": "[-``` Total Recall event files (memory/, archive/, emails/) │ ▼ hippocampus-rebuild.ts ├─ collectFiles() ← scans all source directories ├─ buildAnchorFromFile() ← extracts anchor terms per file ├─ reindexPhase() ← builds anchor→chunk KNN index ├─ scheduleNightlyRebuild() ← cron at 04:15; mtime-diff incremental └─ runHippocampusRebuild() ← main entry point-]"
  },
  {
   "section": "8a.2 Architecture and Data Flow",
   "old": "hippocampus-enhancement.ts ├─ EpisodicBuffer ← real-time episodic tier (TTL = 24h) ├─ computeImportance() ← entity_density + decision_signal + │ engagement + recency ├─ weightedScore() ← cosine × (1 + α·log(ι)) ├─ enhanceIndex() ← applies importance scores to index └─ deduplicateCluster() ← sim > 0.9: merge; 0.7–0.9: flag; < 0.7: keep",
   "new": null,
   "marked": "[-hippocampus-enhancement.ts ├─ EpisodicBuffer ← real-time episodic tier (TTL = 24h) ├─ computeImportance() ← entity_density + decision_signal + │ engagement + recency ├─ weightedScore() ← cosine × (1 + α·log(ι)) ├─ enhanceIndex() ← applies importance scores to index └─ deduplicateCluster() ← sim > 0.9: merge; 0.7–0.9: flag; < 0.7: keep-]"
  },
  {
   "section": "8a.2 Architecture and Data Flow",
   "old": "hippocampus-hook.ts └─ registerHippocampusHook() ← wires into plugin registry",
   "new": null,
   "marked": "[-hippocampus-hook.ts └─ registerHippocampusHook() ← wires into plugin registry-]"
  },
  {
   "section": "8a.2 Architecture and Data Flow",
   "old": "At inference time: INSTANT_RECALL_LOOKUP() → anchor detection → O(1) index lookup → post-retrieval re-rank → load chunks → inject into context window ```",
   "new": null,
   "marked": "[-At inference time: INSTANT_RECALL_LOOKUP() → anchor detection → O(1) index lookup → post-retrieval re-rank → load chunks → inject into context window ```-]"
  },
  {
   "section": "8a.3 Cross-Module Dependencies",
   "old": "### 8a.3 Cross-Module Dependencies",
   "new": null,
   "marked": "[-### 8a.3 Cross-Module Dependencies-]"
  },
  {
   "section": "8a.3 Cross-Module Dependencies",
   "old": "| Dependency | Direction | Interface | | --------------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------- | | **Total Recall** (Serra, 2026a) | Instant Recall reads Total Recall output | `loadEventsFromFile()` consumes event files; `eventToChunk()` converts to index chunks | | **Identity Persistence** (Serra, 2026b) | Identity Persistence consumes Instant Recall | Tier 3 context slots filled by `hippocampusSearch()` results | | **Humor Embeddings** (Serra, 2026d) | Humor Embeddings reads Instant Recall | Humor-relevant anchor clusters loaded during bridge discovery | | **Round Table** (Serra, 2026e) | Orchestration | Coordinates `scheduleNightlyRebuild()` timing across modules |",
   "new": null,
   "marked": "[-| Dependency | Direction | Interface | | --------------------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------- | | **Total Recall** (Serra, 2026a) | Instant Recall reads Total Recall output | `loadEventsFromFile()` consumes event files; `eventToChunk()` converts to index chunks | | **Identity Persistence** (Serra, 2026b) | Identity Persistence consumes Instant Recall | Tier 3 context slots filled by `hippocampusSearch()` results | | **Humor Embeddings** (Serra, 2026d) | Humor Embeddings reads Instant Recall | Humor-relevant anchor clusters loaded during bridge discovery | | **Round Table** (Serra, 2026e) | Orchestration | Coordinates `scheduleNightlyRebuild()` timing across modules |-]"
  },
  {
   "section": "8.4 Reproducibility",
   "old": null,
   "new": "### 8.4 Reproducibility",
   "marked": "{+### 8.4 Reproducibility+}"
  },
  {
   "section": "8.4 Reproducibility",
   "old": null,
   "new": "The annotated CORF dataset is drawn from one deployment's logs and is small. To let other researchers reproduce the failure-mode taxonomy without access to private logs, a complementary synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — is planned. The synthetic set would not replace the deployment benchmark but would make the taxonomy testable in isolation.",
   "marked": "{+The annotated CORF dataset is drawn from one deployment's logs and is small. To let other researchers reproduce the failure-mode taxonomy without access to private logs, a complementary synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — is planned. The synthetic set would not replace the deployment benchmark but would make the taxonomy testable in isolation.+}"
  },
  {
   "section": "9. Conclusion",
   "old": "This paper introduced CORF as a formal framework for diagnosing retrieval failures in persistent agents and demonstrated that the dominant failure mode is architectural — rooted in source fragmentation and anchor vocabulary gaps — rather than embedding quality. The source-coverage upper bound (§3.3) makes this precise: no amount of query refinement compensates for unsearched sources.",
   "new": "This paper introduced CORF as a formal framework for diagnosing retrieval failures in persistent agents and showed that the dominant failure mode is architectural — rooted in source fragmentation and anchor vocabulary gaps — rather than embedding quality. The source-coverage upper bound (§3.3) makes this precise: no amount of query refinement compensates for unsearched sources.",
   "marked": "This paper introduced CORF as a formal framework for diagnosing retrieval failures in persistent agents and [-demonstrated-] {+showed+} that the dominant failure mode is architectural — rooted in source fragmentation and anchor vocabulary gaps — rather than embedding quality. The source-coverage upper bound (§3.3) makes this precise: no amount of query refinement compensates for unsearched sources."
  },
  {
   "section": "9. Conclusion",
   "old": "Instant Recall resolves these failures by shifting retrieval from inference time to build time. A pre-computed concept index, rebuilt nightly and kept fresh by real-time episodic updates, maps anchor vocabulary terms to pre-ranked memory clusters. At inference time, a ~50ms lookup surfaces relevant memories before the model processes the prompt — achieving 0.85 CORF-Recall@20 at the lowest latency of any evaluated system. Concept anchoring accounts for 9 points of recall beyond what source aggregation alone provides. Post-retrieval re-ranking halves the false positive rate.",
   "new": "Instant Recall resolves these failures by shifting retrieval from inference time to build time. A pre-computed concept index, rebuilt nightly and kept fresh by real-time episodic updates, maps anchor vocabulary terms to pre-ranked memory clusters. At inference time, a ~50ms lookup surfaces relevant memories before the model processes the prompt — achieving 0.85 CORF-Recall@20 at the lowest latency of any evaluated system. Concept anchoring accounts for 9 points of recall beyond what source aggregation alone provides, and post-retrieval re-ranking halves the false positive rate. Beyond similarity, the index now weights validity over time, code-trust, and inter-chunk links — because the closest chunk is not always the right one, and a fact that was true last month may be false today.",
   "marked": "Instant Recall resolves these failures by shifting retrieval from inference time to build time. A pre-computed concept index, rebuilt nightly and kept fresh by real-time episodic updates, maps anchor vocabulary terms to pre-ranked memory clusters. At inference time, a ~50ms lookup surfaces relevant memories before the model processes the prompt — achieving 0.85 CORF-Recall@20 at the lowest latency of any evaluated system. Concept anchoring accounts for 9 points of recall beyond what source aggregation alone [-provides. Post-retrieval-] {+provides, and post-retrieval+} re-ranking halves the false positive [-rate.-] {+rate. Beyond similarity, the index now weights validity over time, code-trust, and inter-chunk links — because the closest chunk is not always the right one, and a fact that was true last month may be false today.+}"
  },
  {
   "section": "9. Conclusion",
   "old": "The deeper insight is architectural: Instant Recall transforms agent memory from a _search problem_ into a _recognition problem_. The agent stops asking \"what papers are you referring to?\" — because the answer was already in context before the question was asked.",
   "new": "The deeper insight is architectural: Instant Recall transforms agent memory from a _search problem_ into a _recognition problem_. The agent stops asking \"what papers are you referring to?\" — because the answer was already in context before the question was asked. It is the indexing organ, not the store; and like its biological model, it is the difference between having memories and being able to use them.",
   "marked": "The deeper insight is architectural: Instant Recall transforms agent memory from a _search problem_ into a _recognition problem_. The agent stops asking \"what papers are you referring to?\" — because the answer was already in context before the question was [-asked.-] {+asked. It is the indexing organ, not the store; and like its biological model, it is the difference between having memories and being able to use them.+}"
  },
  {
   "section": "References",
   "old": "1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Serra, O. (2026a). Total Recall: Compaction as Cache Eviction in Persistent AI Agent Memory. _Independent Research_. 13. Serra, O. (2026b). Identity Persistence: Persistent Agent Identity Through Structured Persona Maintenance. _Independent Research_. 14. Serra, O. (2026d). Humor Embeddings: Bisociation in Embedding Space for Humor Generation. _Independent Research_. 15. Serra, O. (2026e). Round Table: Cross-Session Signal Routing for Persistent AI Agents. _Independent Research_. 16. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 17. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 18. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 19. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 20. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 21. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 22. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 23. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 24. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), 1–37.",
   "new": "1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Serra, O. (2026a). Total Recall: Compaction as Cache Eviction in Persistent AI Agent Memory. _Independent Research_. 13. Serra, O. (2026b). Identity Persistence: Persistent Agent Identity Through Structured Persona Maintenance. _Independent Research_. 14. Serra, O. (2026d). Humor Embeddings: Bisociation in Embedding Space for Humor Generation. _Independent Research_. 15. Serra, O. (2026e). Sleep Consolidation: Cross-Session Reflection and Signal Routing for Persistent AI Agents. _Independent Research_. 16. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 17. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 18. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 19. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 20. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 21. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 22. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 23. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 24. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), 1–37. 25. Scoville, W. B., & Milner, B. (1957). Loss of recent memory after bilateral hippocampal lesions. _Journal of Neurology, Neurosurgery & Psychiatry_, 20(1), 11–21.",
   "marked": "1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Serra, O. (2026a). Total Recall: Compaction as Cache Eviction in Persistent AI Agent Memory. _Independent Research_. 13. Serra, O. (2026b). Identity Persistence: Persistent Agent Identity Through Structured Persona Maintenance. _Independent Research_. 14. Serra, O. (2026d). Humor Embeddings: Bisociation in Embedding Space for Humor Generation. _Independent Research_. 15. Serra, O. (2026e). [-Round Table:-] {+Sleep Consolidation:+} Cross-Session {+Reflection and+} Signal Routing for Persistent AI Agents. _Independent Research_. 16. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 17. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 18. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 19. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 20. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 21. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 22. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 23. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 24. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), [-1–37.-] {+1–37. 25. Scoville, W. B., & Milner, B. (1957). Loss of recent memory after bilateral hippocampal lesions. _Journal of Neurology, Neurosurgery & Psychiatry_, 20(1), 11–21.+}"
  },
  {
   "section": "References",
   "old": "_Version 7.0 — March 2026_ _Changes from v6.0: Structural and argumentative overhaul. Rewrote abstract (removed implementation trivia, clarified \"zero inference-time search computation\"). Fixed section numbering (§5→Theoretical Analysis, §7→full Evaluation with §7.1–7.5). Introduced MS-RAG as a named baseline with explicit definition (§6.3) and honest discussion of its recall advantage (§7.2). Added §7.5 Threats to Validity (single-deployment limitation, annotator bias, synthetic ablation corpus). Added §8.3 Ethical Considerations. Defined P(s) in source-coverage bound (§3.3). Defined engagement(term) precisely in §4.2 with log-scaled turn depth. Normalized importance scoring inputs in §4.6a. Clarified emergence threshold units in §4.5b. Fixed arXiv placeholders in references [22, 23]. Expanded §4.7 anchor detection to describe multi-word query handling and anchor collision. Corrected O-notation misuse in §5.1 (replaced \"O(63)\" with concrete operation count). Tempered neuroscience analogy in §1 (architectural not mechanistic). Rewrote conclusion to avoid restating abstract. Removed undefined \"GravityClaw\" reference. Consolidated §5.0 preview table into §7.2 to eliminate data duplication. Noted non-summation of failure mode frequencies in §3.4._",
   "new": null,
   "marked": "[-_Version 7.0 — March 2026_ _Changes from v6.0: Structural and argumentative overhaul. Rewrote abstract (removed implementation trivia, clarified \"zero inference-time search computation\"). Fixed section numbering (§5→Theoretical Analysis, §7→full Evaluation with §7.1–7.5). Introduced MS-RAG as a named baseline with explicit definition (§6.3) and honest discussion of its recall advantage (§7.2). Added §7.5 Threats to Validity (single-deployment limitation, annotator bias, synthetic ablation corpus). Added §8.3 Ethical Considerations. Defined P(s) in source-coverage bound (§3.3). Defined engagement(term) precisely in §4.2 with log-scaled turn depth. Normalized importance scoring inputs in §4.6a. Clarified emergence threshold units in §4.5b. Fixed arXiv placeholders in references [22, 23]. Expanded §4.7 anchor detection to describe multi-word query handling and anchor collision. Corrected O-notation misuse in §5.1 (replaced \"O(63)\" with concrete operation count). Tempered neuroscience analogy in §1 (architectural not mechanistic). Rewrote conclusion to avoid restating abstract. Removed undefined \"GravityClaw\" reference. Consolidated §5.0 preview table into §7.2 to eliminate data duplication. Noted non-summation of failure mode frequencies in §3.4._-]"
  },
  {
   "section": "References",
   "old": null,
   "new": "_Version 7.1 — June 2026_ _Changes from v7.0: Grounded the opening in the human hippocampus and patient H.M. (Scoville & Milner, 1957, added to refs) with the \"indexing organ — difference between having and using memories\" framing. Added reader-facing similes (book index, owning-a-book-you-can't-find for CORF, desk-vs-filing-cabinet for the episodic hot cache, editor's front page for importance scoring). Added §1.1 \"The three-layer memory system\" with self-sufficient inline summaries of the storage and reflection layers, replacing the bare cross-reference list. Added §4.2 clarifying that Instant Recall is store-agnostic — it requires only a (content, timestamp, source) contract and does not depend on any one storage layer. Added §4.9 \"Beyond cosine: validity, trust, and links,\" documenting three retrieval signals now present in the live schema/ranking path — bi-temporal validity intervals, verified-code trust ranking, and durable Zettelkasten backlinks — verified against the implementation. Added §4.10 reflection-tuned parameters (anchor/weight/boundary auto-tuning). Added §4.12 low-confidence reformulation gate and concept→keyword routing tables, motivated by the 2026-04-01 CORF incident. Folded the same-day self-contradiction fix into §4.7 (episodic hot cache) without a separate failure mode. Replaced §7.4 unit-benchmark table with an implementation-status paragraph that no longer pins exact LOC/test counts to a frozen snapshot, and added a §7.5 threat noting the §4.9 signals are not yet ablated. Added §8.4 reproducibility (synthetic CORF generator) and a retention note to §8.3. Removed remaining file-path/commit-hash references and the \"GravityClaw\"-style internal pointers from prose; renamed the reflection module from \"Round Table\" to \"Sleep Consolidation\" for consistency with the cited layer. Killed AI-isms (\"landscape\" → \"field\", \"represents a favorable\" → \"is a favorable\")._",
   "marked": "{+_Version 7.1 — June 2026_ _Changes from v7.0: Grounded the opening in the human hippocampus and patient H.M. (Scoville & Milner, 1957, added to refs) with the \"indexing organ — difference between having and using memories\" framing. Added reader-facing similes (book index, owning-a-book-you-can't-find for CORF, desk-vs-filing-cabinet for the episodic hot cache, editor's front page for importance scoring). Added §1.1 \"The three-layer memory system\" with self-sufficient inline summaries of the storage and reflection layers, replacing the bare cross-reference list. Added §4.2 clarifying that Instant Recall is store-agnostic — it requires only a (content, timestamp, source) contract and does not depend on any one storage layer. Added §4.9 \"Beyond cosine: validity, trust, and links,\" documenting three retrieval signals now present in the live schema/ranking path — bi-temporal validity intervals, verified-code trust ranking, and durable Zettelkasten backlinks — verified against the implementation. Added §4.10 reflection-tuned parameters (anchor/weight/boundary auto-tuning). Added §4.12 low-confidence reformulation gate and concept→keyword routing tables, motivated by the 2026-04-01 CORF incident. Folded the same-day self-contradiction fix into §4.7 (episodic hot cache) without a separate failure mode. Replaced §7.4 unit-benchmark table with an implementation-status paragraph that no longer pins exact LOC/test counts to a frozen snapshot, and added a §7.5 threat noting the §4.9 signals are not yet ablated. Added §8.4 reproducibility (synthetic CORF generator) and a retention note to §8.3. Removed remaining file-path/commit-hash references and the \"GravityClaw\"-style internal pointers from prose; renamed the reflection module from \"Round Table\" to \"Sleep Consolidation\" for consistency with the cited layer. Killed AI-isms (\"landscape\" → \"field\", \"represents a favorable\" → \"is a favorable\")._+}"
  }
 ]
}
