Architecture: How should Vitto learn from successful tasks and reuse that ...
Documentation for Sessions
🏗️ Architecture: How should Vitto learn from successful tasks and reuse that ...
Date: 2026-03-11
Time: 04:20:36 UTC
Session: gspace1-202.5
Agent: angular
Confidence: 85%
Status: ✅ Documented
📋 Decision Context
Question:
How should Vitto learn from successful tasks and reuse that knowledge?
Task: S202 Phase 5 skill system
🎯 Decision Made
Chosen:
Two-service approach: SkillExtractionService (auto-generates skills from successful first-attempt tasks with 4 quality gates) + SkillRetrievalService (finds relevant skills by trigger/tag matching, injects top 3 into system prompt at priority 4). Built on existing SkillManagerService infrastructure.
Options Considered:
- Trigger/tag matching retrieval (chosen — fast, sufficient at scale)
- Vector embedding similarity search (overkill at current skill count)
- LLM-based relevance scoring per task (expensive, slow)
- Manual skill curation only (no auto-learning)
💭 Reasoning
The VittoSkill schema and SkillManagerService already existed (Sessions 100-128) with full CRUD, versioning, security vetting, and marketplace. What was missing was the intelligence loop: extraction (task→skill) and retrieval (skill→prompt). Quality gates prevent brute-force solutions from becoming skills: must be successful, first-attempt, under 2x average token cost, and use at least one tool. Retrieval uses trigger+tag matching (fast, no vector search needed at current scale).
📁 Files Involved
APIs/backend-vitto-api/src/app/engine/skill-extraction.service.tsAPIs/backend-vitto-api/src/app/engine/skill-retrieval.service.tsAPIs/backend-vitto-api/src/app/engine/context-assembly.service.tsAPIs/backend-vitto-api/src/app/engine/vitto-engine.service.ts
🔗 Related
- Decision ID:
dev_1773202836719_fjxjte4 - Session: 202
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation