Architecture: How should generated platform projects be structured for AI ...
Documentation for Sessions
🏗️ Architecture: How should generated platform projects be structured for AI ...
Date: 2026-03-11
Time: 12:50:51 UTC
Session: gspace1-203.2
Agent: angular
Confidence: 90%
Status: ✅ Documented
📋 Decision Context
Question:
How should generated platform projects be structured for AI editing and standalone deployment?
Task: S203: Platform generation quality and edition pipeline
🎯 Decision Made
Chosen:
Flat src/ structure (no src/lib/ layer), category-aware module paths (modules/{category}/{slug}/src/), app shell at repo root (src/app/), project-specific README, and semantic module deduplication
Options Considered:
- Keep NX src/lib/ convention for compatibility
- Flatten to src/ for AI-friendly editing
- Fully flat (no src/ at all)
💭 Reasoning
Generated projects deploy standalone to Cloudflare Pages, not via NX. The src/lib/ convention adds noise for AI editing (more path segments to hallucinate). Shorter paths = cleaner file tree in Studio, more reliable AI code generation, and no packaging layer needed. Category in module path enables proper organization without flat-listing all modules.
📁 Files Involved
APIs/backend-ai-api/src/app/workflow/generators/module-code-generator.service.tsAPIs/backend-ai-api/src/app/workflow/generators/platform-code-generator.service.tsAPIs/backend-ai-api/src/app/workflow/services/platform-deployment-bridge.service.tsAPIs/backend-ai-api/src/app/workflow/services/enhanced-validation.service.ts
🔗 Related
- Decision ID:
dev_1773233451001_hay2wem - Session: 203
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation