Architecture: How to enable faster module generation without sacrificing q...
Documentation for Sessions
🏗️ Architecture: How to enable faster module generation without sacrificing q...
Date: 2026-03-10
Time: 21:12:33 UTC
Session: gspace1-200.6
Agent: architecture
Confidence: 85%
Status: ✅ Documented
📋 Decision Context
Question:
How to enable faster module generation without sacrificing quality?
Task: S200: Parallel module generation
🎯 Decision Made
Chosen:
Dependency-aware parallel batching: buildParallelBatches() groups independent modules (no unresolved deps) into concurrent batches. PARALLEL_MODULE_GEN_BATCH env var controls concurrency (default: 3). Modules with dependencies wait for prior batches to complete.
Options Considered:
- Keep sequential generation
- Full parallel with no inter-module context
- Dependency-aware batching (chosen)
- Worker thread pool for LLM calls
💭 Reasoning
Sequential generation of 5 modules at ~2-3 min each = 10-15 min total. With parallel batching, independent modules run concurrently — if 4 of 5 modules have no inter-dependencies, they run in one batch (~3 min) instead of 4 sequential runs (~12 min). The challenge is that later modules benefit from completedModules context (inter-module references), so we can't blindly parallelize everything. The dependency graph from normalizeDecomposeResult provides the constraints. Circular dependency detection prevents infinite loops. This could reduce generation from 15 min to 5-7 min for typical 5-module platforms.
📁 Files Involved
APIs/backend-vitto-api/src/app/module-generation/phases/execute.phase.ts
🔗 Related
- Decision ID:
dev_1773177153050_lwh01d2 - Session: 200
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation