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:


💭 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


🔗 Related


Auto-generated by MCP Smart Consolidation