feat(FN-1477): add memory pruning to daily insight extraction

- Add pruneStaleMemoryEntities() function to memory-insights.ts
- Integrate memory pruning into dailyInsightExtraction() workflow
- Add maxMemoryAgeDays setting (default: 30 days) for configurable pruning threshold
- Include pruned count in daily insight report summary
- Add comprehensive unit tests for memory pruning logic
- Update docs: architecture, memory-plugin-contract, settings-reference, contributing
This commit is contained in:
gsxdsm
2026-04-09 21:07:48 -07:00
parent 6f1183b8b1
commit 3ab16f6ad4
9 changed files with 928 additions and 42 deletions

View File

@@ -153,6 +153,7 @@ Fusion includes a pluggable memory backend system for storing durable project le
- **Plugin architecture**: `MemoryBackend` interface enables alternative storage backends
- **Settings integration**: `memoryEnabled` toggle controls agent prompt injection
- **Insight extraction**: Scheduled AI-powered distillation of patterns, principles, pitfalls
- **Memory pruning**: Daily extraction automatically prunes transient content from working memory
See [Memory Plugin Contract](./memory-plugin-contract.md) for the full specification.