Architecture: How should Vitto be restructured from a god-class embedded i...

Documentation for Sessions

🏗️ Architecture: How should Vitto be restructured from a god-class embedded i...

Date: 2026-02-07
Time: 18:10:49 UTC
Session: gspace1-98.2
Agent: backend
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How should Vitto be restructured from a god-class embedded in backend-ai-api?

Task: Vitto Super-Agent separation and rebuild


🎯 Decision Made

Chosen:

Extract Vitto into a standalone NX backend app (backend-vitto-api) on port 3003 with its own MongoDB (vitto-mind), provider-agnostic LLM abstraction, 4-phase workflow (ANALYZE->PLAN->EXECUTE->VERIFY), and full data access to all 3 backends via HTTP/WS

Options Considered:

  1. Keep Vitto embedded in backend-ai-api and refactor in-place
  2. Extract as NX library shared between apps
  3. Build standalone API (backend-vitto-api) with own database
  4. Use microservices with message queue

💭 Reasoning

The 2119-line VittoOrchestratorService was a god-class that auto-claimed handoffs and generated text without tools/quality checks. A standalone API provides: process isolation, independent scaling, own operational memory (Mind DB), provider flexibility (Claude/OpenAI/Gemini), and proper separation of concerns. The agentic process in backend-ai-api (HandoffService, AgentService, WebSocket) works independently — removing Vitto doesn't break anything.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation