Architecture: How to integrate Vitto's memory system into the task executi...

Documentation for Sessions

🏗️ Architecture: How to integrate Vitto's memory system into the task executi...

Date: 2026-02-28
Time: 20:14:02 UTC
Session: gspace1-156.2
Agent: angular
Confidence: 90%
Status: ✅ Documented


📋 Decision Context

Question:

How to integrate Vitto's memory system into the task execution pipeline for full user context support?

Task: Not specified


🎯 Decision Made

Chosen:

Inject UserKnowledgeService into PhaseExecutorService, load user context via getPromptContextForTask() with cognitive load budgeting, inject into all 3 prompt-building phases (ANALYZE, PLAN, VERIFY). Add learnFact() to UserKnowledgeService for write-side persistence. Add saveUserMemory() to BackendAiClientService for cross-agent sync.

Options Considered:


💭 Reasoning

The memory architecture was already sophisticated (Session 106-152) with vector embeddings, tiered recall, importance decay, and cognitive load budgeting. But PhaseExecutorService (the actual LLM prompt builder) never injected user context — it only used strategy context, platform knowledge, and space context. The fix was surgical: 3 files modified (phase-executor, user-knowledge, backend-ai-client) to connect the existing read path and add the missing write path. Also deleted structure-management (5,661 LOC, 0 consumers) as Phase 3 of the library consolidation plan.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation