Architecture: Should Vitto directly connect to other MongoDB databases or ...
Documentation for Sessions
🏗️ Architecture: Should Vitto directly connect to other MongoDB databases or ...
Date: 2026-02-11
Time: 19:39:10 UTC
Session: gspace1-106.3
Agent: backend
Confidence: 92%
Status: ✅ Documented
📋 Decision Context
Question:
Should Vitto directly connect to other MongoDB databases or go through APIs?
Task: Session 106: Vitto cross-database knowledge federation architecture
🎯 Decision Made
Chosen:
API-first with a Knowledge Sync Pipeline. Vitto should NOT directly connect to gograbspace MongoDB. Instead: (1) backend-ai-api exposes a /knowledge/feed endpoint that packages relevant knowledge (decisions, patterns, conventions) in a Vitto-digestible format, (2) Vitto periodically syncs via a scheduled job (KnowledgeSyncService), (3) Vitto writes its execution outcomes back via the existing emitOrchestrationEvent and logDecision APIs. This preserves service boundaries while enabling bidirectional learning.
Options Considered:
- No alternatives documented
💭 Reasoning
Direct MongoDB cross-connection violates service boundaries and creates tight coupling. If gograbspace schema changes, Vitto breaks. API-mediated sync is slower but maintainable. The BackendAiClientService already has methods like findSimilarDecisions, getConventions, getLearningContext. The gap is that these are called on-demand per task, not systematically ingested into Vitto's Mind. A scheduled sync job solves this without architectural coupling.
📁 Files Involved
apis/backend-vitto-api/src/app/connectivity/backend-ai-client.service.tsapis/backend-vitto-api/src/app/mind/mind.service.ts
🔗 Related
- Decision ID:
dev_1770838749950_xq5kzbg - Session: 106
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation