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— fetchesmemory/memory-index.mdbefore the Gemini call; non-fatal on 404Extract index lines— parses new memory entries from Gemini output into index rowsHas new entries— gates the index write; skips if Gemini produced no memory entries this runUpdate memory index— appends new rows to the index after the monthly memory file is written
n8n workflow — 2 fixes:
Get memorynow hascontinueRegularOutput— workflow no longer crashes on the 1st of each month when the new monthly file doesn't exist yetDecode memoryhandles missing file content gracefully instead of crashing onBuffer.from(undefined)
Prompt (prompts/gemini-main.md):
- Three inputs now declared: rolling context, memory index, transcript
supersedesfield added to OUTPUT 4 — Gemini emits it when a new entry replaces a prior one visible in the indexstatus: activefield removed — redundant given append-only storage and explicit supersession
Docs:
memory-schema.md— status field and retraction section removed; supersession lifecycle rewritten around the indexarchitecture.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.