Architecture: How should Vitto gain cross-session memory and smart routing...

Documentation for Sessions

🏗️ Architecture: How should Vitto gain cross-session memory and smart routing...

Date: 2026-02-05
Time: 18:22:13 UTC
Session: editor2-92.6
Agent: angular
Confidence: 85%
Status: ✅ Documented


📋 Decision Context

Question:

How should Vitto gain cross-session memory and smart routing?

Task: Not specified


🎯 Decision Made

Chosen:

Three-part integration: (1) gatherCrossSessionIntelligence() method using EpisodicMemoryService.recallEpisodes() + LearningService.getSimilarDecisions(), stored in handoff-keyed Map cache and injected into Claude CLI and AI execution prompts. (2) Pattern recognition logging when high-relevance episodes or proven decisions are found. (3) Enhanced findBestAgent() scoring: success rate (40pts) + availability (30pts) + response time (20pts) + experience (10pts).

Options Considered:


💭 Reasoning

Cross-session memory requires both episode recall (EpisodicMemoryService) and decision recall (LearningService). Using a Map cache keyed by handoffId cleanly passes context through the execution pipeline without modifying the Handoff interface. Injecting recommendations into prompts (both Claude CLI context and AI system prompt) makes the intelligence actionable. For routing, enhancing the existing findBestAgent() with scoring automatically improves all handoff routing without needing to modify each delegation method.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation