record identity, UMP kinds, and lifecycle metadata - #389
Merged
Conversation
Port UMP 0.1 record model to dirge's memory system (dirge-g82u): - Add MemoryKind (semantic/episodic/procedural/working/identity), MemoryStatus (active/candidate/tombstoned), and MemoryLifecycle (confidence/salience/status) types, ported from UMP types.ts - Generate stable urn:ump:<base32> IDs via UUID v4 for every entry - New .dirge/memory/.meta.json sidecar keyed by FNV-1a content hash tracks id/kind/lifecycle per entry; auto-assigns IDs for existing entries on load — fully backward compatible - MemoryProvider::add() and replace() now accept optional kind param; kind defaults to procedural where not specified - memory tool JSON schema exposes kind with KINDS documentation; format_for_system_prompt prefixes entries with [kind] tag - Entries evicted during budget compaction have their metadata cleaned up; replace() and remove() also maintain the sidecar All 2534 tests pass.
…n; fix CI Builds on the Phase 1 UMP port (dirge-g82u). Three improvements plus the warnings-as-errors CI fix: - Fix CI: remove the unused `MemoryStore::all_meta` — `-D warnings` promoted the dead-code lint to an error and broke every build matrix job. - Salience-weighted eviction: compaction now evicts the LEAST-salient entry first (ties broken by age, preserving the old oldest-first behavior under uniform salience) instead of blindly dropping the oldest. Salience finally carries a real signal via kind-derived defaults (working 0.3 … identity 0.75), so transient working notes are shed before durable identity/semantic facts. - Kind-aware capture: the background-review prompt now instructs the model to classify each saved entry by UMP kind, so the Phase 1 taxonomy is actually populated instead of everything defaulting to procedural. - Load-time threat scan (read-time defense, the UMP rehydration lesson): entries reaching MEMORY.md/PITFALLS.md by hand-edit or `git pull` bypass the write-time scan, yet are injected into the system prompt — the highest-trust surface. The frozen snapshot now re-scans and withholds any entry that fails, while still injecting clean ones and leaving the on-disk file untouched. Adds 2 regression tests; full suite 2536 passing under `-D warnings`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Port UMP 0.1 record model to dirge's memory system (dirge-g82u):
Add MemoryKind (semantic/episodic/procedural/working/identity), MemoryStatus (active/candidate/tombstoned), and MemoryLifecycle (confidence/salience/status) types, ported from UMP types.ts
Generate stable urn:ump: IDs via UUID v4 for every entry
New .dirge/memory/.meta.json sidecar keyed by FNV-1a content hash tracks id/kind/lifecycle per entry; auto-assigns IDs for existing entries on load — fully backward compatible
MemoryProvider::add() and replace() now accept optional kind param; kind defaults to procedural where not specified
memory tool JSON schema exposes kind with KINDS documentation; format_for_system_prompt prefixes entries with [kind] tag
Entries evicted during budget compaction have their metadata cleaned up; replace() and remove() also maintain the sidecar