Add infrastructure component to project.json and generate spec
Adds infrastructure components to project.json and generates detailed specifications.
/plugin marketplace add vanman2024/dev-lifecycle-marketplace/plugin install foundation@dev-lifecycle-marketplace<component-type> "<description>"Arguments: $ARGUMENTS
Goal: Add infrastructure component with proper analysis and spec generation.
Phase 1: Parse Arguments Goal: Extract component type and description
Actions:
<component-type> "<description>"Phase 2: Initial Assessment Goal: Understand current state and determine next ID
Actions:
Read schema templates:
Read project.json:
Read features.json:
Check for duplicates:
Display: "Next ID: I[XXX], Found [N] existing infrastructure items"
Update todos
Phase 3: Launch Infrastructure Writer Agent Goal: Deep analysis and spec generation
Actions:
Task(
description="Analyze and create infrastructure I[XXX]",
subagent_type="foundation:infrastructure-writer",
prompt="Create infrastructure component I[XXX]: [COMPONENT_TYPE]
Description: [DESCRIPTION]
Context provided:
- Next ID: I[XXX]
- Existing infrastructure count: [N]
Your tasks:
1. Analyze what this component depends on (look at description keywords)
2. Calculate phase: phase = max(dependency phases) + 1, or 0 if no deps
3. Determine what features/infrastructure this blocks
4. Generate spec files:
- specs/infrastructure/phase-[N]/[number]-[name]/spec.md
- specs/infrastructure/phase-[N]/[number]-[name]/tasks.md
Return JSON:
{
'id': 'I0XX',
'name': 'component-name',
'phase': N,
'depends_on': ['I001', 'I010'],
'blocks': ['F040', 'I050'],
'spec_path': 'specs/infrastructure/phase-N/...',
'files_created': ['spec.md', 'tasks.md']
}"
)
Phase 4: Update project.json Goal: Add component to infrastructure section
Actions:
{
"id": "[from agent]",
"name": "[COMPONENT_TYPE]",
"description": "[DESCRIPTION]",
"priority": "high",
"phase": [from agent],
"depends_on": [from agent],
"blocks": [from agent]
}
Phase 5: Sync features.json Goal: Update features that depend on this infrastructure
Actions:
Phase 6: Summary Goal: Report results and next steps
Actions:
✅ Infrastructure Component Added: I[XXX]
Component: [COMPONENT_TYPE]
Phase: [N]
Depends on: [list]
Blocks: [list]
Files Created:
- [spec_path]/spec.md
- [spec_path]/tasks.md
Features Updated: [list or "None"]
Next Steps:
- Review spec in [spec_path]/
- Run /implementation:execute I[XXX] to build it