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:
- No alternatives documented
💭 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
APIs/backend-vitto-api/src/app/module-generation/platform-generation.service.tsAPIs/backend-vitto-api/src/app/module-generation/module-generation.service.ts
🔗 Related
- Decision ID:
dev_1773244237592_h4ujgcz - Session: 204
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation