Skip to content

record identity, UMP kinds, and lifecycle metadata - #389

Merged
yogthos merged 2 commits into
mainfrom
memory-improvements
Jun 8, 2026
Merged

record identity, UMP kinds, and lifecycle metadata#389
yogthos merged 2 commits into
mainfrom
memory-improvements

Conversation

@yogthos

@yogthos yogthos commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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

Yogthos and others added 2 commits June 8, 2026 12:19
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>
@yogthos
yogthos merged commit 2dab13a into main Jun 8, 2026
11 checks passed
yogthos pushed a commit that referenced this pull request Jun 8, 2026
Two features since 0.3.1: an opt-in libkrun microVM sandbox for bash
(#372) and memory subsystem improvements — UMP kinds + identity/lifecycle
metadata, salience-weighted eviction, and a load-time threat scan (#389).
See CHANGELOG.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant