Refactor: How to eliminate all duplicate generation code paths so ther...

Documentation for Sessions

♻️ Refactor: How to eliminate all duplicate generation code paths so ther...

Date: 2026-03-11
Time: 18:40:50 UTC
Session: gspace1-204.13
Agent: angular
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

How to eliminate all duplicate generation code paths so there is ONE generation orchestrator?

Task: Not specified


🎯 Decision Made

Chosen:

Vitto (backend-vitto-api) is the sole generation orchestrator. All UI paths route through WorkflowStateService -> Vitto SSE pipeline. ai-generation-hub gutted to stub, GenerationRouterService/WorkflowSSEClientService deprecated, ChatModulePanelComponent rewired. Net: -1247 lines of dead code.

Options Considered:


💭 Reasoning

The codebase had 4 parallel generation paths: (1) ai-generation-hub/GenerationHubService (own SSE to broken backend-ai-api/workflow), (2) WorkflowSSEClientService (SSE to backend-ai-api/workflow), (3) GenerationRouterService (router over WorkflowSSEClientService), (4) WorkflowStateService (SSE to Vitto). Only #4 actually works — Vitto's 7-phase pipeline (ENHANCE→ANALYZE→DECOMPOSE→PLAN→EXECUTE→INTEGRATE→DEPLOY). The others hit the old backend-ai-api full-configuration workflow which was a template-selection system that never decomposed requirements — always 0 modules. Consolidation: redirect ai-generation-hub route to /vibe, gut the service to a stub, rewire ChatModulePanelComponent to WorkflowStateService, deprecate the old services.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation