Generate infrastructure specs from project.json infrastructure section
Generates infrastructure specifications from project.json in parallel batches with phase-aware dependency ordering.
/plugin marketplace add vanman2024/dev-lifecycle-marketplace/plugin install foundation@dev-lifecycle-marketplaceproject-pathArguments: $ARGUMENTS
Goal: Generate infrastructure specifications from project.json in parallel (3-5 at a time), creating specs/infrastructure/ directories with phase-aware dependency ordering.
CRITICAL: Read the infrastructure vs features classification guide:
@~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/docs/INFRASTRUCTURE-VS-FEATURES.md
This document defines what counts as infrastructure vs features and must be referenced when generating specs.
Core Principles:
Infrastructure items are generated in dependency order:
Phase 0: Check Existing Project Data Goal: Verify project.json exists and contains infrastructure section
Actions:
Create todo list using TodoWrite
CRITICAL: Read schema templates for consistent structure:
Determine project path (use $ARGUMENTS if provided, otherwise current directory)
Check for project.json: !{bash test -f .claude/project.json && echo "✅ EXISTS" || echo "⚠️ MISSING"}
If missing: Display error "Run /foundation:detect first to create project.json" and exit
Read project.json: @.claude/project.json
Read settings.json: @.claude/settings.json
Extract infrastructure section
Display: "Found [X] infrastructure components"
Auto-Detect CI/CD Infrastructure: If deployment plugin enabled in settings.json AND ci_cd.platform exists in project.json:
Phase 1: Create Phase Directory Structure Goal: Set up phase-based folder organization
Actions:
Phase 2: Check Existing Infrastructure Specs Goal: Determine which infrastructure components already have specs
Actions:
Phase 3: Prepare Infrastructure List Goal: Extract infrastructure components that need specs, grouped by phase
Actions:
phase field (0-5)Phase 4: Parallel Infrastructure Spec Generation (Batch 1) Goal: Generate first 3-5 infrastructure specs in parallel
Actions:
For each component in BATCH 1, launch parallel infrastructure-writer agent:
Task(description="Generate infrastructure spec for authentication", subagent_type="foundation:infrastructure-writer", prompt="You are the infrastructure-writer agent. Create complete infrastructure specification for this component.
Component Data from project.json:
Your Task: Create infrastructure spec in the PHASE FOLDER:
Directory: specs/infrastructure/phase-{phase}/{number}-{component-name}/ Files:
Requirements:
Deliverable: Complete infrastructure spec directory in phase folder")
Launch 3-5 Task() calls in parallel for each component in batch 1
Phase 5: Wait and Validate Batch 1 Goal: Ensure all batch 1 specs generated successfully
Actions:
Phase 6: Continue Additional Batches (if needed) Goal: Generate remaining infrastructure specs in batches
Actions:
Phase 7: Summary Goal: Report what was generated
Actions:
Mark all todos complete
Count total infrastructure specs created per phase folder
Display:
✅ Generated: [N] infrastructure specs
Directory Structure:
specs/infrastructure/
├── phase-0/ ([X] items - Core Foundation)
│ ├── 001-authentication/
│ ├── 003-sentry-error-tracking/
│ └── ...
├── phase-1/ ([X] items - First Dependencies)
│ ├── 009-error-handling/
│ └── ...
├── phase-2/ ([X] items)
├── phase-3/ ([X] items)
├── phase-4/ ([X] items)
└── phase-5/ ([X] items - Final Integration)
Build Order: Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5
Next Steps:
Difference from Feature Specs: