Skip to content

Epic: Memory quality, temporal truth, and lifecycle authority #1702

Description

@dcellison

Outcome

Make Kai's semantic memory trustworthy over time. Facts should be worth retaining, traceable to the exact extraction decision that created them, resistant to duplication and fragmentation, and explicitly superseded or retracted when reality changes. Episodes should remain accurate historical records while later evidence can revise their conclusions without rewriting history.

Why this precedes other work

Memory is injected into future agent context. Low-value, duplicated, or stale memories therefore affect every agent and adapter. The current extractor runs after every successful conversational run, uses inexpensive role models by default, sees only a bounded semantic candidate set, and has no first-class active/superseded/retracted/expired fact lifecycle. Memory reflection #518 must not promote this evidence until its quality and temporal authority are trustworthy.

Product and authority principles

  • Precision is more important than maximizing extracted-memory count.
  • Model changes are selected through replayable evaluation against operator-reviewed production examples, not intuition.
  • Every extraction decision records the actual backend, provider, model, prompt version, input provenance, candidate set, and outcome without copying private conversation text into diagnostics.
  • A fact that describes current reality is different from an episode that records historical reality.
  • Supersession preserves evidence and revision history; it does not silently delete the earlier record.
  • Normal retrieval and agent context use the current active truth projection by default.
  • Conflicts, ambiguous scope, and incomplete lifecycle state fail closed.
  • Existing memories are audited through a read-only report before any bulk mutation.
  • Principal and project scopes remain isolated throughout extraction, lifecycle mutation, retrieval, and remediation.

Delivery order

The native sub-epics are authoritative and sequential:

  1. Evidence-backed extraction quality and model selection.
  2. Temporal fact and episode lifecycle authority.

Completion criteria

  • A reviewed corpus establishes measurable baselines for usefulness, factual precision, redundancy, fragmentation, scope, and episode quality.
  • Fact and episode models are chosen using reproducible evidence and can be changed independently without altering a user's conversational model.
  • Extraction cadence and candidate retrieval are deliberate, bounded, and observable.
  • Facts have canonical active/superseded/retracted/expired lifecycle semantics with durable evidence and revision history.
  • Episodes remain immutable historical events and can link to later follow-up evidence or superseded conclusions.
  • Stale and contradictory records cannot silently enter ordinary retrieval or agent context.
  • Existing memories can be reviewed and reconciled safely without unreviewed destructive mutation.
  • Installation diagnostics and installed multi-principal qualification prove model provenance, isolation, replay safety, restart continuity, and current-truth retrieval.

Non-goals

  • Automatic memory reflection or self-modification; Epic: Memory reflection and self-improvement #518 remains downstream.
  • Treating every conversational statement as a fact.
  • Replacing principal preferences with inferred facts.
  • Rewriting historical episodes to match current conditions.
  • Changing a principal's selected conversational backend or model.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureDesign decisions and architectural directionenhancementNew feature or requestepicTracks a multi-issue body of work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions