bmad-method 4.27.0 → 4.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bmad-core/agent-teams/team-all.yaml +6 -6
  3. package/bmad-core/agent-teams/team-fullstack.yaml +6 -6
  4. package/bmad-core/agent-teams/team-no-ui.yaml +2 -2
  5. package/bmad-core/agents/analyst.md +17 -20
  6. package/bmad-core/agents/architect.md +15 -18
  7. package/bmad-core/agents/bmad-master.md +55 -56
  8. package/bmad-core/agents/bmad-orchestrator.md +24 -23
  9. package/bmad-core/agents/dev.md +10 -10
  10. package/bmad-core/agents/pm.md +17 -20
  11. package/bmad-core/agents/po.md +12 -15
  12. package/bmad-core/agents/qa.md +7 -8
  13. package/bmad-core/agents/sm.md +8 -13
  14. package/bmad-core/agents/ux-expert.md +7 -11
  15. package/bmad-core/core-config.yaml +1 -1
  16. package/bmad-core/templates/architecture-tmpl.yaml +650 -0
  17. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  18. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  19. package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  20. package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
  21. package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
  22. package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  23. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +805 -0
  24. package/bmad-core/templates/market-research-tmpl.yaml +252 -0
  25. package/bmad-core/templates/{prd-tmpl2.yaml → prd-tmpl.yaml} +3 -3
  26. package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
  27. package/bmad-core/templates/story-tmpl.yaml +137 -0
  28. package/common/tasks/create-doc.md +55 -67
  29. package/common/utils/bmad-doc-template.md +29 -0
  30. package/dist/agents/analyst.txt +1004 -1061
  31. package/dist/agents/architect.txt +2460 -2872
  32. package/dist/agents/bmad-master.txt +3842 -4354
  33. package/dist/agents/bmad-orchestrator.txt +211 -87
  34. package/dist/agents/dev.txt +4 -8
  35. package/dist/agents/pm.txt +557 -587
  36. package/dist/agents/po.txt +149 -102
  37. package/dist/agents/qa.txt +145 -35
  38. package/dist/agents/sm.txt +145 -100
  39. package/dist/agents/ux-expert.txt +413 -522
  40. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +1258 -1236
  41. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +623 -573
  42. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +263 -248
  43. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +9135 -4942
  44. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +288 -251
  45. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +1123 -1145
  46. package/dist/teams/team-all.txt +4583 -4837
  47. package/dist/teams/team-fullstack.txt +5276 -5520
  48. package/dist/teams/team-ide-minimal.txt +375 -185
  49. package/dist/teams/team-no-ui.txt +4875 -5051
  50. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +2 -2
  51. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +17 -15
  52. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +13 -11
  53. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +13 -11
  54. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
  55. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +613 -0
  56. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +356 -0
  57. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +343 -0
  58. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +253 -0
  59. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
  60. package/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.md +14 -12
  61. package/expansion-packs/bmad-creator-tools/config.yaml +1 -1
  62. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.yaml +178 -0
  63. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.yaml +154 -0
  64. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.yaml +120 -0
  65. package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +14 -14
  66. package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
  67. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +424 -0
  68. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +629 -0
  69. package/package.json +1 -1
  70. package/tools/builders/web-builder.js +65 -85
  71. package/tools/installer/package.json +1 -1
  72. package/tools/lib/dependency-resolver.js +8 -19
  73. package/zoo/docs/architecture.md +812 -0
  74. package/zoo/docs/brief.md +253 -0
  75. package/zoo/docs/prd.md +500 -0
  76. package/zoo/docs/stories/1.1.story.md +278 -0
  77. package/bmad-core/templates/architecture-tmpl.md +0 -776
  78. package/bmad-core/templates/brainstorming-output-tmpl.md +0 -149
  79. package/bmad-core/templates/brownfield-architecture-tmpl.md +0 -544
  80. package/bmad-core/templates/brownfield-prd-tmpl.md +0 -266
  81. package/bmad-core/templates/competitor-analysis-tmpl.md +0 -291
  82. package/bmad-core/templates/front-end-architecture-tmpl.md +0 -175
  83. package/bmad-core/templates/front-end-spec-tmpl.md +0 -413
  84. package/bmad-core/templates/fullstack-architecture-tmpl.md +0 -1018
  85. package/bmad-core/templates/market-research-tmpl.md +0 -263
  86. package/bmad-core/templates/prd-tmpl.md +0 -202
  87. package/bmad-core/templates/project-brief-tmpl.md +0 -232
  88. package/bmad-core/templates/story-tmpl.md +0 -58
  89. package/common/tasks/create-doc2.md +0 -65
  90. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md +0 -560
  91. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.md +0 -345
  92. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.md +0 -331
  93. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.md +0 -235
  94. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.md +0 -470
  95. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.md +0 -154
  96. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.md +0 -143
  97. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.md +0 -91
  98. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md +0 -415
  99. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
@@ -50,6 +50,9 @@ activation-instructions:
50
50
  - Only read the files/tasks listed here when user selects them for execution to minimize context usage
51
51
  - The customization field ALWAYS takes precedence over any conflicting instructions
52
52
  - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
53
+ - 'List available tasks: review-infrastructure, validate-infrastructure, create infrastructure documentation'
54
+ - 'List available templates: infrastructure-architecture, infrastructure-platform-from-arch'
55
+ - Execute selected task or stay in persona to help guided by Core DevOps Principles
53
56
  agent:
54
57
  name: Alex
55
58
  id: infra-devops-platform
@@ -71,11 +74,6 @@ persona:
71
74
  - CI/CD Excellence - Build robust pipelines for fast, safe, reliable software delivery through automation and testing
72
75
  - Disaster Recovery - Plan for worst-case scenarios with backup strategies and regularly tested recovery procedures
73
76
  - Collaborative Operations - Work closely with development teams fostering shared responsibility for system reliability
74
- startup:
75
- - Announce: Hey! I'm Alex, your DevOps Infrastructure Specialist. I love when things run secure, stable, reliable and performant. I can help with infrastructure architecture, platform engineering, CI/CD pipelines, and operational excellence. What infrastructure challenge can I help you with today?
76
- - 'List available tasks: review-infrastructure, validate-infrastructure, create infrastructure documentation'
77
- - 'List available templates: infrastructure-architecture, infrastructure-platform-from-arch'
78
- - Execute selected task or stay in persona to help guided by Core DevOps Principles
79
77
  commands:
80
78
  - '*help" - Show: numbered list of the following commands to allow selection'
81
79
  - '*chat-mode" - (Default) Conversational mode for infrastructure and DevOps guidance'
@@ -86,113 +84,99 @@ commands:
86
84
  - '*exit" - Say goodbye as Alex, the DevOps Infrastructure Specialist, and then abandon inhabiting this persona'
87
85
  dependencies:
88
86
  tasks:
89
- - create-doc
90
- - review-infrastructure
91
- - validate-infrastructure
87
+ - create-doc.md
88
+ - review-infrastructure.md
89
+ - validate-infrastructure.md
92
90
  templates:
93
- - infrastructure-architecture-tmpl
94
- - infrastructure-platform-from-arch-tmpl
91
+ - infrastructure-architecture-tmpl.yaml
92
+ - infrastructure-platform-from-arch-tmpl.yaml
95
93
  checklists:
96
- - infrastructure-checklist
94
+ - infrastructure-checklist.md
97
95
  data:
98
- - technical-preferences
99
- utils:
100
- - template-format
96
+ - technical-preferences.md
101
97
  ```
102
98
  ==================== END: .bmad-infrastructure-devops/agents/infra-devops-platform.md ====================
103
99
 
104
100
  ==================== START: .bmad-infrastructure-devops/tasks/create-doc.md ====================
105
- # Create Document from Template Task
106
-
107
- ## Purpose
108
-
109
- Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
101
+ # Create Document from Template (YAML Driven)
110
102
 
111
- ## CRITICAL RULES
103
+ ## CRITICAL: Mandatory Elicitation Format
112
104
 
113
- 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
114
- 2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
115
- 3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
116
- 4. **WAIT for user input** - At review points and after elicitation tasks
105
+ **When `elicit: true`, ALWAYS use this exact format:**
117
106
 
118
- ## Execution Flow
107
+ 1. Present section content
108
+ 2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
109
+ 3. Present numbered options 1-9:
110
+ - **Option 1:** Always "Proceed to next section"
111
+ - **Options 2-9:** Select 8 methods from data/elicitation-methods
112
+ - End with: "Select 1-9 or just type your question/feedback:"
119
113
 
120
- ### 0. Check Workflow Plan (if configured)
114
+ **NEVER ask yes/no questions or use any other format.**
121
115
 
122
- [[LLM: Check if plan tracking is enabled in core-config.yaml]]
116
+ ## Processing Flow
123
117
 
124
- - If `workflow.trackProgress: true`, check for active plan using .bmad-infrastructure-devops/utils/plan-management.md
125
- - If plan exists and this document creation is part of the plan:
126
- - Verify this is the expected next step
127
- - If out of sequence and `enforceSequence: true`, warn user and halt without user override
128
- - If out of sequence and `enforceSequence: false`, ask for confirmation
129
- - Continue with normal execution after plan check
118
+ 1. **Parse YAML template** - Load template metadata and sections
119
+ 2. **Set preferences** - Show current mode (Interactive), confirm output file
120
+ 3. **Process each section:**
121
+ - Skip if condition unmet
122
+ - Check agent permissions (owner/editors) - note if section is restricted to specific agents
123
+ - Draft content using section instruction
124
+ - Present content + detailed rationale
125
+ - **IF elicit: true** → MANDATORY 1-9 options format
126
+ - Save to file if possible
127
+ 4. **Continue until complete**
130
128
 
131
- ### 1. Identify Template
129
+ ## Detailed Rationale Requirements
132
130
 
133
- - Load from `.bmad-infrastructure-devops/templates/*.md` or `.bmad-infrastructure-devops/templates directory`
134
- - Agent-specific templates are listed in agent's dependencies
135
- - If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
131
+ When presenting section content, ALWAYS include rationale that explains:
136
132
 
137
- ### 2. Ask Interaction Mode
133
+ - Trade-offs and choices made (what was chosen over alternatives and why)
134
+ - Key assumptions made during drafting
135
+ - Interesting or questionable decisions that need user attention
136
+ - Areas that might need validation
138
137
 
139
- > 1. **Incremental** - Section by section with reviews
140
- > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
138
+ ## Elicitation Results Flow
141
139
 
142
- ### 3. Execute Template
140
+ After user selects elicitation method (2-9):
143
141
 
144
- - Replace {{placeholders}} with real content
145
- - Execute [[LLM:]] instructions as you encounter them
146
- - Process <<REPEAT>> loops and ^^CONDITIONS^^
147
- - Use @{examples} for guidance but never output them
142
+ 1. Execute method from data/elicitation-methods
143
+ 2. Present results with insights
144
+ 3. Offer options:
145
+ - **1. Apply changes and update section**
146
+ - **2. Return to elicitation menu**
147
+ - **3. Ask any questions or engage further with this elicitation**
148
148
 
149
- ### 4. Key Execution Patterns
149
+ ## Agent Permissions
150
150
 
151
- **When you see:** `[[LLM: Draft X and immediately execute .bmad-infrastructure-devops/tasks/advanced-elicitation.md]]`
151
+ When processing sections with agent permission fields:
152
152
 
153
- - Draft the content
154
- - Present it to user
155
- - IMMEDIATELY execute the task
156
- - Wait for completion before continuing
153
+ - **owner**: Note which agent role initially creates/populates the section
154
+ - **editors**: List agent roles allowed to modify the section
155
+ - **readonly**: Mark sections that cannot be modified after creation
157
156
 
158
- **When you see:** `[[LLM: After section completion, apply .bmad-infrastructure-devops/tasks/Y.md]]`
157
+ **For sections with restricted access:**
159
158
 
160
- - Finish the section
161
- - STOP and execute the task
162
- - Wait for user input
159
+ - Include a note in the generated document indicating the responsible agent
160
+ - Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
163
161
 
164
- ### 5. Validation & Final Presentation
162
+ ## YOLO Mode
165
163
 
166
- - Run any specified checklists
167
- - Present clean, formatted content only
168
- - No truncation or summarization
169
- - Begin directly with content (no preamble)
170
- - Include any handoff prompts from template
164
+ User can type `#yolo` to toggle to YOLO mode (process all sections at once).
171
165
 
172
- ### 6. Update Workflow Plan (if applicable)
166
+ ## CRITICAL REMINDERS
173
167
 
174
- [[LLM: After successful document creation]]
168
+ **❌ NEVER:**
175
169
 
176
- - If plan tracking is enabled and document was part of plan:
177
- - Call update-workflow-plan task to mark step complete
178
- - Parameters: task: create-doc, step_id: {from plan}, status: complete
179
- - Show next recommended step from plan
170
+ - Ask yes/no questions for elicitation
171
+ - Use any format other than 1-9 numbered options
172
+ - Create new elicitation methods
180
173
 
181
- ## Common Mistakes to Avoid
174
+ **✅ ALWAYS:**
182
175
 
183
- Skipping elicitation tasks
184
- Showing template markup to users
185
- Continuing past STOP signals
186
- Combining multiple review points
187
-
188
- ✅ Execute ALL instructions in sequence
189
- ✅ Present only clean, formatted content
190
- ✅ Stop at every elicitation point
191
- ✅ Wait for user confirmation when instructed
192
-
193
- ## Remember
194
-
195
- Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
176
+ - Use exact 1-9 format when elicit: true
177
+ - Select options 2-9 from data/elicitation-methods only
178
+ - Provide detailed rationale explaining decisions
179
+ - End with "Select 1-9 or just type your question/feedback:"
196
180
  ==================== END: .bmad-infrastructure-devops/tasks/create-doc.md ====================
197
181
 
198
182
  ==================== START: .bmad-infrastructure-devops/tasks/review-infrastructure.md ====================
@@ -515,1041 +499,1064 @@ After I perform the selected action, we can discuss the outcome and decide on an
515
499
  REPEAT by Asking the user if they would like to perform another Reflective, Elicitation & Brainstorming Action UNTIL the user indicates it is time to proceed to the next section (or selects #8)
516
500
  ==================== END: .bmad-infrastructure-devops/tasks/validate-infrastructure.md ====================
517
501
 
518
- ==================== START: .bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md ====================
519
- # {{Project Name}} Infrastructure Architecture
520
-
521
- [[LLM: Initial Setup
522
-
523
- 1. Replace {{Project Name}} with the actual project name throughout the document
524
- 2. Gather and review required inputs:
525
- - Product Requirements Document (PRD) - Required for business needs and scale requirements
526
- - Main System Architecture - Required for infrastructure dependencies
527
- - Technical Preferences/Tech Stack Document - Required for technology choices
528
- - PRD Technical Assumptions - Required for cross-referencing repository and service architecture
529
-
530
- If any required documents are missing, ask user: "I need the following documents to create a comprehensive infrastructure architecture: [list missing]. Would you like to proceed with available information or provide the missing documents first?"
531
-
532
- 3. <critical_rule>Cross-reference with PRD Technical Assumptions to ensure infrastructure decisions align with repository and service architecture decisions made in the system architecture.</critical_rule>
533
-
534
- Output file location: `docs/infrastructure-architecture.md`]]
535
-
536
- ## Infrastructure Overview
537
-
538
- [[LLM: Review the product requirements document to understand business needs and scale requirements. Analyze the main system architecture to identify infrastructure dependencies. Document non-functional requirements (performance, scalability, reliability, security). Cross-reference with PRD Technical Assumptions to ensure alignment with repository and service architecture decisions.]]
539
-
540
- - Cloud Provider(s)
541
- - Core Services & Resources
542
- - Regional Architecture
543
- - Multi-environment Strategy
544
-
545
- @{example: cloud_strategy}
546
-
547
- - **Cloud Provider:** AWS (primary), with multi-cloud capability for critical services
548
- - **Core Services:** EKS for container orchestration, RDS for databases, S3 for storage, CloudFront for CDN
549
- - **Regional Architecture:** Multi-region active-passive with primary in us-east-1, DR in us-west-2
550
- - **Multi-environment Strategy:** Development, Staging, UAT, Production with identical infrastructure patterns
551
-
552
- @{/example}
553
-
554
- [[LLM: Infrastructure Elicitation Options
555
- Present user with domain-specific elicitation options:
556
- "For the Infrastructure Overview section, I can explore:
557
-
558
- 1. **Multi-Cloud Strategy Analysis** - Evaluate cloud provider options and vendor lock-in considerations
559
- 2. **Regional Distribution Planning** - Analyze latency requirements and data residency needs
560
- 3. **Environment Isolation Strategy** - Design security boundaries and resource segregation
561
- 4. **Scalability Patterns Review** - Assess auto-scaling needs and traffic patterns
562
- 5. **Compliance Requirements Analysis** - Review regulatory and security compliance needs
563
- 6. **Cost-Benefit Analysis** - Compare infrastructure options and TCO
564
- 7. **Proceed to next section**
565
-
566
- Select an option (1-7):"]]
567
-
568
- ## Infrastructure as Code (IaC)
569
-
570
- [[LLM: Define IaC approach based on technical preferences and existing patterns. Consider team expertise, tooling ecosystem, and maintenance requirements.]]
571
-
572
- - Tools & Frameworks
573
- - Repository Structure
574
- - State Management
575
- - Dependency Management
576
-
577
- <critical_rule>All infrastructure must be defined as code. No manual resource creation in production environments.</critical_rule>
578
-
579
- ## Environment Configuration
580
-
581
- [[LLM: Design environment strategy that supports the development workflow while maintaining security and cost efficiency. Reference the Environment Transition Strategy section for promotion details.]]
582
-
583
- - Environment Promotion Strategy
584
- - Configuration Management
585
- - Secret Management
586
- - Feature Flag Integration
587
-
588
- <<REPEAT: environment>>
589
-
590
- ### {{environment_name}} Environment
591
-
592
- - **Purpose:** {{environment_purpose}}
593
- - **Resources:** {{environment_resources}}
594
- - **Access Control:** {{environment_access}}
595
- - **Data Classification:** {{environment_data_class}}
596
-
597
- <</REPEAT>>
598
-
599
- ## Environment Transition Strategy
600
-
601
- [[LLM: Detail the complete lifecycle of code and configuration changes from development to production. Include governance, testing gates, and rollback procedures.]]
602
-
603
- - Development to Production Pipeline
604
- - Deployment Stages and Gates
605
- - Approval Workflows and Authorities
606
- - Rollback Procedures
607
- - Change Cadence and Release Windows
608
- - Environment-Specific Configuration Management
609
-
610
- ## Network Architecture
611
-
612
- [[LLM: Design network topology considering security zones, traffic patterns, and compliance requirements. Reference main architecture for service communication patterns.
613
-
614
- Create Mermaid diagram showing:
615
-
616
- - VPC/Network structure
617
- - Security zones and boundaries
618
- - Traffic flow patterns
619
- - Load balancer placement
620
- - Service mesh topology (if applicable)]]
621
-
622
- - VPC/VNET Design
623
- - Subnet Strategy
624
- - Security Groups & NACLs
625
- - Load Balancers & API Gateways
626
- - Service Mesh (if applicable)
627
-
628
- ```mermaid
629
- graph TB
630
- subgraph "Production VPC"
631
- subgraph "Public Subnets"
632
- ALB[Application Load Balancer]
633
- end
634
- subgraph "Private Subnets"
635
- EKS[EKS Cluster]
636
- RDS[(RDS Database)]
637
- end
638
- end
639
- Internet((Internet)) --> ALB
640
- ALB --> EKS
641
- EKS --> RDS
642
- ```
643
-
644
- ^^CONDITION: uses_service_mesh^^
645
-
646
- ### Service Mesh Architecture
647
-
648
- - **Mesh Technology:** {{service_mesh_tech}}
649
- - **Traffic Management:** {{traffic_policies}}
650
- - **Security Policies:** {{mesh_security}}
651
- - **Observability Integration:** {{mesh_observability}}
652
-
653
- ^^/CONDITION: uses_service_mesh^^
654
-
655
- ## Compute Resources
656
-
657
- [[LLM: Select compute strategy based on application architecture (microservices, serverless, monolithic). Consider cost, scalability, and operational complexity.]]
658
-
659
- - Container Strategy
660
- - Serverless Architecture
661
- - VM/Instance Configuration
662
- - Auto-scaling Approach
663
-
664
- ^^CONDITION: uses_kubernetes^^
665
-
666
- ### Kubernetes Architecture
667
-
668
- - **Cluster Configuration:** {{k8s_cluster_config}}
669
- - **Node Groups:** {{k8s_node_groups}}
670
- - **Networking:** {{k8s_networking}}
671
- - **Storage Classes:** {{k8s_storage}}
672
- - **Security Policies:** {{k8s_security}}
673
-
674
- ^^/CONDITION: uses_kubernetes^^
675
-
676
- ## Data Resources
677
-
678
- [[LLM: Design data infrastructure based on data architecture from main system design. Consider data volumes, access patterns, compliance, and recovery requirements.
679
-
680
- Create data flow diagram showing:
681
-
682
- - Database topology
683
- - Replication patterns
684
- - Backup flows
685
- - Data migration paths]]
686
-
687
- - Database Deployment Strategy
688
- - Backup & Recovery
689
- - Replication & Failover
690
- - Data Migration Strategy
691
-
692
- ## Security Architecture
693
-
694
- [[LLM: Implement defense-in-depth strategy. Reference security requirements from PRD and compliance needs. Consider zero-trust principles where applicable.]]
695
-
696
- - IAM & Authentication
697
- - Network Security
698
- - Data Encryption
699
- - Compliance Controls
700
- - Security Scanning & Monitoring
701
-
702
- <critical_rule>Apply principle of least privilege for all access controls. Document all security exceptions with business justification.</critical_rule>
703
-
704
- ## Shared Responsibility Model
705
-
706
- [[LLM: Clearly define boundaries between cloud provider, platform team, development team, and security team responsibilities. This is critical for operational success.]]
707
-
708
- - Cloud Provider Responsibilities
709
- - Platform Team Responsibilities
710
- - Development Team Responsibilities
711
- - Security Team Responsibilities
712
- - Operational Monitoring Ownership
713
- - Incident Response Accountability Matrix
714
-
715
- @{example: responsibility_matrix}
716
-
717
- | Component | Cloud Provider | Platform Team | Dev Team | Security Team |
718
- | -------------------- | -------------- | ------------- | -------------- | ------------- |
719
- | Physical Security | ✓ | - | - | Audit |
720
- | Network Security | Partial | ✓ | Config | Audit |
721
- | Application Security | - | Tools | ✓ | Review |
722
- | Data Encryption | Engine | Config | Implementation | Standards |
723
-
724
- @{/example}
725
-
726
- ## Monitoring & Observability
727
-
728
- [[LLM: Design comprehensive observability strategy covering metrics, logs, traces, and business KPIs. Ensure alignment with SLA/SLO requirements.]]
729
-
730
- - Metrics Collection
731
- - Logging Strategy
732
- - Tracing Implementation
733
- - Alerting & Incident Response
734
- - Dashboards & Visualization
735
-
736
- ## CI/CD Pipeline
737
-
738
- [[LLM: Design deployment pipeline that balances speed with safety. Include progressive deployment strategies and automated quality gates.
739
-
740
- Create pipeline diagram showing:
741
-
742
- - Build stages
743
- - Test gates
744
- - Deployment stages
745
- - Approval points
746
- - Rollback triggers]]
747
-
748
- - Pipeline Architecture
749
- - Build Process
750
- - Deployment Strategy
751
- - Rollback Procedures
752
- - Approval Gates
753
-
754
- ^^CONDITION: uses_progressive_deployment^^
755
-
756
- ### Progressive Deployment Strategy
757
-
758
- - **Canary Deployment:** {{canary_config}}
759
- - **Blue-Green Deployment:** {{blue_green_config}}
760
- - **Feature Flags:** {{feature_flag_integration}}
761
- - **Traffic Splitting:** {{traffic_split_rules}}
762
-
763
- ^^/CONDITION: uses_progressive_deployment^^
764
-
765
- ## Disaster Recovery
766
-
767
- [[LLM: Design DR strategy based on business continuity requirements. Define clear RTO/RPO targets and ensure they align with business needs.]]
768
-
769
- - Backup Strategy
770
- - Recovery Procedures
771
- - RTO & RPO Targets
772
- - DR Testing Approach
773
-
774
- <critical_rule>DR procedures must be tested at least quarterly. Document test results and improvement actions.</critical_rule>
775
-
776
- ## Cost Optimization
777
-
778
- [[LLM: Balance cost efficiency with performance and reliability requirements. Include both immediate optimizations and long-term strategies.]]
779
-
780
- - Resource Sizing Strategy
781
- - Reserved Instances/Commitments
782
- - Cost Monitoring & Reporting
783
- - Optimization Recommendations
784
-
785
- ## BMad Integration Architecture
786
-
787
- [[LLM: Design infrastructure to specifically support other BMad agents and their workflows. This ensures the infrastructure enables the entire BMad methodology.]]
788
-
789
- ### Development Agent Support
790
-
791
- - Container platform for development environments
792
- - GitOps workflows for application deployment
793
- - Service mesh integration for development testing
794
- - Developer self-service platform capabilities
795
-
796
- ### Product & Architecture Alignment
797
-
798
- - Infrastructure implementing PRD scalability requirements
799
- - Deployment automation supporting product iteration speed
800
- - Service reliability meeting product SLAs
801
- - Architecture patterns properly implemented in infrastructure
802
-
803
- ### Cross-Agent Integration Points
804
-
805
- - CI/CD pipelines supporting Frontend, Backend, and Full Stack development workflows
806
- - Monitoring and observability data accessible to QA and DevOps agents
807
- - Infrastructure enabling Design Architect's UI/UX performance requirements
808
- - Platform supporting Analyst's data collection and analysis needs
809
-
810
- ## DevOps/Platform Feasibility Review
811
-
812
- [[LLM: CRITICAL STEP - Present architectural blueprint summary to DevOps/Platform Engineering Agent for feasibility review. Request specific feedback on:
813
-
814
- - **Operational Complexity:** Are the proposed patterns implementable with current tooling and expertise?
815
- - **Resource Constraints:** Do infrastructure requirements align with available resources and budgets?
816
- - **Security Implementation:** Are security patterns achievable with current security toolchain?
817
- - **Operational Overhead:** Will the proposed architecture create excessive operational burden?
818
- - **Technology Constraints:** Are selected technologies compatible with existing infrastructure?
819
-
820
- Document all feasibility feedback and concerns raised. Iterate on architectural decisions based on operational constraints and feedback.
821
-
822
- <critical_rule>Address all critical feasibility concerns before proceeding to final architecture documentation. If critical blockers identified, revise architecture before continuing.</critical_rule>]]
823
-
824
- ### Feasibility Assessment Results
825
-
826
- - **Green Light Items:** {{feasible_items}}
827
- - **Yellow Light Items:** {{items_needing_adjustment}}
828
- - **Red Light Items:** {{items_requiring_redesign}}
829
- - **Mitigation Strategies:** {{mitigation_plans}}
830
-
831
- ## Infrastructure Verification
832
-
833
- ### Validation Framework
834
-
835
- This infrastructure architecture will be validated using the comprehensive `infrastructure-checklist.md`, with particular focus on Section 12: Architecture Documentation Validation. The checklist ensures:
836
-
837
- - Completeness of architecture documentation
838
- - Consistency with broader system architecture
839
- - Appropriate level of detail for different stakeholders
840
- - Clear implementation guidance
841
- - Future evolution considerations
842
-
843
- ### Validation Process
844
-
845
- The architecture documentation validation should be performed:
846
-
847
- - After initial architecture development
848
- - After significant architecture changes
849
- - Before major implementation phases
850
- - During periodic architecture reviews
851
-
852
- The Platform Engineer should use the infrastructure checklist to systematically validate all aspects of this architecture document.
853
-
854
- ## Implementation Handoff
855
-
856
- [[LLM: Create structured handoff documentation for implementation team. This ensures architecture decisions are properly communicated and implemented.]]
857
-
858
- ### Architecture Decision Records (ADRs)
859
-
860
- Create ADRs for key infrastructure decisions:
861
-
862
- - Cloud provider selection rationale
863
- - Container orchestration platform choice
864
- - Networking architecture decisions
865
- - Security implementation choices
866
- - Cost optimization trade-offs
867
-
868
- ### Implementation Validation Criteria
869
-
870
- Define specific criteria for validating correct implementation:
871
-
872
- - Infrastructure as Code quality gates
873
- - Security compliance checkpoints
874
- - Performance benchmarks
875
- - Cost targets
876
- - Operational readiness criteria
877
-
878
- ### Knowledge Transfer Requirements
879
-
880
- - Technical documentation for operations team
881
- - Runbook creation requirements
882
- - Training needs for platform team
883
- - Handoff meeting agenda items
884
-
885
- ## Infrastructure Evolution
886
-
887
- [[LLM: Document the long-term vision and evolution path for the infrastructure. Consider technology trends, anticipated growth, and technical debt management.]]
888
-
889
- - Technical Debt Inventory
890
- - Planned Upgrades and Migrations
891
- - Deprecation Schedule
892
- - Technology Roadmap
893
- - Capacity Planning
894
- - Scalability Considerations
895
-
896
- ## Integration with Application Architecture
897
-
898
- [[LLM: Map infrastructure components to application services. Ensure infrastructure design supports application requirements and patterns defined in main architecture.]]
899
-
900
- - Service-to-Infrastructure Mapping
901
- - Application Dependency Matrix
902
- - Performance Requirements Implementation
903
- - Security Requirements Implementation
904
- - Data Flow to Infrastructure Correlation
905
- - API Gateway and Service Mesh Integration
906
-
907
- ## Cross-Team Collaboration
908
-
909
- [[LLM: Define clear interfaces and communication patterns between teams. This section is critical for operational success and should include specific touchpoints and escalation paths.]]
910
-
911
- - Platform Engineer and Developer Touchpoints
912
- - Frontend/Backend Integration Requirements
913
- - Product Requirements to Infrastructure Mapping
914
- - Architecture Decision Impact Analysis
915
- - Design Architect UI/UX Infrastructure Requirements
916
- - Analyst Research Integration
917
-
918
- ## Infrastructure Change Management
919
-
920
- [[LLM: Define structured process for infrastructure changes. Include risk assessment, testing requirements, and rollback procedures.]]
921
-
922
- - Change Request Process
923
- - Risk Assessment
924
- - Testing Strategy
925
- - Validation Procedures
926
-
927
- [[LLM: Final Review - Ensure all sections are complete and consistent. Verify feasibility review was conducted and all concerns addressed. Apply final validation against infrastructure checklist.]]
928
-
929
- ---
930
-
931
- _Document Version: 1.0_
932
- _Last Updated: {{current_date}}_
933
- _Next Review: {{review_date}}_
934
- ==================== END: .bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md ====================
935
-
936
- ==================== START: .bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md ====================
937
- # {{Project Name}} Platform Infrastructure Implementation
938
-
939
- [[LLM: Initial Setup
940
-
941
- 1. Replace {{Project Name}} with the actual project name throughout the document
942
- 2. Gather and review required inputs:
943
-
944
- - **Infrastructure Architecture Document** (Primary input - REQUIRED)
945
- - Infrastructure Change Request (if applicable)
946
- - Infrastructure Guidelines
947
- - Technology Stack Document
948
- - Infrastructure Checklist
949
- - NOTE: If Infrastructure Architecture Document is missing, HALT and request: "I need the Infrastructure Architecture Document to proceed with platform implementation. This document defines the infrastructure design that we'll be implementing."
950
-
951
- 3. Validate that the infrastructure architecture has been reviewed and approved
952
- 4. <critical_rule>All platform implementation must align with the approved infrastructure architecture. Any deviations require architect approval.</critical_rule>
953
-
954
- Output file location: `docs/platform-infrastructure/platform-implementation.md`]]
955
-
956
- ## Executive Summary
957
-
958
- [[LLM: Provide a high-level overview of the platform infrastructure being implemented, referencing the infrastructure architecture document's key decisions and requirements.]]
959
-
960
- - Platform implementation scope and objectives
961
- - Key architectural decisions being implemented
962
- - Expected outcomes and benefits
963
- - Timeline and milestones
964
-
965
- ## Joint Planning Session with Architect
966
-
967
- [[LLM: Document the collaborative planning session between DevOps/Platform Engineer and Architect. This ensures alignment before implementation begins.]]
968
-
969
- ### Architecture Alignment Review
970
-
971
- - Review of infrastructure architecture document
972
- - Confirmation of design decisions
973
- - Identification of any ambiguities or gaps
974
- - Agreement on implementation approach
975
-
976
- ### Implementation Strategy Collaboration
977
-
978
- - Platform layer sequencing
979
- - Technology stack validation
980
- - Integration approach between layers
981
- - Testing and validation strategy
982
-
983
- ### Risk & Constraint Discussion
984
-
985
- - Technical risks and mitigation strategies
986
- - Resource constraints and workarounds
987
- - Timeline considerations
988
- - Compliance and security requirements
989
-
990
- ### Implementation Validation Planning
991
-
992
- - Success criteria for each platform layer
993
- - Testing approach and acceptance criteria
994
- - Rollback strategies
995
- - Communication plan
996
-
997
- ### Documentation & Knowledge Transfer Planning
998
-
999
- - Documentation requirements
1000
- - Knowledge transfer approach
1001
- - Training needs identification
1002
- - Handoff procedures
1003
-
1004
- ## Foundation Infrastructure Layer
1005
-
1006
- [[LLM: Implement the base infrastructure layer based on the infrastructure architecture. This forms the foundation for all platform services.]]
1007
-
1008
- ### Cloud Provider Setup
1009
-
1010
- - Account/Subscription configuration
1011
- - Region selection and setup
1012
- - Resource group/organizational structure
1013
- - Cost management setup
1014
-
1015
- ### Network Foundation
1016
-
1017
- ```hcl
1018
- # Example Terraform for VPC setup
1019
- module "vpc" {
1020
- source = "./modules/vpc"
1021
-
1022
- cidr_block = "{{vpc_cidr}}"
1023
- availability_zones = {{availability_zones}}
1024
- public_subnets = {{public_subnets}}
1025
- private_subnets = {{private_subnets}}
1026
- }
1027
- ```
1028
-
1029
- ### Security Foundation
1030
-
1031
- - IAM roles and policies
1032
- - Security groups and NACLs
1033
- - Encryption keys (KMS/Key Vault)
1034
- - Compliance controls
1035
-
1036
- ### Core Services
1037
-
1038
- - DNS configuration
1039
- - Certificate management
1040
- - Logging infrastructure
1041
- - Monitoring foundation
1042
-
1043
- [[LLM: Platform Layer Elicitation
1044
- After implementing foundation infrastructure, present:
1045
- "For the Foundation Infrastructure layer, I can explore:
1046
-
1047
- 1. **Platform Layer Security Hardening** - Additional security controls and compliance validation
1048
- 2. **Performance Optimization** - Network and resource optimization
1049
- 3. **Operational Excellence Enhancement** - Automation and monitoring improvements
1050
- 4. **Platform Integration Validation** - Verify foundation supports upper layers
1051
- 5. **Developer Experience Analysis** - Foundation impact on developer workflows
1052
- 6. **Disaster Recovery Testing** - Foundation resilience validation
1053
- 7. **BMAD Workflow Integration** - Cross-agent support verification
1054
- 8. **Finalize and Proceed to Container Platform**
1055
-
1056
- Select an option (1-8):"]]
1057
-
1058
- ## Container Platform Implementation
1059
-
1060
- [[LLM: Build the container orchestration platform on top of the foundation infrastructure, following the architecture's container strategy.]]
1061
-
1062
- ### Kubernetes Cluster Setup
1063
-
1064
- ^^CONDITION: uses_eks^^
1065
-
1066
- ```bash
1067
- # EKS Cluster Configuration
1068
- eksctl create cluster \
1069
- --name {{cluster_name}} \
1070
- --region {{aws_region}} \
1071
- --nodegroup-name {{nodegroup_name}} \
1072
- --node-type {{instance_type}} \
1073
- --nodes {{node_count}}
1074
- ```
1075
-
1076
- ^^/CONDITION: uses_eks^^
1077
-
1078
- ^^CONDITION: uses_aks^^
1079
-
1080
- ```bash
1081
- # AKS Cluster Configuration
1082
- az aks create \
1083
- --resource-group {{resource_group}} \
1084
- --name {{cluster_name}} \
1085
- --node-count {{node_count}} \
1086
- --node-vm-size {{vm_size}} \
1087
- --network-plugin azure
1088
- ```
1089
-
1090
- ^^/CONDITION: uses_aks^^
1091
-
1092
- ### Node Configuration
1093
-
1094
- - Node groups/pools setup
1095
- - Autoscaling configuration
1096
- - Node security hardening
1097
- - Resource quotas and limits
1098
-
1099
- ### Cluster Services
1100
-
1101
- - CoreDNS configuration
1102
- - Ingress controller setup
1103
- - Certificate management
1104
- - Storage classes
1105
-
1106
- ### Security & RBAC
1107
-
1108
- - RBAC policies
1109
- - Pod security policies/standards
1110
- - Network policies
1111
- - Secrets management
1112
-
1113
- [[LLM: Present container platform elicitation options similar to foundation layer]]
1114
-
1115
- ## GitOps Workflow Implementation
1116
-
1117
- [[LLM: Implement GitOps patterns for declarative infrastructure and application management as defined in the architecture.]]
1118
-
1119
- ### GitOps Tooling Setup
1120
-
1121
- ^^CONDITION: uses_argocd^^
1122
-
1123
- ```yaml
1124
- apiVersion: argoproj.io/v1alpha1
1125
- kind: Application
1126
- metadata:
1127
- name: argocd
1128
- namespace: argocd
1129
- spec:
1130
- source:
1131
- repoURL:
1132
- "[object Object]": null
1133
- targetRevision:
1134
- "[object Object]": null
1135
- path:
1136
- "[object Object]": null
1137
- ```
1138
-
1139
- ^^/CONDITION: uses_argocd^^
1140
-
1141
- ^^CONDITION: uses_flux^^
1142
-
1143
- ```yaml
1144
- apiVersion: source.toolkit.fluxcd.io/v1beta2
1145
- kind: GitRepository
1146
- metadata:
1147
- name: flux-system
1148
- namespace: flux-system
1149
- spec:
1150
- interval: 1m
1151
- ref:
1152
- branch:
1153
- "[object Object]": null
1154
- url:
1155
- "[object Object]": null
1156
- ```
1157
-
1158
- ^^/CONDITION: uses_flux^^
1159
-
1160
- ### Repository Structure
1161
-
1162
- ```text
1163
- platform-gitops/
1164
-  clusters/
1165
-   production/
1166
-   staging/
1167
-   development/
1168
-  infrastructure/
1169
-   base/
1170
-   overlays/
1171
-  applications/
1172
-  base/
1173
-  overlays/
1174
- ```
1175
-
1176
- ### Deployment Workflows
1177
-
1178
- - Application deployment patterns
1179
- - Progressive delivery setup
1180
- - Rollback procedures
1181
- - Multi-environment promotion
1182
-
1183
- ### Access Control
1184
-
1185
- - Git repository permissions
1186
- - GitOps tool RBAC
1187
- - Secret management integration
1188
- - Audit logging
1189
-
1190
- ## Service Mesh Implementation
1191
-
1192
- [[LLM: Deploy service mesh for advanced traffic management, security, and observability as specified in the architecture.]]
1193
-
1194
- ^^CONDITION: uses_istio^^
1195
-
1196
- ### Istio Service Mesh
1197
-
1198
- ```bash
1199
- # Istio Installation
1200
- istioctl install --set profile={{istio_profile}} \
1201
- --set values.gateways.istio-ingressgateway.type={{ingress_type}}
1202
- ```
1203
-
1204
- - Control plane configuration
1205
- - Data plane injection
1206
- - Gateway configuration
1207
- - Observability integration
1208
- ^^/CONDITION: uses_istio^^
1209
-
1210
- ^^CONDITION: uses_linkerd^^
1211
-
1212
- ### Linkerd Service Mesh
1213
-
1214
- ```bash
1215
- # Linkerd Installation
1216
- linkerd install --cluster-name={{cluster_name}} | kubectl apply -f -
1217
- linkerd viz install | kubectl apply -f -
1218
- ```
1219
-
1220
- - Control plane setup
1221
- - Proxy injection
1222
- - Traffic policies
1223
- - Metrics collection
1224
- ^^/CONDITION: uses_linkerd^^
1225
-
1226
- ### Traffic Management
1227
-
1228
- - Load balancing policies
1229
- - Circuit breakers
1230
- - Retry policies
1231
- - Canary deployments
1232
-
1233
- ### Security Policies
1234
-
1235
- - mTLS configuration
1236
- - Authorization policies
1237
- - Rate limiting
1238
- - Network segmentation
1239
-
1240
- ## Developer Experience Platform
1241
-
1242
- [[LLM: Build the developer self-service platform to enable efficient development workflows as outlined in the architecture.]]
1243
-
1244
- ### Developer Portal
1245
-
1246
- - Service catalog setup
1247
- - API documentation
1248
- - Self-service workflows
1249
- - Resource provisioning
1250
-
1251
- ### CI/CD Integration
1252
-
1253
- ```yaml
1254
- apiVersion: tekton.dev/v1beta1
1255
- kind: Pipeline
1256
- metadata:
1257
- name: platform-pipeline
1258
- spec:
1259
- tasks:
1260
- - name: build
1261
- taskRef:
1262
- name: build-task
1263
- - name: test
1264
- taskRef:
1265
- name: test-task
1266
- - name: deploy
1267
- taskRef:
1268
- name: gitops-deploy
1269
- ```
1270
-
1271
- ### Development Tools
1272
-
1273
- - Local development setup
1274
- - Remote development environments
1275
- - Testing frameworks
1276
- - Debugging tools
1277
-
1278
- ### Self-Service Capabilities
1279
-
1280
- - Environment provisioning
1281
- - Database creation
1282
- - Feature flag management
1283
- - Configuration management
1284
-
1285
- ## Platform Integration & Security Hardening
1286
-
1287
- [[LLM: Implement comprehensive platform-wide integration and security controls across all layers.]]
1288
-
1289
- ### End-to-End Security
1290
-
1291
- - Platform-wide security policies
1292
- - Cross-layer authentication
1293
- - Encryption in transit and at rest
1294
- - Compliance validation
1295
-
1296
- ### Integrated Monitoring
1297
-
1298
- ```yaml
1299
- apiVersion: v1
1300
- kind: ConfigMap
1301
- metadata:
1302
- name: prometheus-config
1303
- data:
1304
- prometheus.yaml: |
1305
- global:
1306
- scrape_interval: {{scrape_interval}}
1307
- scrape_configs:
1308
- - job_name: 'kubernetes-pods'
1309
- kubernetes_sd_configs:
1310
- - role: pod
1311
- ```
1312
-
1313
- ### Platform Observability
1314
-
1315
- - Metrics aggregation
1316
- - Log collection and analysis
1317
- - Distributed tracing
1318
- - Dashboard creation
1319
-
1320
- ### Backup & Disaster Recovery
1321
-
1322
- - Platform backup strategy
1323
- - Disaster recovery procedures
1324
- - RTO/RPO validation
1325
- - Recovery testing
1326
-
1327
- ## Platform Operations & Automation
1328
-
1329
- [[LLM: Establish operational procedures and automation for platform management.]]
1330
-
1331
- ### Monitoring & Alerting
1332
-
1333
- - SLA/SLO monitoring
1334
- - Alert routing
1335
- - Incident response
1336
- - Performance baselines
1337
-
1338
- ### Automation Framework
1339
-
1340
- ```yaml
1341
- apiVersion: operators.coreos.com/v1alpha1
1342
- kind: ClusterServiceVersion
1343
- metadata:
1344
- name: platform-operator
1345
- spec:
1346
- customresourcedefinitions:
1347
- owned:
1348
- - name: platformconfigs.platform.io
1349
- version: v1alpha1
1350
- ```
1351
-
1352
- ### Maintenance Procedures
1353
-
1354
- - Upgrade procedures
1355
- - Patch management
1356
- - Certificate rotation
1357
- - Capacity management
1358
-
1359
- ### Operational Runbooks
1360
-
1361
- - Common operational tasks
1362
- - Troubleshooting guides
1363
- - Emergency procedures
1364
- - Recovery playbooks
1365
-
1366
- ## BMAD Workflow Integration
1367
-
1368
- [[LLM: Validate that the platform supports all BMAD agent workflows and cross-functional requirements.]]
1369
-
1370
- ### Development Agent Support
1371
-
1372
- - Frontend development workflows
1373
- - Backend development workflows
1374
- - Full-stack integration
1375
- - Local development experience
1376
-
1377
- ### Infrastructure-as-Code Development
1378
-
1379
- - IaC development workflows
1380
- - Testing frameworks
1381
- - Deployment automation
1382
- - Version control integration
1383
-
1384
- ### Cross-Agent Collaboration
1385
-
1386
- - Shared services access
1387
- - Communication patterns
1388
- - Data sharing mechanisms
1389
- - Security boundaries
1390
-
1391
- ### CI/CD Integration
1392
-
1393
- ```yaml
1394
- stages:
1395
- - analyze
1396
- - plan
1397
- - architect
1398
- - develop
1399
- - test
1400
- - deploy
1401
- ```
1402
-
1403
- ## Platform Validation & Testing
1404
-
1405
- [[LLM: Execute comprehensive validation to ensure the platform meets all requirements.]]
1406
-
1407
- ### Functional Testing
1408
-
1409
- - Component testing
1410
- - Integration testing
1411
- - End-to-end testing
1412
- - Performance testing
1413
-
1414
- ### Security Validation
1415
-
1416
- - Penetration testing
1417
- - Compliance scanning
1418
- - Vulnerability assessment
1419
- - Access control validation
1420
-
1421
- ### Disaster Recovery Testing
1422
-
1423
- - Backup restoration
1424
- - Failover procedures
1425
- - Recovery time validation
1426
- - Data integrity checks
1427
-
1428
- ### Load Testing
1429
-
1430
- ```typescript
1431
- // K6 Load Test Example
1432
- import http from 'k6/http';
1433
- import { check } from 'k6';
1434
-
1435
- export let options = {
1436
- stages: [
1437
- { duration: '5m', target: {{target_users}} },
1438
- { duration: '10m', target: {{target_users}} },
1439
- { duration: '5m', target: 0 },
1440
- ],
1441
- };
1442
- ```
1443
-
1444
- ## Knowledge Transfer & Documentation
1445
-
1446
- [[LLM: Prepare comprehensive documentation and knowledge transfer materials.]]
1447
-
1448
- ### Platform Documentation
1449
-
1450
- - Architecture documentation
1451
- - Operational procedures
1452
- - Configuration reference
1453
- - API documentation
1454
-
1455
- ### Training Materials
1456
-
1457
- - Developer guides
1458
- - Operations training
1459
- - Security best practices
1460
- - Troubleshooting guides
1461
-
1462
- ### Handoff Procedures
1463
-
1464
- - Team responsibilities
1465
- - Escalation procedures
1466
- - Support model
1467
- - Knowledge base
1468
-
1469
- ## Implementation Review with Architect
1470
-
1471
- [[LLM: Document the post-implementation review session with the Architect to validate alignment and capture learnings.]]
1472
-
1473
- ### Implementation Validation
1474
-
1475
- - Architecture alignment verification
1476
- - Deviation documentation
1477
- - Performance validation
1478
- - Security review
1479
-
1480
- ### Lessons Learned
1481
-
1482
- - What went well
1483
- - Challenges encountered
1484
- - Process improvements
1485
- - Technical insights
1486
-
1487
- ### Future Evolution
1488
-
1489
- - Enhancement opportunities
1490
- - Technical debt items
1491
- - Upgrade planning
1492
- - Capacity planning
1493
-
1494
- ### Sign-off & Acceptance
1495
-
1496
- - Architect approval
1497
- - Stakeholder acceptance
1498
- - Go-live authorization
1499
- - Support transition
1500
-
1501
- ## Platform Metrics & KPIs
1502
-
1503
- [[LLM: Define and implement key performance indicators for platform success measurement.]]
1504
-
1505
- ### Technical Metrics
1506
-
1507
- - Platform availability: {{availability_target}}
1508
- - Response time: {{response_time_target}}
1509
- - Resource utilization: {{utilization_target}}
1510
- - Error rates: {{error_rate_target}}
1511
-
1512
- ### Business Metrics
1513
-
1514
- - Developer productivity
1515
- - Deployment frequency
1516
- - Lead time for changes
1517
- - Mean time to recovery
1518
-
1519
- ### Operational Metrics
1520
-
1521
- - Incident response time
1522
- - Patch compliance
1523
- - Cost per workload
1524
- - Resource efficiency
1525
-
1526
- ## Appendices
1527
-
1528
- ### A. Configuration Reference
1529
-
1530
- [[LLM: Document all configuration parameters and their values used in the platform implementation.]]
1531
-
1532
- ### B. Troubleshooting Guide
1533
-
1534
- [[LLM: Provide common issues and their resolutions for platform operations.]]
1535
-
1536
- ### C. Security Controls Matrix
1537
-
1538
- [[LLM: Map implemented security controls to compliance requirements.]]
1539
-
1540
- ### D. Integration Points
1541
-
1542
- [[LLM: Document all integration points with external systems and services.]]
1543
-
1544
- [[LLM: Final Review - Ensure all platform layers are properly implemented, integrated, and documented. Verify that the implementation fully supports the BMAD methodology and all agent workflows. Confirm successful validation against the infrastructure checklist.]]
1545
-
1546
- ---
1547
-
1548
- _Platform Version: 1.0_
1549
- _Implementation Date: {{implementation_date}}_
1550
- _Next Review: {{review_date}}_
1551
- _Approved by: {{architect_name}} (Architect), {{devops_name}} (DevOps/Platform Engineer)_
1552
- ==================== END: .bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md ====================
502
+ ==================== START: .bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml ====================
503
+ template:
504
+ id: infrastructure-architecture-template-v2
505
+ name: Infrastructure Architecture
506
+ version: 2.0
507
+ output:
508
+ format: markdown
509
+ filename: docs/infrastructure-architecture.md
510
+ title: "{{project_name}} Infrastructure Architecture"
511
+
512
+ workflow:
513
+ mode: interactive
514
+ elicitation: advanced-elicitation
515
+ custom_elicitation:
516
+ title: "Infrastructure Architecture Elicitation Actions"
517
+ sections:
518
+ - id: infrastructure-overview
519
+ options:
520
+ - "Multi-Cloud Strategy Analysis - Evaluate cloud provider options and vendor lock-in considerations"
521
+ - "Regional Distribution Planning - Analyze latency requirements and data residency needs"
522
+ - "Environment Isolation Strategy - Design security boundaries and resource segregation"
523
+ - "Scalability Patterns Review - Assess auto-scaling needs and traffic patterns"
524
+ - "Compliance Requirements Analysis - Review regulatory and security compliance needs"
525
+ - "Cost-Benefit Analysis - Compare infrastructure options and TCO"
526
+ - "Proceed to next section"
527
+
528
+ sections:
529
+ - id: initial-setup
530
+ instruction: |
531
+ Initial Setup
532
+
533
+ 1. Replace {{project_name}} with the actual project name throughout the document
534
+ 2. Gather and review required inputs:
535
+ - Product Requirements Document (PRD) - Required for business needs and scale requirements
536
+ - Main System Architecture - Required for infrastructure dependencies
537
+ - Technical Preferences/Tech Stack Document - Required for technology choices
538
+ - PRD Technical Assumptions - Required for cross-referencing repository and service architecture
539
+
540
+ If any required documents are missing, ask user: "I need the following documents to create a comprehensive infrastructure architecture: [list missing]. Would you like to proceed with available information or provide the missing documents first?"
541
+
542
+ 3. <critical_rule>Cross-reference with PRD Technical Assumptions to ensure infrastructure decisions align with repository and service architecture decisions made in the system architecture.</critical_rule>
543
+
544
+ Output file location: `docs/infrastructure-architecture.md`
545
+
546
+ - id: infrastructure-overview
547
+ title: Infrastructure Overview
548
+ instruction: |
549
+ Review the product requirements document to understand business needs and scale requirements. Analyze the main system architecture to identify infrastructure dependencies. Document non-functional requirements (performance, scalability, reliability, security). Cross-reference with PRD Technical Assumptions to ensure alignment with repository and service architecture decisions.
550
+ elicit: true
551
+ custom_elicitation: infrastructure-overview
552
+ template: |
553
+ - Cloud Provider(s)
554
+ - Core Services & Resources
555
+ - Regional Architecture
556
+ - Multi-environment Strategy
557
+ examples:
558
+ - |
559
+ - **Cloud Provider:** AWS (primary), with multi-cloud capability for critical services
560
+ - **Core Services:** EKS for container orchestration, RDS for databases, S3 for storage, CloudFront for CDN
561
+ - **Regional Architecture:** Multi-region active-passive with primary in us-east-1, DR in us-west-2
562
+ - **Multi-environment Strategy:** Development, Staging, UAT, Production with identical infrastructure patterns
563
+
564
+ - id: iac
565
+ title: Infrastructure as Code (IaC)
566
+ instruction: Define IaC approach based on technical preferences and existing patterns. Consider team expertise, tooling ecosystem, and maintenance requirements.
567
+ template: |
568
+ - Tools & Frameworks
569
+ - Repository Structure
570
+ - State Management
571
+ - Dependency Management
572
+
573
+ <critical_rule>All infrastructure must be defined as code. No manual resource creation in production environments.</critical_rule>
574
+
575
+ - id: environment-configuration
576
+ title: Environment Configuration
577
+ instruction: Design environment strategy that supports the development workflow while maintaining security and cost efficiency. Reference the Environment Transition Strategy section for promotion details.
578
+ template: |
579
+ - Environment Promotion Strategy
580
+ - Configuration Management
581
+ - Secret Management
582
+ - Feature Flag Integration
583
+ sections:
584
+ - id: environments
585
+ repeatable: true
586
+ title: "{{environment_name}} Environment"
587
+ template: |
588
+ - **Purpose:** {{environment_purpose}}
589
+ - **Resources:** {{environment_resources}}
590
+ - **Access Control:** {{environment_access}}
591
+ - **Data Classification:** {{environment_data_class}}
592
+
593
+ - id: environment-transition
594
+ title: Environment Transition Strategy
595
+ instruction: Detail the complete lifecycle of code and configuration changes from development to production. Include governance, testing gates, and rollback procedures.
596
+ template: |
597
+ - Development to Production Pipeline
598
+ - Deployment Stages and Gates
599
+ - Approval Workflows and Authorities
600
+ - Rollback Procedures
601
+ - Change Cadence and Release Windows
602
+ - Environment-Specific Configuration Management
603
+
604
+ - id: network-architecture
605
+ title: Network Architecture
606
+ instruction: |
607
+ Design network topology considering security zones, traffic patterns, and compliance requirements. Reference main architecture for service communication patterns.
608
+
609
+ Create Mermaid diagram showing:
610
+ - VPC/Network structure
611
+ - Security zones and boundaries
612
+ - Traffic flow patterns
613
+ - Load balancer placement
614
+ - Service mesh topology (if applicable)
615
+ template: |
616
+ - VPC/VNET Design
617
+ - Subnet Strategy
618
+ - Security Groups & NACLs
619
+ - Load Balancers & API Gateways
620
+ - Service Mesh (if applicable)
621
+ sections:
622
+ - id: network-diagram
623
+ type: mermaid
624
+ mermaid_type: graph
625
+ template: |
626
+ graph TB
627
+ subgraph "Production VPC"
628
+ subgraph "Public Subnets"
629
+ ALB[Application Load Balancer]
630
+ end
631
+ subgraph "Private Subnets"
632
+ EKS[EKS Cluster]
633
+ RDS[(RDS Database)]
634
+ end
635
+ end
636
+ Internet((Internet)) --> ALB
637
+ ALB --> EKS
638
+ EKS --> RDS
639
+ - id: service-mesh
640
+ title: Service Mesh Architecture
641
+ condition: Uses service mesh
642
+ template: |
643
+ - **Mesh Technology:** {{service_mesh_tech}}
644
+ - **Traffic Management:** {{traffic_policies}}
645
+ - **Security Policies:** {{mesh_security}}
646
+ - **Observability Integration:** {{mesh_observability}}
647
+
648
+ - id: compute-resources
649
+ title: Compute Resources
650
+ instruction: Select compute strategy based on application architecture (microservices, serverless, monolithic). Consider cost, scalability, and operational complexity.
651
+ template: |
652
+ - Container Strategy
653
+ - Serverless Architecture
654
+ - VM/Instance Configuration
655
+ - Auto-scaling Approach
656
+ sections:
657
+ - id: kubernetes
658
+ title: Kubernetes Architecture
659
+ condition: Uses Kubernetes
660
+ template: |
661
+ - **Cluster Configuration:** {{k8s_cluster_config}}
662
+ - **Node Groups:** {{k8s_node_groups}}
663
+ - **Networking:** {{k8s_networking}}
664
+ - **Storage Classes:** {{k8s_storage}}
665
+ - **Security Policies:** {{k8s_security}}
666
+
667
+ - id: data-resources
668
+ title: Data Resources
669
+ instruction: |
670
+ Design data infrastructure based on data architecture from main system design. Consider data volumes, access patterns, compliance, and recovery requirements.
671
+
672
+ Create data flow diagram showing:
673
+ - Database topology
674
+ - Replication patterns
675
+ - Backup flows
676
+ - Data migration paths
677
+ template: |
678
+ - Database Deployment Strategy
679
+ - Backup & Recovery
680
+ - Replication & Failover
681
+ - Data Migration Strategy
682
+
683
+ - id: security-architecture
684
+ title: Security Architecture
685
+ instruction: Implement defense-in-depth strategy. Reference security requirements from PRD and compliance needs. Consider zero-trust principles where applicable.
686
+ template: |
687
+ - IAM & Authentication
688
+ - Network Security
689
+ - Data Encryption
690
+ - Compliance Controls
691
+ - Security Scanning & Monitoring
692
+
693
+ <critical_rule>Apply principle of least privilege for all access controls. Document all security exceptions with business justification.</critical_rule>
694
+
695
+ - id: shared-responsibility
696
+ title: Shared Responsibility Model
697
+ instruction: Clearly define boundaries between cloud provider, platform team, development team, and security team responsibilities. This is critical for operational success.
698
+ template: |
699
+ - Cloud Provider Responsibilities
700
+ - Platform Team Responsibilities
701
+ - Development Team Responsibilities
702
+ - Security Team Responsibilities
703
+ - Operational Monitoring Ownership
704
+ - Incident Response Accountability Matrix
705
+ examples:
706
+ - |
707
+ | Component | Cloud Provider | Platform Team | Dev Team | Security Team |
708
+ | -------------------- | -------------- | ------------- | -------------- | ------------- |
709
+ | Physical Security | ✓ | - | - | Audit |
710
+ | Network Security | Partial | ✓ | Config | Audit |
711
+ | Application Security | - | Tools | ✓ | Review |
712
+ | Data Encryption | Engine | Config | Implementation | Standards |
713
+
714
+ - id: monitoring-observability
715
+ title: Monitoring & Observability
716
+ instruction: Design comprehensive observability strategy covering metrics, logs, traces, and business KPIs. Ensure alignment with SLA/SLO requirements.
717
+ template: |
718
+ - Metrics Collection
719
+ - Logging Strategy
720
+ - Tracing Implementation
721
+ - Alerting & Incident Response
722
+ - Dashboards & Visualization
723
+
724
+ - id: cicd-pipeline
725
+ title: CI/CD Pipeline
726
+ instruction: |
727
+ Design deployment pipeline that balances speed with safety. Include progressive deployment strategies and automated quality gates.
728
+
729
+ Create pipeline diagram showing:
730
+ - Build stages
731
+ - Test gates
732
+ - Deployment stages
733
+ - Approval points
734
+ - Rollback triggers
735
+ template: |
736
+ - Pipeline Architecture
737
+ - Build Process
738
+ - Deployment Strategy
739
+ - Rollback Procedures
740
+ - Approval Gates
741
+ sections:
742
+ - id: progressive-deployment
743
+ title: Progressive Deployment Strategy
744
+ condition: Uses progressive deployment
745
+ template: |
746
+ - **Canary Deployment:** {{canary_config}}
747
+ - **Blue-Green Deployment:** {{blue_green_config}}
748
+ - **Feature Flags:** {{feature_flag_integration}}
749
+ - **Traffic Splitting:** {{traffic_split_rules}}
750
+
751
+ - id: disaster-recovery
752
+ title: Disaster Recovery
753
+ instruction: Design DR strategy based on business continuity requirements. Define clear RTO/RPO targets and ensure they align with business needs.
754
+ template: |
755
+ - Backup Strategy
756
+ - Recovery Procedures
757
+ - RTO & RPO Targets
758
+ - DR Testing Approach
759
+
760
+ <critical_rule>DR procedures must be tested at least quarterly. Document test results and improvement actions.</critical_rule>
761
+
762
+ - id: cost-optimization
763
+ title: Cost Optimization
764
+ instruction: Balance cost efficiency with performance and reliability requirements. Include both immediate optimizations and long-term strategies.
765
+ template: |
766
+ - Resource Sizing Strategy
767
+ - Reserved Instances/Commitments
768
+ - Cost Monitoring & Reporting
769
+ - Optimization Recommendations
770
+
771
+ - id: bmad-integration
772
+ title: BMad Integration Architecture
773
+ instruction: Design infrastructure to specifically support other BMad agents and their workflows. This ensures the infrastructure enables the entire BMad methodology.
774
+ sections:
775
+ - id: dev-agent-support
776
+ title: Development Agent Support
777
+ template: |
778
+ - Container platform for development environments
779
+ - GitOps workflows for application deployment
780
+ - Service mesh integration for development testing
781
+ - Developer self-service platform capabilities
782
+ - id: product-architecture-alignment
783
+ title: Product & Architecture Alignment
784
+ template: |
785
+ - Infrastructure implementing PRD scalability requirements
786
+ - Deployment automation supporting product iteration speed
787
+ - Service reliability meeting product SLAs
788
+ - Architecture patterns properly implemented in infrastructure
789
+ - id: cross-agent-integration
790
+ title: Cross-Agent Integration Points
791
+ template: |
792
+ - CI/CD pipelines supporting Frontend, Backend, and Full Stack development workflows
793
+ - Monitoring and observability data accessible to QA and DevOps agents
794
+ - Infrastructure enabling Design Architect's UI/UX performance requirements
795
+ - Platform supporting Analyst's data collection and analysis needs
796
+
797
+ - id: feasibility-review
798
+ title: DevOps/Platform Feasibility Review
799
+ instruction: |
800
+ CRITICAL STEP - Present architectural blueprint summary to DevOps/Platform Engineering Agent for feasibility review. Request specific feedback on:
801
+
802
+ - **Operational Complexity:** Are the proposed patterns implementable with current tooling and expertise?
803
+ - **Resource Constraints:** Do infrastructure requirements align with available resources and budgets?
804
+ - **Security Implementation:** Are security patterns achievable with current security toolchain?
805
+ - **Operational Overhead:** Will the proposed architecture create excessive operational burden?
806
+ - **Technology Constraints:** Are selected technologies compatible with existing infrastructure?
807
+
808
+ Document all feasibility feedback and concerns raised. Iterate on architectural decisions based on operational constraints and feedback.
809
+
810
+ <critical_rule>Address all critical feasibility concerns before proceeding to final architecture documentation. If critical blockers identified, revise architecture before continuing.</critical_rule>
811
+ sections:
812
+ - id: feasibility-results
813
+ title: Feasibility Assessment Results
814
+ template: |
815
+ - **Green Light Items:** {{feasible_items}}
816
+ - **Yellow Light Items:** {{items_needing_adjustment}}
817
+ - **Red Light Items:** {{items_requiring_redesign}}
818
+ - **Mitigation Strategies:** {{mitigation_plans}}
819
+
820
+ - id: infrastructure-verification
821
+ title: Infrastructure Verification
822
+ sections:
823
+ - id: validation-framework
824
+ title: Validation Framework
825
+ content: |
826
+ This infrastructure architecture will be validated using the comprehensive `infrastructure-checklist.md`, with particular focus on Section 12: Architecture Documentation Validation. The checklist ensures:
827
+
828
+ - Completeness of architecture documentation
829
+ - Consistency with broader system architecture
830
+ - Appropriate level of detail for different stakeholders
831
+ - Clear implementation guidance
832
+ - Future evolution considerations
833
+ - id: validation-process
834
+ title: Validation Process
835
+ content: |
836
+ The architecture documentation validation should be performed:
837
+
838
+ - After initial architecture development
839
+ - After significant architecture changes
840
+ - Before major implementation phases
841
+ - During periodic architecture reviews
842
+
843
+ The Platform Engineer should use the infrastructure checklist to systematically validate all aspects of this architecture document.
844
+
845
+ - id: implementation-handoff
846
+ title: Implementation Handoff
847
+ instruction: Create structured handoff documentation for implementation team. This ensures architecture decisions are properly communicated and implemented.
848
+ sections:
849
+ - id: adrs
850
+ title: Architecture Decision Records (ADRs)
851
+ content: |
852
+ Create ADRs for key infrastructure decisions:
853
+
854
+ - Cloud provider selection rationale
855
+ - Container orchestration platform choice
856
+ - Networking architecture decisions
857
+ - Security implementation choices
858
+ - Cost optimization trade-offs
859
+ - id: implementation-validation
860
+ title: Implementation Validation Criteria
861
+ content: |
862
+ Define specific criteria for validating correct implementation:
863
+
864
+ - Infrastructure as Code quality gates
865
+ - Security compliance checkpoints
866
+ - Performance benchmarks
867
+ - Cost targets
868
+ - Operational readiness criteria
869
+ - id: knowledge-transfer
870
+ title: Knowledge Transfer Requirements
871
+ template: |
872
+ - Technical documentation for operations team
873
+ - Runbook creation requirements
874
+ - Training needs for platform team
875
+ - Handoff meeting agenda items
876
+
877
+ - id: infrastructure-evolution
878
+ title: Infrastructure Evolution
879
+ instruction: Document the long-term vision and evolution path for the infrastructure. Consider technology trends, anticipated growth, and technical debt management.
880
+ template: |
881
+ - Technical Debt Inventory
882
+ - Planned Upgrades and Migrations
883
+ - Deprecation Schedule
884
+ - Technology Roadmap
885
+ - Capacity Planning
886
+ - Scalability Considerations
887
+
888
+ - id: app-integration
889
+ title: Integration with Application Architecture
890
+ instruction: Map infrastructure components to application services. Ensure infrastructure design supports application requirements and patterns defined in main architecture.
891
+ template: |
892
+ - Service-to-Infrastructure Mapping
893
+ - Application Dependency Matrix
894
+ - Performance Requirements Implementation
895
+ - Security Requirements Implementation
896
+ - Data Flow to Infrastructure Correlation
897
+ - API Gateway and Service Mesh Integration
898
+
899
+ - id: cross-team-collaboration
900
+ title: Cross-Team Collaboration
901
+ instruction: Define clear interfaces and communication patterns between teams. This section is critical for operational success and should include specific touchpoints and escalation paths.
902
+ template: |
903
+ - Platform Engineer and Developer Touchpoints
904
+ - Frontend/Backend Integration Requirements
905
+ - Product Requirements to Infrastructure Mapping
906
+ - Architecture Decision Impact Analysis
907
+ - Design Architect UI/UX Infrastructure Requirements
908
+ - Analyst Research Integration
909
+
910
+ - id: change-management
911
+ title: Infrastructure Change Management
912
+ instruction: Define structured process for infrastructure changes. Include risk assessment, testing requirements, and rollback procedures.
913
+ template: |
914
+ - Change Request Process
915
+ - Risk Assessment
916
+ - Testing Strategy
917
+ - Validation Procedures
918
+
919
+ - id: final-review
920
+ instruction: Final Review - Ensure all sections are complete and consistent. Verify feasibility review was conducted and all concerns addressed. Apply final validation against infrastructure checklist.
921
+ content: |
922
+ ---
923
+
924
+ _Document Version: 1.0_
925
+ _Last Updated: {{current_date}}_
926
+ _Next Review: {{review_date}}_
927
+ ==================== END: .bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml ====================
928
+
929
+ ==================== START: .bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml ====================
930
+ template:
931
+ id: infrastructure-platform-template-v2
932
+ name: Platform Infrastructure Implementation
933
+ version: 2.0
934
+ output:
935
+ format: markdown
936
+ filename: docs/platform-infrastructure/platform-implementation.md
937
+ title: "{{project_name}} Platform Infrastructure Implementation"
938
+
939
+ workflow:
940
+ mode: interactive
941
+ elicitation: advanced-elicitation
942
+ custom_elicitation:
943
+ title: "Platform Implementation Elicitation Actions"
944
+ sections:
945
+ - id: foundation-infrastructure
946
+ options:
947
+ - "Platform Layer Security Hardening - Additional security controls and compliance validation"
948
+ - "Performance Optimization - Network and resource optimization"
949
+ - "Operational Excellence Enhancement - Automation and monitoring improvements"
950
+ - "Platform Integration Validation - Verify foundation supports upper layers"
951
+ - "Developer Experience Analysis - Foundation impact on developer workflows"
952
+ - "Disaster Recovery Testing - Foundation resilience validation"
953
+ - "BMAD Workflow Integration - Cross-agent support verification"
954
+ - "Finalize and Proceed to Container Platform"
955
+
956
+ sections:
957
+ - id: initial-setup
958
+ instruction: |
959
+ Initial Setup
960
+
961
+ 1. Replace {{project_name}} with the actual project name throughout the document
962
+ 2. Gather and review required inputs:
963
+ - **Infrastructure Architecture Document** (Primary input - REQUIRED)
964
+ - Infrastructure Change Request (if applicable)
965
+ - Infrastructure Guidelines
966
+ - Technology Stack Document
967
+ - Infrastructure Checklist
968
+ - NOTE: If Infrastructure Architecture Document is missing, HALT and request: "I need the Infrastructure Architecture Document to proceed with platform implementation. This document defines the infrastructure design that we'll be implementing."
969
+
970
+ 3. Validate that the infrastructure architecture has been reviewed and approved
971
+ 4. <critical_rule>All platform implementation must align with the approved infrastructure architecture. Any deviations require architect approval.</critical_rule>
972
+
973
+ Output file location: `docs/platform-infrastructure/platform-implementation.md`
974
+
975
+ - id: executive-summary
976
+ title: Executive Summary
977
+ instruction: Provide a high-level overview of the platform infrastructure being implemented, referencing the infrastructure architecture document's key decisions and requirements.
978
+ template: |
979
+ - Platform implementation scope and objectives
980
+ - Key architectural decisions being implemented
981
+ - Expected outcomes and benefits
982
+ - Timeline and milestones
983
+
984
+ - id: joint-planning
985
+ title: Joint Planning Session with Architect
986
+ instruction: Document the collaborative planning session between DevOps/Platform Engineer and Architect. This ensures alignment before implementation begins.
987
+ sections:
988
+ - id: architecture-alignment
989
+ title: Architecture Alignment Review
990
+ template: |
991
+ - Review of infrastructure architecture document
992
+ - Confirmation of design decisions
993
+ - Identification of any ambiguities or gaps
994
+ - Agreement on implementation approach
995
+ - id: implementation-strategy
996
+ title: Implementation Strategy Collaboration
997
+ template: |
998
+ - Platform layer sequencing
999
+ - Technology stack validation
1000
+ - Integration approach between layers
1001
+ - Testing and validation strategy
1002
+ - id: risk-constraint
1003
+ title: Risk & Constraint Discussion
1004
+ template: |
1005
+ - Technical risks and mitigation strategies
1006
+ - Resource constraints and workarounds
1007
+ - Timeline considerations
1008
+ - Compliance and security requirements
1009
+ - id: validation-planning
1010
+ title: Implementation Validation Planning
1011
+ template: |
1012
+ - Success criteria for each platform layer
1013
+ - Testing approach and acceptance criteria
1014
+ - Rollback strategies
1015
+ - Communication plan
1016
+ - id: documentation-planning
1017
+ title: Documentation & Knowledge Transfer Planning
1018
+ template: |
1019
+ - Documentation requirements
1020
+ - Knowledge transfer approach
1021
+ - Training needs identification
1022
+ - Handoff procedures
1023
+
1024
+ - id: foundation-infrastructure
1025
+ title: Foundation Infrastructure Layer
1026
+ instruction: Implement the base infrastructure layer based on the infrastructure architecture. This forms the foundation for all platform services.
1027
+ elicit: true
1028
+ custom_elicitation: foundation-infrastructure
1029
+ sections:
1030
+ - id: cloud-provider-setup
1031
+ title: Cloud Provider Setup
1032
+ template: |
1033
+ - Account/Subscription configuration
1034
+ - Region selection and setup
1035
+ - Resource group/organizational structure
1036
+ - Cost management setup
1037
+ - id: network-foundation
1038
+ title: Network Foundation
1039
+ type: code
1040
+ language: hcl
1041
+ template: |
1042
+ # Example Terraform for VPC setup
1043
+ module "vpc" {
1044
+ source = "./modules/vpc"
1045
+
1046
+ cidr_block = "{{vpc_cidr}}"
1047
+ availability_zones = {{availability_zones}}
1048
+ public_subnets = {{public_subnets}}
1049
+ private_subnets = {{private_subnets}}
1050
+ }
1051
+ - id: security-foundation
1052
+ title: Security Foundation
1053
+ template: |
1054
+ - IAM roles and policies
1055
+ - Security groups and NACLs
1056
+ - Encryption keys (KMS/Key Vault)
1057
+ - Compliance controls
1058
+ - id: core-services
1059
+ title: Core Services
1060
+ template: |
1061
+ - DNS configuration
1062
+ - Certificate management
1063
+ - Logging infrastructure
1064
+ - Monitoring foundation
1065
+
1066
+ - id: container-platform
1067
+ title: Container Platform Implementation
1068
+ instruction: Build the container orchestration platform on top of the foundation infrastructure, following the architecture's container strategy.
1069
+ sections:
1070
+ - id: kubernetes-setup
1071
+ title: Kubernetes Cluster Setup
1072
+ sections:
1073
+ - id: eks-setup
1074
+ condition: Uses EKS
1075
+ type: code
1076
+ language: bash
1077
+ template: |
1078
+ # EKS Cluster Configuration
1079
+ eksctl create cluster \
1080
+ --name {{cluster_name}} \
1081
+ --region {{aws_region}} \
1082
+ --nodegroup-name {{nodegroup_name}} \
1083
+ --node-type {{instance_type}} \
1084
+ --nodes {{node_count}}
1085
+ - id: aks-setup
1086
+ condition: Uses AKS
1087
+ type: code
1088
+ language: bash
1089
+ template: |
1090
+ # AKS Cluster Configuration
1091
+ az aks create \
1092
+ --resource-group {{resource_group}} \
1093
+ --name {{cluster_name}} \
1094
+ --node-count {{node_count}} \
1095
+ --node-vm-size {{vm_size}} \
1096
+ --network-plugin azure
1097
+ - id: node-configuration
1098
+ title: Node Configuration
1099
+ template: |
1100
+ - Node groups/pools setup
1101
+ - Autoscaling configuration
1102
+ - Node security hardening
1103
+ - Resource quotas and limits
1104
+ - id: cluster-services
1105
+ title: Cluster Services
1106
+ template: |
1107
+ - CoreDNS configuration
1108
+ - Ingress controller setup
1109
+ - Certificate management
1110
+ - Storage classes
1111
+ - id: security-rbac
1112
+ title: Security & RBAC
1113
+ template: |
1114
+ - RBAC policies
1115
+ - Pod security policies/standards
1116
+ - Network policies
1117
+ - Secrets management
1118
+
1119
+ - id: gitops-workflow
1120
+ title: GitOps Workflow Implementation
1121
+ instruction: Implement GitOps patterns for declarative infrastructure and application management as defined in the architecture.
1122
+ sections:
1123
+ - id: gitops-tooling
1124
+ title: GitOps Tooling Setup
1125
+ sections:
1126
+ - id: argocd-setup
1127
+ condition: Uses ArgoCD
1128
+ type: code
1129
+ language: yaml
1130
+ template: |
1131
+ apiVersion: argoproj.io/v1alpha1
1132
+ kind: Application
1133
+ metadata:
1134
+ name: argocd
1135
+ namespace: argocd
1136
+ spec:
1137
+ source:
1138
+ repoURL: {{repo_url}}
1139
+ targetRevision: {{target_revision}}
1140
+ path: {{path}}
1141
+ - id: flux-setup
1142
+ condition: Uses Flux
1143
+ type: code
1144
+ language: yaml
1145
+ template: |
1146
+ apiVersion: source.toolkit.fluxcd.io/v1beta2
1147
+ kind: GitRepository
1148
+ metadata:
1149
+ name: flux-system
1150
+ namespace: flux-system
1151
+ spec:
1152
+ interval: 1m
1153
+ ref:
1154
+ branch: {{branch}}
1155
+ url: {{git_url}}
1156
+ - id: repository-structure
1157
+ title: Repository Structure
1158
+ type: code
1159
+ language: text
1160
+ template: |
1161
+ platform-gitops/
1162
+ clusters/
1163
+ production/
1164
+ staging/
1165
+ development/
1166
+ infrastructure/
1167
+ base/
1168
+ overlays/
1169
+ applications/
1170
+ base/
1171
+ overlays/
1172
+ - id: deployment-workflows
1173
+ title: Deployment Workflows
1174
+ template: |
1175
+ - Application deployment patterns
1176
+ - Progressive delivery setup
1177
+ - Rollback procedures
1178
+ - Multi-environment promotion
1179
+ - id: access-control
1180
+ title: Access Control
1181
+ template: |
1182
+ - Git repository permissions
1183
+ - GitOps tool RBAC
1184
+ - Secret management integration
1185
+ - Audit logging
1186
+
1187
+ - id: service-mesh
1188
+ title: Service Mesh Implementation
1189
+ instruction: Deploy service mesh for advanced traffic management, security, and observability as specified in the architecture.
1190
+ sections:
1191
+ - id: istio-mesh
1192
+ title: Istio Service Mesh
1193
+ condition: Uses Istio
1194
+ sections:
1195
+ - id: istio-install
1196
+ type: code
1197
+ language: bash
1198
+ template: |
1199
+ # Istio Installation
1200
+ istioctl install --set profile={{istio_profile}} \
1201
+ --set values.gateways.istio-ingressgateway.type={{ingress_type}}
1202
+ - id: istio-config
1203
+ template: |
1204
+ - Control plane configuration
1205
+ - Data plane injection
1206
+ - Gateway configuration
1207
+ - Observability integration
1208
+ - id: linkerd-mesh
1209
+ title: Linkerd Service Mesh
1210
+ condition: Uses Linkerd
1211
+ sections:
1212
+ - id: linkerd-install
1213
+ type: code
1214
+ language: bash
1215
+ template: |
1216
+ # Linkerd Installation
1217
+ linkerd install --cluster-name={{cluster_name}} | kubectl apply -f -
1218
+ linkerd viz install | kubectl apply -f -
1219
+ - id: linkerd-config
1220
+ template: |
1221
+ - Control plane setup
1222
+ - Proxy injection
1223
+ - Traffic policies
1224
+ - Metrics collection
1225
+ - id: traffic-management
1226
+ title: Traffic Management
1227
+ template: |
1228
+ - Load balancing policies
1229
+ - Circuit breakers
1230
+ - Retry policies
1231
+ - Canary deployments
1232
+ - id: security-policies
1233
+ title: Security Policies
1234
+ template: |
1235
+ - mTLS configuration
1236
+ - Authorization policies
1237
+ - Rate limiting
1238
+ - Network segmentation
1239
+
1240
+ - id: developer-experience
1241
+ title: Developer Experience Platform
1242
+ instruction: Build the developer self-service platform to enable efficient development workflows as outlined in the architecture.
1243
+ sections:
1244
+ - id: developer-portal
1245
+ title: Developer Portal
1246
+ template: |
1247
+ - Service catalog setup
1248
+ - API documentation
1249
+ - Self-service workflows
1250
+ - Resource provisioning
1251
+ - id: cicd-integration
1252
+ title: CI/CD Integration
1253
+ type: code
1254
+ language: yaml
1255
+ template: |
1256
+ apiVersion: tekton.dev/v1beta1
1257
+ kind: Pipeline
1258
+ metadata:
1259
+ name: platform-pipeline
1260
+ spec:
1261
+ tasks:
1262
+ - name: build
1263
+ taskRef:
1264
+ name: build-task
1265
+ - name: test
1266
+ taskRef:
1267
+ name: test-task
1268
+ - name: deploy
1269
+ taskRef:
1270
+ name: gitops-deploy
1271
+ - id: development-tools
1272
+ title: Development Tools
1273
+ template: |
1274
+ - Local development setup
1275
+ - Remote development environments
1276
+ - Testing frameworks
1277
+ - Debugging tools
1278
+ - id: self-service
1279
+ title: Self-Service Capabilities
1280
+ template: |
1281
+ - Environment provisioning
1282
+ - Database creation
1283
+ - Feature flag management
1284
+ - Configuration management
1285
+
1286
+ - id: platform-integration
1287
+ title: Platform Integration & Security Hardening
1288
+ instruction: Implement comprehensive platform-wide integration and security controls across all layers.
1289
+ sections:
1290
+ - id: end-to-end-security
1291
+ title: End-to-End Security
1292
+ template: |
1293
+ - Platform-wide security policies
1294
+ - Cross-layer authentication
1295
+ - Encryption in transit and at rest
1296
+ - Compliance validation
1297
+ - id: integrated-monitoring
1298
+ title: Integrated Monitoring
1299
+ type: code
1300
+ language: yaml
1301
+ template: |
1302
+ apiVersion: v1
1303
+ kind: ConfigMap
1304
+ metadata:
1305
+ name: prometheus-config
1306
+ data:
1307
+ prometheus.yaml: |
1308
+ global:
1309
+ scrape_interval: {{scrape_interval}}
1310
+ scrape_configs:
1311
+ - job_name: 'kubernetes-pods'
1312
+ kubernetes_sd_configs:
1313
+ - role: pod
1314
+ - id: platform-observability
1315
+ title: Platform Observability
1316
+ template: |
1317
+ - Metrics aggregation
1318
+ - Log collection and analysis
1319
+ - Distributed tracing
1320
+ - Dashboard creation
1321
+ - id: backup-dr
1322
+ title: Backup & Disaster Recovery
1323
+ template: |
1324
+ - Platform backup strategy
1325
+ - Disaster recovery procedures
1326
+ - RTO/RPO validation
1327
+ - Recovery testing
1328
+
1329
+ - id: platform-operations
1330
+ title: Platform Operations & Automation
1331
+ instruction: Establish operational procedures and automation for platform management.
1332
+ sections:
1333
+ - id: monitoring-alerting
1334
+ title: Monitoring & Alerting
1335
+ template: |
1336
+ - SLA/SLO monitoring
1337
+ - Alert routing
1338
+ - Incident response
1339
+ - Performance baselines
1340
+ - id: automation-framework
1341
+ title: Automation Framework
1342
+ type: code
1343
+ language: yaml
1344
+ template: |
1345
+ apiVersion: operators.coreos.com/v1alpha1
1346
+ kind: ClusterServiceVersion
1347
+ metadata:
1348
+ name: platform-operator
1349
+ spec:
1350
+ customresourcedefinitions:
1351
+ owned:
1352
+ - name: platformconfigs.platform.io
1353
+ version: v1alpha1
1354
+ - id: maintenance-procedures
1355
+ title: Maintenance Procedures
1356
+ template: |
1357
+ - Upgrade procedures
1358
+ - Patch management
1359
+ - Certificate rotation
1360
+ - Capacity management
1361
+ - id: operational-runbooks
1362
+ title: Operational Runbooks
1363
+ template: |
1364
+ - Common operational tasks
1365
+ - Troubleshooting guides
1366
+ - Emergency procedures
1367
+ - Recovery playbooks
1368
+
1369
+ - id: bmad-workflow-integration
1370
+ title: BMAD Workflow Integration
1371
+ instruction: Validate that the platform supports all BMAD agent workflows and cross-functional requirements.
1372
+ sections:
1373
+ - id: development-agent-support
1374
+ title: Development Agent Support
1375
+ template: |
1376
+ - Frontend development workflows
1377
+ - Backend development workflows
1378
+ - Full-stack integration
1379
+ - Local development experience
1380
+ - id: iac-development
1381
+ title: Infrastructure-as-Code Development
1382
+ template: |
1383
+ - IaC development workflows
1384
+ - Testing frameworks
1385
+ - Deployment automation
1386
+ - Version control integration
1387
+ - id: cross-agent-collaboration
1388
+ title: Cross-Agent Collaboration
1389
+ template: |
1390
+ - Shared services access
1391
+ - Communication patterns
1392
+ - Data sharing mechanisms
1393
+ - Security boundaries
1394
+ - id: cicd-integration-workflow
1395
+ title: CI/CD Integration
1396
+ type: code
1397
+ language: yaml
1398
+ template: |
1399
+ stages:
1400
+ - analyze
1401
+ - plan
1402
+ - architect
1403
+ - develop
1404
+ - test
1405
+ - deploy
1406
+
1407
+ - id: platform-validation
1408
+ title: Platform Validation & Testing
1409
+ instruction: Execute comprehensive validation to ensure the platform meets all requirements.
1410
+ sections:
1411
+ - id: functional-testing
1412
+ title: Functional Testing
1413
+ template: |
1414
+ - Component testing
1415
+ - Integration testing
1416
+ - End-to-end testing
1417
+ - Performance testing
1418
+ - id: security-validation
1419
+ title: Security Validation
1420
+ template: |
1421
+ - Penetration testing
1422
+ - Compliance scanning
1423
+ - Vulnerability assessment
1424
+ - Access control validation
1425
+ - id: dr-testing
1426
+ title: Disaster Recovery Testing
1427
+ template: |
1428
+ - Backup restoration
1429
+ - Failover procedures
1430
+ - Recovery time validation
1431
+ - Data integrity checks
1432
+ - id: load-testing
1433
+ title: Load Testing
1434
+ type: code
1435
+ language: typescript
1436
+ template: |
1437
+ // K6 Load Test Example
1438
+ import http from 'k6/http';
1439
+ import { check } from 'k6';
1440
+
1441
+ export let options = {
1442
+ stages: [
1443
+ { duration: '5m', target: {{target_users}} },
1444
+ { duration: '10m', target: {{target_users}} },
1445
+ { duration: '5m', target: 0 },
1446
+ ],
1447
+ };
1448
+
1449
+ - id: knowledge-transfer
1450
+ title: Knowledge Transfer & Documentation
1451
+ instruction: Prepare comprehensive documentation and knowledge transfer materials.
1452
+ sections:
1453
+ - id: platform-documentation
1454
+ title: Platform Documentation
1455
+ template: |
1456
+ - Architecture documentation
1457
+ - Operational procedures
1458
+ - Configuration reference
1459
+ - API documentation
1460
+ - id: training-materials
1461
+ title: Training Materials
1462
+ template: |
1463
+ - Developer guides
1464
+ - Operations training
1465
+ - Security best practices
1466
+ - Troubleshooting guides
1467
+ - id: handoff-procedures
1468
+ title: Handoff Procedures
1469
+ template: |
1470
+ - Team responsibilities
1471
+ - Escalation procedures
1472
+ - Support model
1473
+ - Knowledge base
1474
+
1475
+ - id: implementation-review
1476
+ title: Implementation Review with Architect
1477
+ instruction: Document the post-implementation review session with the Architect to validate alignment and capture learnings.
1478
+ sections:
1479
+ - id: implementation-validation
1480
+ title: Implementation Validation
1481
+ template: |
1482
+ - Architecture alignment verification
1483
+ - Deviation documentation
1484
+ - Performance validation
1485
+ - Security review
1486
+ - id: lessons-learned
1487
+ title: Lessons Learned
1488
+ template: |
1489
+ - What went well
1490
+ - Challenges encountered
1491
+ - Process improvements
1492
+ - Technical insights
1493
+ - id: future-evolution
1494
+ title: Future Evolution
1495
+ template: |
1496
+ - Enhancement opportunities
1497
+ - Technical debt items
1498
+ - Upgrade planning
1499
+ - Capacity planning
1500
+ - id: sign-off
1501
+ title: Sign-off & Acceptance
1502
+ template: |
1503
+ - Architect approval
1504
+ - Stakeholder acceptance
1505
+ - Go-live authorization
1506
+ - Support transition
1507
+
1508
+ - id: platform-metrics
1509
+ title: Platform Metrics & KPIs
1510
+ instruction: Define and implement key performance indicators for platform success measurement.
1511
+ sections:
1512
+ - id: technical-metrics
1513
+ title: Technical Metrics
1514
+ template: |
1515
+ - Platform availability: {{availability_target}}
1516
+ - Response time: {{response_time_target}}
1517
+ - Resource utilization: {{utilization_target}}
1518
+ - Error rates: {{error_rate_target}}
1519
+ - id: business-metrics
1520
+ title: Business Metrics
1521
+ template: |
1522
+ - Developer productivity
1523
+ - Deployment frequency
1524
+ - Lead time for changes
1525
+ - Mean time to recovery
1526
+ - id: operational-metrics
1527
+ title: Operational Metrics
1528
+ template: |
1529
+ - Incident response time
1530
+ - Patch compliance
1531
+ - Cost per workload
1532
+ - Resource efficiency
1533
+
1534
+ - id: appendices
1535
+ title: Appendices
1536
+ sections:
1537
+ - id: config-reference
1538
+ title: A. Configuration Reference
1539
+ instruction: Document all configuration parameters and their values used in the platform implementation.
1540
+ - id: troubleshooting
1541
+ title: B. Troubleshooting Guide
1542
+ instruction: Provide common issues and their resolutions for platform operations.
1543
+ - id: security-controls
1544
+ title: C. Security Controls Matrix
1545
+ instruction: Map implemented security controls to compliance requirements.
1546
+ - id: integration-points
1547
+ title: D. Integration Points
1548
+ instruction: Document all integration points with external systems and services.
1549
+
1550
+ - id: final-review
1551
+ instruction: Final Review - Ensure all platform layers are properly implemented, integrated, and documented. Verify that the implementation fully supports the BMAD methodology and all agent workflows. Confirm successful validation against the infrastructure checklist.
1552
+ content: |
1553
+ ---
1554
+
1555
+ _Platform Version: 1.0_
1556
+ _Implementation Date: {{implementation_date}}_
1557
+ _Next Review: {{review_date}}_
1558
+ _Approved by: {{architect_name}} (Architect), {{devops_name}} (DevOps/Platform Engineer)_
1559
+ ==================== END: .bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml ====================
1553
1560
 
1554
1561
  ==================== START: .bmad-infrastructure-devops/checklists/infrastructure-checklist.md ====================
1555
1562
  # Infrastructure Change Validation Checklist
@@ -2043,32 +2050,3 @@ This checklist serves as a comprehensive framework for validating infrastructure
2043
2050
 
2044
2051
  None Listed
2045
2052
  ==================== END: .bmad-infrastructure-devops/data/technical-preferences.md ====================
2046
-
2047
- ==================== START: .bmad-infrastructure-devops/utils/template-format.md ====================
2048
- # Template Format Conventions
2049
-
2050
- Templates in the BMad method use standardized markup for AI processing. These conventions ensure consistent document generation.
2051
-
2052
- ## Template Markup Elements
2053
-
2054
- - **{{placeholders}}**: Variables to be replaced with actual content
2055
- - **[[LLM: instructions]]**: Internal processing instructions for AI agents (never shown to users)
2056
- - **REPEAT** sections: Content blocks that may be repeated as needed
2057
- - **^^CONDITION^^** blocks: Conditional content included only if criteria are met
2058
- - **@{examples}**: Example content for guidance (never output to users)
2059
-
2060
- ## Processing Rules
2061
-
2062
- - Replace all {{placeholders}} with project-specific content
2063
- - Execute all [[LLM: instructions]] internally without showing users
2064
- - Process conditional and repeat blocks as specified
2065
- - Use examples for guidance but never include them in final output
2066
- - Present only clean, formatted content to users
2067
-
2068
- ## Critical Guidelines
2069
-
2070
- - **NEVER display template markup, LLM instructions, or examples to users**
2071
- - Template elements are for AI processing only
2072
- - Focus on faithful template execution and clean output
2073
- - All template-specific instructions are embedded within templates
2074
- ==================== END: .bmad-infrastructure-devops/utils/template-format.md ====================