Skip to content

[Priority 3] Separate history (immutable) from memory (curated) with explicit lifecycle #65

@marknutter

Description

@marknutter

Problem

Current memory store mixes:

  • Auto-archived session transcripts (raw history)
  • Human-curated knowledge (rlm remember entries)
  • LLM-extracted facts

No way to query 'show me curated memories, not raw session dumps' or apply different retention policies (compress old history, keep curated memories forever).

Proposal (from AIGNE paper analysis)

Add source_type field to distinguish:

  • session_history — auto-archived transcripts (immutable)
  • curated_memory — human/LLM-validated knowledge (mutable)
  • scratchpad — temporary (prune after N days)

Enable explicit lifecycle:

  • History (immutable) → Memory (curated) promotion workflow
  • Different retention policies:
    • History: compress after 90 days
    • Memory: keep forever
    • Scratchpad: delete after 7 days

Implementation

  1. Add source_type column to memory schema
  2. Tag existing entries:
    • Auto-archived sessions → session_history
    • Manual rlm remembercurated_memory
  3. Add promotion CLI: rlm promote <entry_id> (review history, extract key knowledge, store as curated)
  4. Implement retention policies (cron job or hook)
  5. Update search filters: rlm recall --source curated

Schema

ALTER TABLE memories ADD COLUMN source_type TEXT DEFAULT 'curated_memory';
-- Values: session_history, curated_memory, scratchpad

Impact

  • Clearer mental model (history vs knowledge)
  • Better data hygiene (prune temporary, compress old, preserve curated)
  • Improved recall quality (prioritize curated over raw)
  • Supports multi-agent scenarios (shared curated knowledge, private history)

Effort

2-3 days

Related

  • History/Memory/Scratchpad lifecycle from 'Everything is Context' paper
  • Persistent context repository architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions