Skip to content

feat: replace search-centric memory model with briefing-centric, TTL-decaying model - #62

Merged
MichielDean merged 1 commit into
mainfrom
feat/briefing-memory-model
Nov 12, 2026
Merged

MichielDean merged 1 commit into
mainfrom
feat/briefing-memory-model

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

Summary

Implements tickets #54-#60 from spec #53 — replaces the search-centric, discipline-enforced memory model with a briefing-centric, TTL-decaying model.

What changed

Type system collapse (expand-contract):

  • Migrations 008-010: add pinned column, register stable/volatile/log alongside legacy types, then remove legacy types
  • DefaultRegisteredTypes now returns only the 3 new tiers

New store methods:

  • Pin/Unpin — pin stable memories (TTL exempt)
  • PruneExpired — delete non-pinned memories past valid_until
  • GenerateBriefing — assemble pinned + recent volatile + top-5 recent stable, capped ~25 lines
  • MigrateTypes — one-time migration (type remap, Jaccard dedup, retroactive TTL, log compression)
  • TouchBatch/Get — TTL reset on retrieval for stable/volatile

New CLI commands: llmem brief, llmem amend, llmem pin/unpin, llmem migrate-types

Removed: internal/dream package, internal/systemd package, llmem dream/invalidate/stats commands, dream config schema, legacy 7 type registration

Semantic change: valid_until filter changed from IS NULL to (IS NULL OR > datetime('now')) so 'valid only' means 'not expired' not 'has no expiry'

Plugin: session.created hook calls llmem brief instead of llmem search

Tests

332 passing (up from316). Full coverage for TTL auto-computation, pin/unpin, briefing generation/capping/health, TTL pruning, TTL reset on retrieval, migration (retyping, dedup, retroactive TTL, log compression, idempotency, dry-run), legacy type rejection.

Follow-up

Ticket #61 (harness instructions + skill rewrite + promptfoo evals) is in the lobsterdog repo.

…decaying model

Implement tickets #54-#60 from issue #53.

Type system collapse (expand-contract):
- Migration 008: add pinned column to memories table
- Migration 009: register stable/volatile/log alongside legacy 7 types
- Migration 010: remove legacy 7 types (contract phase)

New store methods:
- Pin/Unpin: pin stable memories (TTL exempt, valid_until=NULL)
- PruneExpired: delete non-pinned memories past valid_until
- GenerateBriefing: assemble pinned + recent volatile + top-5 recent stable, capped ~25 lines
- MigrateTypes: one-time migration (type remap, Jaccard dedup, retroactive TTL, log compression)
- TouchBatch/Get: TTL reset on retrieval for stable/volatile (not log, not pinned)

New CLI commands:
- llmem brief: generate session briefing
- llmem amend: session-end cycle (volatile update, pin/unpin, prune, regenerate briefing)
- llmem pin/unpin <id>: pin/unpin stable memories
- llmem migrate-types: one-time migration with --dry-run

Removed:
- internal/dream package (3-phase consolidation system)
- internal/systemd package (dream timer generation)
- llmem dream/invalidate/stats commands
- DreamConfig from config schema
- Legacy 7 type registration

Semantic change:
- valid_until filter changed from IS NULL to (IS NULL OR > datetime('now'))
  so 'valid only' means 'not expired' not 'has no expiry'
- Default add type changed from 'fact' to 'stable'
- Type priority weights updated for 3 new tiers

Plugin change:
- session.created hook calls llmem brief instead of llmem search
- compaction hook calls llmem brief

Extraction prompt updated to use stable/volatile/log types.

Tests: 332 passing (up from 316). Covers TTL auto-computation, pin/unpin, briefing
generation/capping/health, TTL pruning, TTL reset on retrieval, migration (retyping,
dedup, retroactive TTL, log compression, idempotency, dry-run), legacy type rejection.
@MichielDean MichielDean added the enhancement New feature or request label Nov 12, 2026
@MichielDean
MichielDean merged commit 673cf1a into main Nov 12, 2026
2 checks passed
@MichielDean
MichielDean deleted the feat/briefing-memory-model branch November 12, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant