Skip to content

v0.2.0 – Memory Index

Latest

Choose a tag to compare

@bitcoin21ideas bitcoin21ideas released this 18 Apr 08:47
· 12 commits to main since this release

Align v0.2.0 — Memory Index

Released: 2026-04-18

What's new

Gemini now sees every prior memory entry before processing each transcript. A flat index file (memory/memory-index.md) is fetched before the Gemini call and injected into the prompt alongside the rolling context. After each run, any new memory entries are extracted and appended to the index automatically.

This closes the core limitation of the original memory system: entries were written in isolation with no cross-session awareness. Gemini can now detect when a new decision, constraint, or pattern replaces a prior one and emit a supersedes pointer automatically — no manual tracking required.

What changed

n8n workflow — 4 new nodes:

  • Get memory index — fetches memory/memory-index.md before the Gemini call; non-fatal on 404
  • Extract index lines — parses new memory entries from Gemini output into index rows
  • Has new entries — gates the index write; skips if Gemini produced no memory entries this run
  • Update memory index — appends new rows to the index after the monthly memory file is written

n8n workflow — 2 fixes:

  • Get memory now has continueRegularOutput — workflow no longer crashes on the 1st of each month when the new monthly file doesn't exist yet
  • Decode memory handles missing file content gracefully instead of crashing on Buffer.from(undefined)

Prompt (prompts/gemini-main.md):

  • Three inputs now declared: rolling context, memory index, transcript
  • supersedes field added to OUTPUT 4 — Gemini emits it when a new entry replaces a prior one visible in the index
  • status: active field removed — redundant given append-only storage and explicit supersession

Docs:

  • memory-schema.md — status field and retraction section removed; supersession lifecycle rewritten around the index
  • architecture.md — three reads and five writes documented; notes/ → walks/ path corrected; Gemini retry behaviour corrected

Index schema

<!-- memory index v1 — one line per entry: id | type | project | summary | supersedes | affects -->
20260418-example-decision | decision | AIDev | chose X over Y for Z reason | — | —

The affects column is reserved for a future phase when graph-aware relationship linking is added to the prompt.

Upgrade notes

If running a fresh install, create memory/memory-index.md in the storage repo with the header line before the first workflow run. The workflow handles a missing file gracefully but will not create it — the file must exist.