{
 "paper": "memory-enhancements",
 "a": "1.3",
 "b": "1.4",
 "summary": "From v1.3 (2 Jun) to v1.4 (2 Jun): 6,625 words to 6,676 words, 85 words in new or rewritten paragraphs and 34 taken out, 4 paragraphs changed.",
 "note": {
  "title": "Wording only: the topic index section opens with what it does",
  "kind": "",
  "body": "## Summary\n\nWording changes only. The topic index section now opens with what the index does instead of the observation behind it, and section 9.5.3 adds one paragraph noting that the scorer already penalises replaced facts with a fixed discount, which the new date-aware rule generalises.",
  "source": "commit message"
 },
 "paragraphs_changed": 4,
 "changes": [
  {
   "section": "Abstract",
   "old": "Personal AI assistants that accumulate months of memory face four gaps that general-purpose retrieval systems do not close: constant-time concept lookup degrades to linear search at scale, retrieval scoring ignores the agent's current task, memory writes can silently introduce contradictions, and context compaction permanently destroys information that was used once but never queried again. We present **MNEMOSYNE**, a plugin-layered enhancement suite that addresses all four gaps without modifying the underlying memory-core codebase. MNEMOSYNE registers four hooks — `retrieval_pre`, `before_message_write`, `before_compaction`, and `after_compaction` — on top of OpenClaw's markdown-first memory system. A concept index and compaction-aware capture are deployed in production; task-conditioned retrieval scoring and the contradiction gate are scaffolded for the next release. We also describe how the contradiction gate becomes a bi-temporal validity layer (§9.5): rather than blocking or warning, a contradicting write *supersedes* the prior fact by closing its validity interval, so the corpus retains full history and every retrieval can ask \"what is true now\" versus \"what was true then.\" This is not a paper design only — memory-core ships the validity columns, the temporal search predicate, and the supersede writer, leaving MNEMOSYNE to route the gate's decision into a substrate that already exists. The plugin architecture permits marketplace distribution as a single installable unit.",
   "new": "Personal AI assistants that accumulate months of memory face four gaps that general-purpose retrieval systems do not close: constant-time concept lookup degrades to linear search at scale, retrieval scoring ignores the agent's current task, memory writes can silently introduce contradictions, and context compaction permanently destroys information that was used once but never queried again. We present **MNEMOSYNE**, a plugin-layered enhancement suite that addresses all four gaps without modifying the underlying memory-core codebase. MNEMOSYNE registers four hooks — `retrieval_pre`, `before_message_write`, `before_compaction`, and `after_compaction` — on top of OpenClaw's markdown-first memory system. A concept index and compaction-aware capture are deployed in production; task-conditioned retrieval scoring and the contradiction gate are scaffolded for the next release. We also describe how the contradiction gate becomes a bi-temporal validity layer (§9.5): rather than blocking or warning, a contradicting write *supersedes* the prior fact by closing its validity interval, so the corpus retains full history and every retrieval can ask \"what is true now\" versus \"what was true then.\" The validity substrate is not paper-only — memory-core already ships the validity columns, the temporal search predicate, and the supersede writer, so MNEMOSYNE has only to route the gate's decision into it. The plugin packages all four features as a single installable unit for marketplace distribution.",
   "marked": "Personal AI assistants that accumulate months of memory face four gaps that general-purpose retrieval systems do not close: constant-time concept lookup degrades to linear search at scale, retrieval scoring ignores the agent's current task, memory writes can silently introduce contradictions, and context compaction permanently destroys information that was used once but never queried again. We present **MNEMOSYNE**, a plugin-layered enhancement suite that addresses all four gaps without modifying the underlying memory-core codebase. MNEMOSYNE registers four hooks — `retrieval_pre`, `before_message_write`, `before_compaction`, and `after_compaction` — on top of OpenClaw's markdown-first memory system. A concept index and compaction-aware capture are deployed in production; task-conditioned retrieval scoring and the contradiction gate are scaffolded for the next release. We also describe how the contradiction gate becomes a bi-temporal validity layer (§9.5): rather than blocking or warning, a contradicting write *supersedes* the prior fact by closing its validity interval, so the corpus retains full history and every retrieval can ask \"what is true now\" versus \"what was true then.\" [-This-] {+The validity substrate+} is not [-a paper design only-] {+paper-only+} — memory-core {+already+} ships the validity columns, the temporal search predicate, and the supersede writer, [-leaving-] {+so+} MNEMOSYNE {+has only+} to route the gate's decision into [-a substrate that already exists.-] {+it.+} The plugin [-architecture permits marketplace distribution-] {+packages all four features+} as a single installable [-unit.-] {+unit for marketplace distribution.+}"
  },
  {
   "section": "4.1 Design",
   "old": "The concept index exploits a simple observation: a personal assistant's memory corpus contains a finite vocabulary of recurring concepts — project names, people, tools, error classes — and mapping these concepts to their associated memory chunks offline enables constant-time retrieval at query time.",
   "new": "A personal assistant's memory corpus contains a finite vocabulary of recurring concepts — project names, people, tools, error classes. Mapping these concepts to their chunks offline turns query-time retrieval into a constant-time lookup: when a query contains a recognized concept token (e.g., \"cron\", \"invoice-export\", \"WhatsApp\"), the index returns the pre-ranked chunk list directly, bypassing the full FTS5 + vector + MMR pipeline.",
   "marked": "[-The concept index exploits a simple observation: a-] {+A+} personal assistant's memory corpus contains a finite vocabulary of recurring concepts — project names, people, tools, error [-classes — and mapping-] {+classes. Mapping+} these concepts to their [-associated memory-] chunks offline [-enables-] {+turns query-time retrieval into a+} constant-time [-retrieval at-] {+lookup: when a+} query [-time.-] {+contains a recognized concept token (e.g., \"cron\", \"invoice-export\", \"WhatsApp\"), the index returns the pre-ranked chunk list directly, bypassing the full FTS5 + vector + MMR pipeline.+}"
  },
  {
   "section": "4.1 Design",
   "old": "When a user query contains a recognized concept token (e.g., \"cron\", \"invoice-export\", \"WhatsApp\"), the index returns the pre-ranked chunk list directly, bypassing the full FTS5 + vector + MMR pipeline.",
   "new": null,
   "marked": "[-When a user query contains a recognized concept token (e.g., \"cron\", \"invoice-export\", \"WhatsApp\"), the index returns the pre-ranked chunk list directly, bypassing the full FTS5 + vector + MMR pipeline.-]"
  },
  {
   "section": "9.5.3 Validity-Aware Task Scoring",
   "old": null,
   "new": "The scorer already carries the right primitive: its event-level scoring applies a fixed `SUPERSESSION_DISCOUNT` (0.1) to any event a newer version has replaced, so a superseded fact is multiplicatively penalized rather than dropped. The validity-aware guard generalizes that constant into a mode-sensitive damp keyed on the query's `asOf`, so the penalty applies only in `valid-at` / `all` retrieval, not unconditionally.",
   "marked": "{+The scorer already carries the right primitive: its event-level scoring applies a fixed `SUPERSESSION_DISCOUNT` (0.1) to any event a newer version has replaced, so a superseded fact is multiplicatively penalized rather than dropped. The validity-aware guard generalizes that constant into a mode-sensitive damp keyed on the query's `asOf`, so the penalty applies only in `valid-at` / `all` retrieval, not unconditionally.+}"
  }
 ]
}
