Skip to content

[Feature] Memory hygiene — stale detection, contradiction flagging, obsolete archival #8

@rahilp

Description

@rahilp

Why
As the second brain grows, it accumulates noise. Old decisions get superseded, facts become stale, and duplicate-adjacent entries pile up. Right now there's no way to surface any of this automatically — the user has to manually notice and forget things. That doesn't scale.

What this covers

  • Stale memory detection: flag entries that haven't been recalled in N days and contain time-sensitive language ("we're planning to", "next week", "current version is")
  • Contradiction detection: when a new memory is stored, check if it contradicts an existing one (e.g. "auth token is X" stored twice with different values) and surface the conflict
  • Obsolete memory archival: soft-delete or archive entries that have been explicitly superseded, rather than hard-deleting them
  • Duplicate clustering: go beyond the current 0.95 block threshold and surface clusters of highly similar entries for the user to review and consolidate
    Implementation notes
  • Stale detection can run as a scheduled Cloudflare Worker (cron trigger)
  • Contradiction detection could be a post-store step using the AI binding to compare new content against top recall results
  • Archival needs a new status column in D1 (active, archived, superseded) and a filter in the recall query
  • Web UI needs an "Inbox" or "Review" view to surface flagged memories
    Related
  • Builds on existing duplicate detection (0.85/0.95 thresholds)
  • Pairs well with semantic compression ([Feature] Semantic compression — rolling summaries and project digests #9 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseRequires Database ChangesenhancementNew feature or requesttier-2Next up

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions