Repository navigation
feat: replace search-centric memory model with briefing-centric, TTL-decaying model - #62
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
pinnedcolumn, registerstable/volatile/logalongside legacy types, then remove legacy typesDefaultRegisteredTypesnow returns only the 3 new tiersNew store methods:
Pin/Unpin— pin stable memories (TTL exempt)PruneExpired— delete non-pinned memories pastvalid_untilGenerateBriefing— assemble pinned + recent volatile + top-5 recent stable, capped ~25 linesMigrateTypes— one-time migration (type remap, Jaccard dedup, retroactive TTL, log compression)TouchBatch/Get— TTL reset on retrieval for stable/volatileNew CLI commands:
llmem brief,llmem amend,llmem pin/unpin,llmem migrate-typesRemoved:
internal/dreampackage,internal/systemdpackage,llmem dream/invalidate/statscommands, dream config schema, legacy 7 type registrationSemantic change:
valid_untilfilter changed fromIS NULLto(IS NULL OR > datetime('now'))so 'valid only' means 'not expired' not 'has no expiry'Plugin: session.created hook calls
llmem briefinstead ofllmem searchTests
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.