Architecture: How to implement Phases 2-5 of the agent intelligence enhanc...
Documentation for Sessions
🏗️ Architecture: How to implement Phases 2-5 of the agent intelligence enhanc...
Date: 2026-03-01
Time: 02:04:40 UTC
Session: gspace1-158.4
Agent: backend
Confidence: 87%
Status: ✅ Documented
📋 Decision Context
Question:
How to implement Phases 2-5 of the agent intelligence enhancement (Contextual Identity, Ambient Awareness, Skill Composition, Multi-Modal Memory, Agent Specialization, Platform Model Evolution)?
Task: Session 158: Phases 2-5 Agent Intelligence Enhancement implementation
🎯 Decision Made
Chosen:
Created 7 new backend services and 3 new schemas across both backends. Phase 2A: IdentitySynthesisService + ProjectIdentity schema, injected into PhaseExecutor ANALYZE phase. Phase 2B: EventBusService + WebhookActionExecutorService with @OnEvent decorators. Phase 3: SkillCompositionService with DAG resolution + VittoSkill extended with dependencies/compositeType/outputSchema. Phase 4A: VisualMemoryService + VittoMemory extended with attachments[]. Phase 4B: AgentSpecializationService + AgentSpecialization + SharedPattern schemas in backend-ai-api. Phase 5: PlatformModelService enhanced with refreshKnowledge(), learned facts, daily cron at 6am. Frontend: IdentityViewerComponent + all API methods + routes.
Options Considered:
- No alternatives documented
💭 Reasoning
All 5 phases build on the Phase 1 feedback loop. Each phase touches existing services minimally (1-2 modifications per file) while adding new standalone services. Key architectural choices: (1) IdentitySynthesis uses rule-based v1 to avoid LLM cost during bootstrap, with v2 LLM path planned. (2) EventBus uses NestJS EventEmitter2 for typed event dispatch, avoiding custom pub/sub. (3) SkillComposition uses DAG with topological sort for dependency resolution. (4) AgentSpecialization uses @Optional() @InjectModel for graceful degradation. (5) PlatformModel refresh is additive-only (learned facts appended, never replacing hardcoded base).
📁 Files Involved
APIs/backend-vitto-api/src/app/mind/schemas/project-identity.schema.tsAPIs/backend-vitto-api/src/app/mind/identity-synthesis.service.tsAPIs/backend-vitto-api/src/app/engine/phase-executor.service.tsAPIs/backend-vitto-api/src/app/connectivity/event-bus.service.tsAPIs/backend-vitto-api/src/app/connectivity/webhook-action-executor.service.tsAPIs/backend-vitto-api/src/app/engine/skill-composition.service.tsAPIs/backend-vitto-api/src/app/engine/skill-manager.service.tsAPIs/backend-vitto-api/src/app/mind/visual-memory.service.tsAPIs/backend-vitto-api/src/app/mind/schemas/vitto-memory.schema.tsAPIs/backend-vitto-api/src/app/mind/platform-model.service.tsAPIs/backend-ai-api/src/app/agents/services/agent-specialization.service.tsAPIs/backend-vitto-api/src/app/mind/mind.module.tsAPIs/backend-vitto-api/src/app/engine/engine.module.tsAPIs/backend-vitto-api/src/app/connectivity/connectivity.module.tsAPIs/backend-vitto-api/src/app/engine/vitto.controller.tslibs/libs-ai/vitto-hub/src/lib/services/vitto-api.service.tslibs/libs-ai/vitto-hub/src/lib/components/memory/identity-viewer/identity-viewer.component.tslibs/libs-ai/vitto-hub/src/lib/routes/vitto-hub.routes.ts
🔗 Related
- Decision ID:
dev_1772330677252_pyfk9lq - Session: 158
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation