Bugfix: Why did platform generation always produce 0 modules?

Documentation for Sessions

🐛 Bugfix: Why did platform generation always produce 0 modules?

Date: 2026-03-11
Time: 15:50:37 UTC
Session: gspace1-204.4
Agent: angular
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

Why did platform generation always produce 0 modules?

Task: Not specified


🎯 Decision Made

Chosen:

PlatformGenerationService was calling backend-ai-api's 'full-configuration' workflow which only matches existing templates from a catalog. Fixed by delegating to ModuleGenerationService.startGeneration() which runs the real 6-phase pipeline (PRE-FLIGHT → ENHANCE → ANALYZE → DECOMPOSE → PLAN → EXECUTE → DEPLOY).

Options Considered:


💭 Reasoning

E2E testing revealed that the analyze phase succeeded but plan phase returned 0 modules. Tracing the code showed PlatformGenerationService called aiClient.startWorkflow({ workflowType: 'full-configuration' }) — a template selection workflow, not a decomposition workflow. The extractModulePlan() method looked for modules in manifest.navigation.menuItems or manifest.modules, but the full-configuration result doesn't have these. The real module decomposition exists in ModuleGenerationService's 6-phase pipeline which uses LLM to break requirements into modules. The fix delegates to this pipeline instead.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation