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:
- No alternatives documented
💭 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
libs/libs-ai/ai-generation-hub/src/lib/services/generation-hub.service.tslibs/libs-ai/vitto-chat/src/lib/components/generation/chat-module-panel/chat-module-panel.component.tslibs/libs-ai/gograb-ai-lib/src/lib/services/workflow-state.service.tslibs/libs-ai/gograb-ai-lib/src/lib/services/workflow-sse-client.service.tslibs/libs-ai/gograb-ai-lib/src/lib/services/generation-router.service.tsapps/gograb-space/src/app/app.routes.ts
🔗 Related
- Decision ID:
dev_1773254450679_jebhlxe - Session: 204
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation