Architecture: How to unify the disconnected learning pipeline (backend-ai-...

Documentation for Sessions

🏗️ Architecture: How to unify the disconnected learning pipeline (backend-ai-...

Date: 2026-03-02
Time: 19:23:14 UTC
Session: gspace1-166.3
Agent: backend
Confidence: 92%
Status: ✅ Documented


📋 Decision Context

Question:

How to unify the disconnected learning pipeline (backend-ai-api) with Vitto's execution engine (backend-vitto-api)?

Task: Unified Agent Architecture — Phases 1-2


🎯 Decision Made

Chosen:

Phase 1: Vitto reads platform intelligence (core rules + patterns + similar decisions) during context assembly. Phase 2: Vitto posts execution outcomes back, delegates generate synthetic training examples, LearningSync cron enriches sub-agents with golden decisions.

Options Considered:


💭 Reasoning

The learning pipeline was fully functional in backend-ai-api (200 patterns, 10 core rules, pattern mining every 6h, outcome detection every 5 min) but Vitto never read it. getLearningContext() existed but was never called. This created two isolated brains. Solution: one new typed wrapper (getLearningIntelligence), one injection into ContextAssemblyService's parallel fetch, one injection into SubAgentService.buildSystemPrompt, one postExecutionOutcome call in engine, one synthetic training generator in delegation-manager, and one LearningSync cron. All additive, no schema changes, graceful degradation on backend-ai-api unavailability.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation