Architecture: How should Vitto's chat detect and adapt to different user l...
Documentation for Sessions
🏗️ Architecture: How should Vitto's chat detect and adapt to different user l...
Date: 2026-02-11
Time: 19:30:08 UTC
Session: gspace1-105.23
Agent: backend
Confidence: 90%
Status: ✅ Documented
📋 Decision Context
Question:
How should Vitto's chat detect and adapt to different user layers (developer/platform_builder/end_user)?
Task: Session 105.5: Vitto layer-aware chat and Mind integration
🎯 Decision Made
Chosen:
Layer detection via auth context + URL context, passed as metadata in chat requests. VittoChatService sends layer to backend, backend adapts system prompt, tool availability, and response style per layer.
Options Considered:
- No alternatives documented
💭 Reasoning
Vitto already has VittoLayer type ('developer' | 'platform_builder' | 'end_user'). The /ai-api/chat endpoint accepts context. Rather than duplicating layer detection client-side, pass the layer from the frontend (which knows the app/route/user role) and let the backend adapt. This keeps the frontend thin and the intelligence server-side.
📁 Files Involved
libs/libs-ai/gograb-ai-lib/src/lib/services/vitto-chat.service.tsapis/backend-vitto-api/src/app/types/vitto.types.ts
🔗 Related
- Decision ID:
dev_1770838208270_sv3elh5 - Session: 105
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation