Roadmap Position: Step 5 of 6 — historical-learning strengthening layer
Depends on: #123, #124, #125, #126, plus cron infrastructure
Enables: automatic execution of the retrospective learning pipeline
Parent Epic: #138 (Cron Infrastructure)
Related Epic: #116 (Historical Learning — this issue is the bridge)
Problem
MemoryConsolidator exists but only runs when manually called. PRD requires automatic triggers: after every N sessions, when memory exceeds size threshold, and during daemon idle.
Solution
Integration with CronScheduler
Register consolidation jobs during daemon startup:
// In AceClawDaemon.start()
cronScheduler.register(new CronJob(
"memory-consolidation",
"*/6h", // every 6 hours
() -> {
memoryConsolidator.consolidate(autoMemoryStore, projectPath, archiveDir);
sessionAnalyzer.analyzeRecentSessions(transcriptStore, indexer);
crossSessionMiner.mine(index, memory, 20);
trendDetector.detect(index, 10);
}
));
Triggers
- Time-based: every 6 hours via CronScheduler
- Session-count: after every 10 session closes
- Size-based: when any memory JSONL exceeds 50KB
- Idle-based: when daemon has no active sessions for 5 minutes
Pipeline Order
- MemoryConsolidator (dedup + merge + prune)
- SessionAnalyzer (analyze un-analyzed sessions)
- HistoricalLogIndex rebuild (if stale)
- CrossSessionPatternMiner
- TrendDetector
- Feed results to AutoMemoryStore + SkillProposalEngine
Dependencies
Acceptance Criteria
Roadmap Position: Step 5 of 6 — historical-learning strengthening layer
Depends on: #123, #124, #125, #126, plus cron infrastructure
Enables: automatic execution of the retrospective learning pipeline
Parent Epic: #138 (Cron Infrastructure)
Related Epic: #116 (Historical Learning — this issue is the bridge)
Problem
MemoryConsolidator exists but only runs when manually called. PRD requires automatic triggers: after every N sessions, when memory exceeds size threshold, and during daemon idle.
Solution
Integration with CronScheduler
Register consolidation jobs during daemon startup:
Triggers
Pipeline Order
Dependencies
everyMssub-minute triggersAcceptance Criteria