Architecture: How should Vitto become a context-native AI co-pilot that se...

Documentation for Sessions

🏗️ Architecture: How should Vitto become a context-native AI co-pilot that se...

Date: 2026-03-04
Time: 12:47:37 UTC
Session: gspace1-174.15
Agent: angular
Confidence: 93%
Status: ✅ Documented


📋 Decision Context

Question:

How should Vitto become a context-native AI co-pilot that sees, understands, and acts on every page of the platform?

Task: Session 174: Super Vitto Context plan for route-aware AI co-pilot


🎯 Decision Made

Chosen:

3-layer architecture: (1) Route-First Navigation — convert all tab-based UIs to child routes (/vitto/skills/marketplace, /vitto/skills/builder, etc.) so URL IS the context signal; (2) Chat-Beside-Hub — persistent chat panel in VittoUnifiedShellComponent beside router-outlet, not a separate page, with resize + hotkey + auto-context; (3) Form-Aware Context — VittoPageContextRegistry where each routed component registers readable state (form fields, validation errors) and executable actions (fillSkillForm, navigateToTab) that Vitto can invoke directly via Angular signals. Inspired by CopilotKit useCopilotReadable/useCopilotAction, Hashbrown browser-side tool calling, A2UI declarative component rendering, and Cursor's file-level context model.

Options Considered:


💭 Reasoning

Current architecture has chat on separate page (/vitto/chat) and tabs stored in IndexedDB — Vitto can't see what tab the user is on and can't interact with forms. The URL must be the single source of truth for context (not internal signals). Chat beside content (not on a separate page) is the proven pattern from Cursor/Windsurf/Copilot — every successful AI assistant sits beside the work, not in a different window. Form-aware context with action execution is the CopilotKit/Hashbrown pattern — the AI reads form state and writes back via registered handlers, using Angular's DI system for zero-latency browser-side tool calling.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation