feat(FN-1399): add background memory summarization after task completion

- Add MemoryInsights class in @fusion/core for AI-powered memory audit generation
- Add post-run hook to CronRunner for triggering memory summarization after scheduled tasks
- Wire memory background processing in both dashboard and serve commands
- Add memoryAuditEnabled and memoryAuditSchedule settings for configurable automation
- Fix startup ordering: sync automation before cronRunner.start() to prevent race conditions
- Add comprehensive tests for memory-insights and dashboard/serve integration
- Update contributing.md and settings-reference.md with documentation
This commit is contained in:
gsxdsm
2026-04-09 16:14:44 -07:00
parent 8ba375549c
commit daabb51e71
13 changed files with 1803 additions and 4 deletions

View File

@@ -97,6 +97,15 @@ When enabled, agents can read/write durable project memory:
Use it for reusable patterns, constraints, and pitfalls that should persist across tasks.
### Background Memory Summarization
Fusion can automatically extract insights from working memory and distill them into long-term memory. Enable via `insightExtractionEnabled` setting:
- `.fusion/memory-insights.md` — Long-term distilled insights
- `.fusion/memory-audit.md` — Audit report after each extraction run
See [Settings Reference](./settings-reference.md#background-memory-summarization--audit) for configuration details.
## SQLite Test Runner Pitfall
When running engine tests with Vitest and `node:sqlite`, ensure the engine Vitest config uses thread pool mode: