Before modifying the memory system:
- Read docs/02-memory-system.md — the full memory specification
- Read docs/08-decisions-log.md #005 (three-tier architecture) and #006 (retrieval scoring)
- Understand the three tiers:
- Episodic: raw timestamped events (written by Signal Ingestion, never modified)
- Semantic: distilled facts (written by Reflection Engine during synthesis)
- Procedural: operating rules (generated by Reflection Engine from insights)
Key constraints:
- Retrieval precision > retrieval volume (3-5 high-signal memories, not 50 facts)
- Three-axis scoring: recency × importance × relevance
- Dynamic weight adjustment based on query context (ACAN pattern)
- Memory decay: old episodic memories decay in recency, never deleted
- Semantic facts have confidence scores that increase with confirming evidence
- Every semantic fact must be traceable to episodic evidence (sourceMemoryIDs)
- Every procedural rule must be traceable to insights (sourceInsightIDs)
Persistence:
- Local: JSON via DataStore actor for offline access
- Remote: Supabase Postgres for durability and reflection engine access