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:

  1. Fix only IntelligenceCoordinatorService.processCompletion()
  2. Create GenerationRouterService that routes directly to backend-api
  3. 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


🔗 Related


Auto-generated by MCP Smart Consolidation