Architecture: How should widget generation route to backend after fixing t...
Documentation for Sessions
🏗️ Architecture: How should widget generation route to backend after fixing t...
Date: 2026-01-22
Time: 15:32:20 UTC
Session: editor2-57.7
Agent: backend
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How should widget generation route to backend after fixing the broken pipeline?
Task: Session 57.2: AI Generation Pipeline Architecture
🎯 Decision Made
Chosen:
Create GenerationRouterService as unified entry point, also fix processCompletion() for backward compatibility
Options Considered:
- Fix only IntelligenceCoordinatorService.processCompletion()
- Create GenerationRouterService that routes directly to backend-api
- Call backend directly from components
💭 Reasoning
GenerationRouterService provides clean abstraction for all generation types (widget, module, image, video) routing to correct backend-api endpoints. This aligns with Session 56 decision to integrate into existing backend-ai-api (not create new service). The abstraction layer makes future PhaseExecutor integration easy - only change routing targets. Also fixed processCompletion() to parse markdown code blocks for services still using IntelligenceCoordinatorService.
📁 Files Involved
libs/libs-ai/gograb-ai/src/lib/services/generation-router.service.tslibs/libs-ai/gograb-ai/src/lib/services/intelligence-coordinator.service.ts
🔗 Related
- Decision ID:
dev_1769095939720_1ra5wvi - Session: 57
- Workspace: editor2
Auto-generated by MCP Smart Consolidation