Active memory invalidation based on detected or explicit breaking changes.
When a breaking change is detected (e.g., migrating from webpack to vite), this module weakens related memories and optionally creates replacement entries.
Usage
# Auto-detect and invalidate from git history
{:ok, result} = Recollect.Invalidation.run_from_git(scope_id: workspace_id)
# Manual invalidation
Recollect.Invalidation.invalidate(scope_id, "webpack",
reason: "migrated to vite"
)
Summary
Functions
Detect migration patterns in recent git commits.
Invalidate memories matching a pattern.
Run invalidation detection from git history.
Functions
Detect migration patterns in recent git commits.
Invalidate memories matching a pattern.
Options
:reason- Why this is being invalidated:replacement- What replaces it (creates new entry with supersedes link):weaken_factor- Multiply half-life by this (default: 0.1)
Run invalidation detection from git history.
Scans recent commits for migration patterns and invalidates related memories.