diff --git a/bmad-agent/checklists/infrastructure-checklist.md b/bmad-agent/checklists/infrastructure-checklist.md index 9d4c25ce..7ae5e109 100644 --- a/bmad-agent/checklists/infrastructure-checklist.md +++ b/bmad-agent/checklists/infrastructure-checklist.md @@ -322,11 +322,155 @@ This checklist serves as a comprehensive framework for validating infrastructure - [ ] Operations considerations explicitly addressed - [ ] Future evolution pathways documented +## 13. CONTAINER PLATFORM VALIDATION + +### 13.1 Cluster Configuration & Security + +- [ ] Container orchestration platform properly installed and configured +- [ ] Cluster nodes configured with appropriate resource allocation and security policies +- [ ] Control plane high availability and security hardening implemented +- [ ] API server access controls and authentication mechanisms configured +- [ ] Cluster networking properly configured with security policies + +### 13.2 RBAC & Access Control + +- [ ] Role-Based Access Control (RBAC) implemented with least privilege principles +- [ ] Service accounts configured with minimal required permissions +- [ ] Pod security policies and security contexts properly configured +- [ ] Network policies implemented for micro-segmentation +- [ ] Secrets management integration configured and validated + +### 13.3 Workload Management & Resource Control + +- [ ] Resource quotas and limits configured per namespace/tenant requirements +- [ ] Horizontal and vertical pod autoscaling configured and tested +- [ ] Cluster autoscaling configured for node management +- [ ] Workload scheduling policies and node affinity rules implemented +- [ ] Container image security scanning and policy enforcement configured + +### 13.4 Container Platform Operations + +- [ ] Container platform monitoring and observability configured +- [ ] Container workload logging aggregation implemented +- [ ] Platform health checks and performance monitoring operational +- [ ] Backup and disaster recovery procedures for cluster state configured +- [ ] Operational runbooks and troubleshooting guides created + +## 14. GITOPS WORKFLOWS VALIDATION + +### 14.1 GitOps Operator & Configuration + +- [ ] GitOps operators properly installed and configured +- [ ] Application and configuration sync controllers operational +- [ ] Multi-cluster management configured (if required) +- [ ] Sync policies, retry mechanisms, and conflict resolution configured +- [ ] Automated pruning and drift detection operational + +### 14.2 Repository Structure & Management + +- [ ] Repository structure follows GitOps best practices +- [ ] Configuration templating and parameterization properly implemented +- [ ] Environment-specific configuration overlays configured +- [ ] Configuration validation and policy enforcement implemented +- [ ] Version control and branching strategies properly defined + +### 14.3 Environment Promotion & Automation + +- [ ] Environment promotion pipelines operational (dev → staging → prod) +- [ ] Automated testing and validation gates configured +- [ ] Approval workflows and change management integration implemented +- [ ] Automated rollback mechanisms configured and tested +- [ ] Promotion notifications and audit trails operational + +### 14.4 GitOps Security & Compliance + +- [ ] GitOps security best practices and access controls implemented +- [ ] Policy enforcement for configurations and deployments operational +- [ ] Secret management integration with GitOps workflows configured +- [ ] Security scanning for configuration changes implemented +- [ ] Audit logging and compliance monitoring configured + +## 15. SERVICE MESH VALIDATION + +### 15.1 Service Mesh Architecture & Installation + +- [ ] Service mesh control plane properly installed and configured +- [ ] Data plane (sidecars/proxies) deployed and configured correctly +- [ ] Service mesh components integrated with container platform +- [ ] Service mesh networking and connectivity validated +- [ ] Resource allocation and performance tuning for mesh components optimal + +### 15.2 Traffic Management & Communication + +- [ ] Traffic routing rules and policies configured and tested +- [ ] Load balancing strategies and failover mechanisms operational +- [ ] Traffic splitting for canary deployments and A/B testing configured +- [ ] Circuit breakers and retry policies implemented and validated +- [ ] Timeout and rate limiting policies configured + +### 15.3 Service Mesh Security + +- [ ] Mutual TLS (mTLS) implemented for service-to-service communication +- [ ] Service-to-service authorization policies configured +- [ ] Identity and access management integration operational +- [ ] Network security policies and micro-segmentation implemented +- [ ] Security audit logging for service mesh events configured + +### 15.4 Service Discovery & Observability + +- [ ] Service discovery mechanisms and service registry integration operational +- [ ] Advanced load balancing algorithms and health checking configured +- [ ] Service mesh observability (metrics, logs, traces) implemented +- [ ] Distributed tracing for service communication operational +- [ ] Service dependency mapping and topology visualization available + +## 16. DEVELOPER EXPERIENCE PLATFORM VALIDATION + +### 16.1 Self-Service Infrastructure + +- [ ] Self-service provisioning for development environments operational +- [ ] Automated resource provisioning and management configured +- [ ] Namespace/project provisioning with proper resource limits implemented +- [ ] Self-service database and storage provisioning available +- [ ] Automated cleanup and resource lifecycle management operational + +### 16.2 Developer Tooling & Templates + +- [ ] Golden path templates for common application patterns available and tested +- [ ] Project scaffolding and boilerplate generation operational +- [ ] Template versioning and update mechanisms configured +- [ ] Template customization and parameterization working correctly +- [ ] Template compliance and security scanning implemented + +### 16.3 Platform APIs & Integration + +- [ ] Platform APIs for infrastructure interaction operational and documented +- [ ] API authentication and authorization properly configured +- [ ] API documentation and developer resources available and current +- [ ] Workflow automation and integration capabilities tested +- [ ] API rate limiting and usage monitoring configured + +### 16.4 Developer Experience & Documentation + +- [ ] Comprehensive developer onboarding documentation available +- [ ] Interactive tutorials and getting-started guides functional +- [ ] Developer environment setup automation operational +- [ ] Access provisioning and permissions management streamlined +- [ ] Troubleshooting guides and FAQ resources current and accessible + +### 16.5 Productivity & Analytics + +- [ ] Development tool integrations (IDEs, CLI tools) operational +- [ ] Developer productivity dashboards and metrics implemented +- [ ] Development workflow optimization tools available +- [ ] Platform usage monitoring and analytics configured +- [ ] User feedback collection and analysis mechanisms operational + --- ### Prerequisites Verified -- [ ] All checklist sections reviewed +- [ ] All checklist sections reviewed (1-16) - [ ] No outstanding critical or high-severity issues - [ ] All infrastructure changes tested in non-production environment - [ ] Rollback plan documented and tested @@ -336,3 +480,5 @@ This checklist serves as a comprehensive framework for validating infrastructure - [ ] Infrastructure changes mapped to relevant user stories and epics - [ ] Release coordination planned with development teams - [ ] Local development environment compatibility verified +- [ ] Platform component integration validated +- [ ] Cross-platform functionality tested and verified diff --git a/bmad-agent/personas/devops-pe.ide.md b/bmad-agent/personas/devops-pe.ide.md index b59565dd..18d0825f 100644 --- a/bmad-agent/personas/devops-pe.ide.md +++ b/bmad-agent/personas/devops-pe.ide.md @@ -48,14 +48,6 @@ - **Financial Operations & Cost Optimization** - Resource rightsizing, cost allocation, billing optimization, FinOps practices - **Environmental Sustainability** - Green computing practices, carbon-aware computing, energy efficiency optimization -## Domain Boundaries with Architecture - -### Collaboration Protocols -- **Design Review Gates:** Architecture produces technical specifications, DevOps/Platform reviews for implementability -- **Feasibility Feedback:** DevOps/Platform provides operational constraints during architecture design phase -- **Implementation Planning:** Joint sessions to translate architectural decisions into operational tasks -- **Escalation Paths:** Technical debt, performance issues, or technology evolution trigger architectural review - ## Essential Context & Reference Documents MUST review and use: @@ -66,6 +58,7 @@ MUST review and use: - `Technology Stack`: `docs/tech-stack.md` - `Infrastructure Change Checklist`: `docs/checklists/infrastructure-checklist.md` - `Debug Log` (project root, managed by Agent) +- **Platform Infrastructure Implementation Task** - Comprehensive task covering all core platform domains (foundation infrastructure, container orchestration, GitOps workflows, service mesh, developer experience platforms) ## Initial Context Gathering @@ -104,7 +97,7 @@ For implementation scenarios, summarize key context: 2. **Implementation & Development:** - - Execute infrastructure changes sequentially using infrastructure-as-code practices. + - Execute platform infrastructure changes sequentially using infrastructure-as-code practices, implementing the integrated platform stack (foundation infrastructure, container orchestration, GitOps workflows, service mesh, developer experience platforms). - **External Service Protocol:** - If a new, unlisted cloud service or third-party tool is essential: a. HALT implementation concerning the service/tool. @@ -112,19 +105,19 @@ For implementation scenarios, summarize key context: c. Ask user for explicit approval for this service/tool. d. ONLY upon user's explicit approval, document it in the change request and proceed. - **Debugging Protocol:** - - For infrastructure troubleshooting: + - For platform infrastructure troubleshooting: a. MUST log in `Debug Log` _before_ applying changes: include resource, change description, expected outcome. b. Update `Debug Log` entry status during work (e.g., 'Issue persists', 'Resolved'). - If an issue persists after 3-4 debug cycles: pause, document issue/steps in change request, then ask user for guidance. - - Update task/subtask status in change request as you progress. + - Update task/subtask status in change request as you progress through platform layers. 3. **Testing & Validation:** - - Validate infrastructure changes in non-production environment first. - - Run security and compliance checks on infrastructure code. - - Verify monitoring and alerting is properly configured. - - Test disaster recovery procedures and document recovery time objectives (RTOs) and recovery point objectives (RPOs). - - Validate backup and restore operations for critical components. + - Validate platform infrastructure changes in non-production environment first, including integration testing between platform layers. + - Run security and compliance checks on infrastructure code and platform configurations. + - Verify monitoring and alerting is properly configured across the entire platform stack. + - Test disaster recovery procedures and document recovery time objectives (RTOs) and recovery point objectives (RPOs) for the complete platform. + - Validate backup and restore operations for critical platform components. - All validation tests MUST pass before deployment to production. 4. **Handling Blockers & Clarifications:** @@ -192,4 +185,13 @@ For complex technical problems, use a structured meta-reasoning approach: - /validate-infra - run infrastructure validation tests - /security-scan - execute security scan on infrastructure code - /cost-estimate - generate cost analysis for infrastructure change +- /platform-status - check status of integrated platform stack implementation - /explain {something} - teach or inform about {something} + +## Domain Boundaries with Architecture + +### Collaboration Protocols +- **Design Review Gates:** Architecture produces technical specifications, DevOps/Platform reviews for implementability +- **Feasibility Feedback:** DevOps/Platform provides operational constraints during architecture design phase +- **Implementation Planning:** Joint sessions to translate architectural decisions into operational tasks +- **Escalation Paths:** Technical debt, performance issues, or technology evolution trigger architectural review diff --git a/bmad-agent/tasks/create-infrastructure-architecture.md b/bmad-agent/tasks/create-infrastructure-architecture.md index 7f471e81..50d533e0 100644 --- a/bmad-agent/tasks/create-infrastructure-architecture.md +++ b/bmad-agent/tasks/create-infrastructure-architecture.md @@ -2,7 +2,7 @@ ## Purpose -To design a comprehensive infrastructure architecture that defines all aspects of the technical infrastructure, from cloud resources to deployment pipelines. This architecture will serve as the foundation for all infrastructure implementations, ensuring consistency, security, and operational excellence. +To design a comprehensive infrastructure architecture that defines all aspects of the technical infrastructure strategy, from cloud platform selection to deployment patterns. This architecture will serve as the definitive blueprint for the DevOps/Platform Engineering team to implement, ensuring consistency, security, and operational excellence across all infrastructure components. ## Inputs @@ -21,76 +21,109 @@ To design a comprehensive infrastructure architecture that defines all aspects o B. **"YOLO" Mode:** I can produce a comprehensive initial draft of the infrastructure architecture for you to review more broadly first. We can then iterate on specific sections based on your feedback." - Request the user to select their preferred mode and proceed accordingly. -### 2. Gather Requirements +### 2. Gather Infrastructure Requirements -- Review the product requirements document to understand business needs -- Identify infrastructure needs from the application architecture -- Document non-functional requirements (performance, scalability, reliability) -- Identify compliance and security requirements +- 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) +- Identify compliance and regulatory requirements affecting infrastructure +- Map application architecture patterns to infrastructure needs - Cross-reference with PRD Technical Assumptions to ensure alignment with repository and service architecture decisions -### 3. Design Infrastructure +### 3. Design Infrastructure Architecture Strategy - **If "Incremental Mode" was selected:** - - For each major infrastructure component: - - **a. Present Component Purpose:** Explain what this component provides and its importance - - **b. Present Options:** Provide 2-3 viable options with pros and cons - - **c. Make Recommendation:** Recommend the best option with rationale + - For each major infrastructure domain: + - **a. Present Domain Purpose:** Explain what this infrastructure domain provides and its strategic importance + - **b. Present Strategic Options:** Provide 2-3 viable approaches with architectural pros and cons + - **c. Make Strategic Recommendation:** Recommend the best approach with clear architectural rationale - **d. Incorporate Feedback:** Discuss with user and iterate based on feedback - **e. [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options)** - - **f. Document Decision:** Record the final choice with justification + - **f. Document Architectural Decision:** Record the final strategic choice with justification - **If "YOLO Mode" was selected:** - - Design all major components with recommended approaches - - Document decisions and rationales - - Present comprehensive design for review + - Design strategic approaches for all major infrastructure domains + - Document architectural decisions and rationales + - Present comprehensive infrastructure strategy for review - Iterate based on feedback -### 4. Document Architecture +### 4. Document Infrastructure Architecture Blueprint - Populate all sections of the infrastructure architecture template: - - Cloud provider strategy - - Network architecture - - Compute resources - - Data resources - - Security architecture - - Monitoring & observability - - CI/CD pipeline - - Disaster recovery - - Cost optimization - - Environment transition strategy - - Shared responsibility model - - Infrastructure evolution plan - - Cross-team collaboration model - - Infrastructure verification approach + - **Cloud Strategy & Platform Selection** - Multi-cloud vs single cloud, platform rationale + - **Network Architecture Patterns** - VPC design, connectivity strategies, security zones + - **Compute Architecture Strategy** - Container vs serverless vs VM strategies, scaling patterns + - **Data Architecture & Storage Strategy** - Database selection, data tier strategies, backup approaches + - **Security Architecture Framework** - Zero-trust patterns, identity strategies, encryption approaches + - **Observability Architecture** - Monitoring strategies, logging patterns, alerting frameworks + - **CI/CD Architecture Patterns** - Pipeline strategies, deployment patterns, environment promotion + - **Disaster Recovery Architecture** - RTO/RPO strategies, failover patterns, business continuity + - **Cost Optimization Framework** - Resource optimization strategies, cost allocation patterns + - **Environment Strategy** - Dev/staging/prod patterns, environment isolation approaches + - **Infrastructure Evolution Strategy** - Technology migration paths, scaling roadmaps + - **Cross-team Collaboration Model** - Integration with development teams, handoff protocols -### 5. Create Infrastructure Diagrams +### 5. Implementation Feasibility Review & Collaboration -- Develop clear infrastructure diagrams using Mermaid -- Create network topology diagrams -- Document data flow diagrams -- Illustrate deployment pipelines -- Visualize environment relationships +- **Architect → DevOps/Platform Feedback Loop:** + - Present architectural blueprint summary to DevOps/Platform Engineering Agent for feasibility review + - Request specific feedback on: + - **Operational Complexity:** Are the proposed patterns implementable with current tooling and expertise? + - **Resource Constraints:** Do infrastructure requirements align with available resources and budgets? + - **Security Implementation:** Are security patterns achievable with current security toolchain? + - **Operational Overhead:** Will the proposed architecture create excessive operational burden? + - **Technology Constraints:** Are selected technologies compatible with existing infrastructure? + - Document all feasibility feedback and concerns raised by DevOps/Platform Engineering Agent + - Iterate on architectural decisions based on operational constraints and feedback + - Address all critical feasibility concerns before proceeding to final architecture documentation -### 6. Identify Technical Stories & Epic Impacts +### 6. Create Infrastructure Architecture Diagrams -- Review existing epics and user stories -- Identify infrastructure-specific technical tasks -- Draft new stories for infrastructure components -- Suggest refinements to existing stories based on infrastructure decisions -- Prepare a summary of all proposed additions or modifications +- Develop high-level infrastructure strategy diagrams using Mermaid +- Create network topology architecture diagrams +- Document data flow and integration architecture diagrams +- Illustrate deployment pipeline architecture patterns +- Visualize environment relationship and promotion strategies +- Design security architecture and trust boundary diagrams -### 7. Checklist Review and Finalization +### 7. Define Implementation Handoff Strategy -- Use the `infrastructure-checklist.md` to validate completeness -- Ensure all sections are adequately addressed -- Address any deficiencies through collaboration with the user -- Present a summary of the checklist review -- Finalize the infrastructure architecture document +- Create clear specifications for DevOps/Platform Engineering implementation +- Define architectural constraints and non-negotiable requirements +- Specify technology selections with version requirements where critical +- Document architectural patterns that must be followed during implementation +- Create implementation validation criteria +- Prepare architectural decision records (ADRs) for key infrastructure choices + +### 8. BMAD Integration Architecture + +- Design infrastructure architecture to support other BMAD agents: + - **Development Environment Architecture** - Local development patterns, testing infrastructure + - **Deployment Architecture** - How applications from Frontend/Backend agents will be deployed + - **Integration Architecture** - How infrastructure supports cross-service communication + - Document infrastructure requirements for each BMAD agent workflow + +### 9. Architecture Review and Finalization + +- Review architecture against system architecture for alignment +- Validate infrastructure architecture supports all application requirements +- Ensure architectural decisions are implementable within project constraints +- Address any architectural gaps or inconsistencies +- Prepare comprehensive architecture handoff documentation for implementation team ## Output -A comprehensive infrastructure architecture document that provides clear guidance for implementing and maintaining all infrastructure components, using the infrastructure-architecture-tmpl.md template. +A comprehensive infrastructure architecture document that provides: + +1. **Strategic Infrastructure Blueprint** - High-level architecture strategy and patterns +2. **Technology Selection Rationale** - Justified technology choices and architectural decisions +3. **Implementation Specifications** - Clear guidance for DevOps/Platform Engineering implementation +4. **Architectural Constraints** - Non-negotiable requirements and patterns +5. **Integration Architecture** - How infrastructure supports application architecture +6. **BMAD Workflow Support** - Infrastructure architecture supporting all agent workflows +7. **Feasibility Validation** - Documented operational feedback and constraint resolution + +**Output file**: `docs/infrastructure-architecture.md` ## Offer Advanced Self-Refinement & Elicitation Options @@ -100,13 +133,13 @@ Present the user with the following list of 'Advanced Reflective, Elicitation & **Advanced Reflective, Elicitation & Brainstorming Actions I Can Take:** -1. **Alternative Architecture Evaluation** -2. **Scalability & Performance Stress Test (Theoretical)** -3. **Security & Compliance Deep Dive** -4. **Cost Analysis & Optimization Review** -5. **Operational Excellence & Reliability Assessment** -6. **Cross-Functional Integration Analysis** -7. **Future Technology & Migration Path Exploration** +1. **Alternative Architecture Strategy Evaluation** +2. **Scalability & Performance Architecture Stress Test (Theoretical)** +3. **Security Architecture & Compliance Deep Dive** +4. **Cost Architecture Analysis & Optimization Strategy Review** +5. **Operational Excellence & Reliability Architecture Assessment** +6. **Cross-Functional Integration & BMAD Workflow Analysis** +7. **Future Technology & Migration Architecture Path Exploration** 8. **Finalize this Section and Proceed.** After I perform the selected action, we can discuss the outcome and decide on any further revisions for this section." diff --git a/bmad-agent/tasks/create-infrastructure.md b/bmad-agent/tasks/create-infrastructure.md deleted file mode 100644 index 8cdf1196..00000000 --- a/bmad-agent/tasks/create-infrastructure.md +++ /dev/null @@ -1,109 +0,0 @@ -# Infrastructure Implementation Task - -## Purpose - -To guide the Platform Engineer through implementing infrastructure changes according to the architecture document and infrastructure guidelines. This task ensures consistent, secure, and well-documented infrastructure deployment that aligns with organizational standards and supports application requirements. - -## Inputs - -- Infrastructure Architecture Document -- Infrastructure Change Request -- Infrastructure Guidelines -- Technology Stack Document -- Project Structure Guide -- `infrastructure-checklist.md` (for validation) - -## Key Activities & Instructions - -### 1. Confirm Interaction Mode - -- Ask the user: "How would you like to proceed with infrastructure implementation? We can work: - A. **Incrementally (Default & Recommended):** We'll implement each infrastructure component step-by-step, validating each before moving to the next. This ensures thorough testing and documentation. - B. **"YOLO" Mode:** I'll implement all infrastructure components in a more holistic approach, with validation at key milestones rather than for each component. This can be faster but introduces more risk." -- Request the user to select their preferred mode and proceed accordingly. - -### 2. Prepare for Implementation - -- Review the infrastructure architecture document thoroughly -- Create a detailed implementation plan with clear milestones -- Set up Infrastructure as Code repositories (Terraform, Bicep, etc.) -- Establish testing environment -- Document rollback procedures -- Verify the change request is approved before beginning implementation. If not, HALT and inform the user. - -### 3. Develop Infrastructure Code - -- **If "Incremental Mode" was selected:** - - For each major infrastructure component: - - **a. Present Component Plan:** Explain implementation approach and how it aligns with architecture - - **b. Create/Update IaC Code:** Develop Terraform/Bicep/ARM templates with proper documentation - - **c. Implement Security Controls:** Ensure all security requirements are addressed - - **d. Review & Feedback:** Present code for review and incorporate feedback - - **e. [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options)** - - **f. Test Component:** Deploy to test environment and verify functionality - -- **If "YOLO Mode" was selected:** - - Develop IaC for all components in logical groups - - Implement security controls across all resources - - Present comprehensive implementation for review - - Test at major milestones rather than per-component - -### 4. Test and Validate - -- Deploy all infrastructure to a testing environment -- Verify functionality against architectural requirements -- Run security scans and compliance checks -- Perform performance testing on infrastructure components -- Validate against the infrastructure checklist -- Document all test results and validation evidence -- Address any validation failures before proceeding to production deployment - -### 5. BMAD Integration Verification - -- Verify infrastructure supports other BMAD agents: - - Test development environments for Frontend Dev (Mira) and Backend Dev (Enrique) - - Confirm infrastructure implements requirements from Product Owner (Oli) - - Validate alignment with architectural decisions from Architect (Alphonse) - - Document all integration verification results - -### 6. Deploy and Handover - -- Implement in production environment using approved change management process -- Verify successful deployment with comprehensive testing -- Update all documentation with as-built details -- Conduct knowledge transfer sessions with operations teams -- Set up ongoing monitoring and alerting -- Complete final validation against infrastructure checklist -- Update change request status to reflect completion - -## Output - -Fully implemented infrastructure changes with: - -1. Complete Infrastructure as Code repository -2. Comprehensive documentation of deployed resources -3. Validation evidence demonstrating compliance with requirements -4. Knowledge transfer documentation for operations teams -5. Monitoring and alerting configuration -6. Updated change request with implementation details - -## Offer Advanced Self-Refinement & Elicitation Options - -Present the user with the following list of 'Advanced Reflective, Elicitation & Brainstorming Actions'. Explain that these are optional steps to help ensure quality, explore alternatives, and deepen the understanding of the current component before finalizing it and moving to the next. The user can select an action by number, or choose to skip this and proceed. - -"To ensure the quality of the current component: **[Specific Component Name]** and to ensure its robustness, explore alternatives, and consider all angles, I can perform any of the following actions. Please choose a number (8 to finalize and proceed): - -**Advanced Reflective, Elicitation & Brainstorming Actions I Can Take:** - -1. **Security Hardening & Vulnerability Assessment** -2. **Performance Optimization & Scaling Review** -3. **Cost Analysis & Resource Efficiency Evaluation** -4. **Failure Mode Effects Analysis (FMEA)** -5. **Deployment Process Improvement & Automation** -6. **Operational Readiness & Monitoring Enhancement** -7. **Compliance & Governance Verification** -8. **Finalize this Component and Proceed.** - -After I perform the selected action, we can discuss the outcome and decide on any further improvements for this component." - -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 component (or selects #8) diff --git a/bmad-agent/tasks/create-platform-infrastructure.md b/bmad-agent/tasks/create-platform-infrastructure.md new file mode 100644 index 00000000..029ff3c9 --- /dev/null +++ b/bmad-agent/tasks/create-platform-infrastructure.md @@ -0,0 +1,232 @@ +# Platform Infrastructure Implementation Task + +## Purpose + +To implement a comprehensive platform infrastructure stack based on the Infrastructure Architecture Document, including foundation infrastructure, container orchestration, GitOps workflows, service mesh, and developer experience platforms. This integrated approach ensures all platform components work synergetically to provide a complete, secure, and operationally excellent platform foundation. + +## Inputs + +- **Infrastructure Architecture Document** (`docs/infrastructure-architecture.md` - from Architect Agent) +- Infrastructure Change Request (`docs/infrastructure/{ticketNumber}.change.md`) +- Infrastructure Guidelines (`docs/infrastructure/guidelines.md`) +- Technology Stack Document (`docs/tech-stack.md`) +- `infrastructure-checklist.md` (for validation) + +## Key Activities & Instructions + +### 1. Confirm Interaction Mode + +- Ask the user: "How would you like to proceed with platform infrastructure implementation? We can work: + A. **Incrementally (Default & Recommended):** We'll implement each platform layer step-by-step (Foundation → Container Platform → GitOps → Service Mesh → Developer Experience), validating integration at each stage. This ensures thorough testing and operational readiness. + B. **"YOLO" Mode:** I'll implement the complete platform stack in logical groups, with validation at major integration milestones. This is faster but requires comprehensive end-to-end testing." +- Request the user to select their preferred mode and proceed accordingly. + +### 2. Architecture Review & Implementation Planning + +- Review Infrastructure Architecture Document for complete platform specifications +- Validate platform requirements against application architecture and business needs +- Create integrated implementation roadmap with proper dependency sequencing +- Plan resource allocation, security policies, and operational procedures across all platform layers +- Document rollback procedures and risk mitigation strategies for the entire platform +- Verify the infrastructure change request is approved before beginning implementation. If not, HALT and inform the user. + +### 3. Joint Implementation Planning Session + +- **Architect ↔ DevOps/Platform Collaborative Planning:** + - **Architecture Alignment Review:** + - Confirm understanding of architectural decisions and rationale with Architect Agent + - Validate interpretation of infrastructure architecture document + - Clarify any ambiguous or unclear architectural specifications + - Document agreed-upon implementation approach for each architectural component + - **Implementation Strategy Collaboration:** + - **Technology Implementation Planning:** Collaborate on specific technology versions, configurations, and deployment patterns + - **Security Implementation Planning:** Align on security control implementation approach and validation methods + - **Integration Planning:** Plan component integration sequence and validation checkpoints + - **Operational Considerations:** Discuss operational patterns, monitoring strategies, and maintenance approaches + - **Resource Planning:** Confirm resource allocation, sizing, and optimization strategies + - **Risk & Constraint Discussion:** + - Identify potential implementation risks and mitigation strategies + - Document operational constraints that may impact architectural implementation + - Plan contingency approaches for high-risk implementation areas + - Establish escalation triggers for implementation issues requiring architectural input + - **Implementation Validation Planning:** + - Define validation criteria for each platform component and integration point + - Plan testing strategies and acceptance criteria with Architect input + - Establish quality gates and review checkpoints throughout implementation + - Document success metrics and performance benchmarks + - **Documentation & Knowledge Transfer Planning:** + - Plan documentation approach and knowledge transfer requirements + - Define operational runbooks and troubleshooting guide requirements + - Establish ongoing collaboration points for implementation support +- Complete joint planning session before beginning platform implementation. Document all planning outcomes and agreements. + +### 4. Foundation Infrastructure Implementation + +- **If "Incremental Mode" was selected:** + - **a. Foundation Infrastructure Setup:** + - Present foundation infrastructure scope and its role in the platform stack + - Implement core cloud resources, networking, storage, and security foundations + - Configure basic monitoring, logging, and operational tooling + - Validate foundation readiness for platform components + - [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options) + +- **If "YOLO Mode" was selected:** + - Implement complete foundation infrastructure per architecture specifications + - Prepare foundation for all platform components simultaneously + +### 5. Container Platform Implementation + +- **If "Incremental Mode" was selected:** + - **b. Container Orchestration Platform:** + - Present container platform scope and integration with foundation infrastructure + - Install and configure container orchestration platform (Kubernetes/AKS/EKS/GKE) + - Implement RBAC, security policies, and resource management + - Configure networking, storage classes, and operational tooling + - Validate container platform functionality and readiness for applications + - [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options) + +- **If "YOLO Mode" was selected:** + - Deploy complete container platform integrated with foundation infrastructure + +### 6. GitOps Workflows Implementation + +- **If "Incremental Mode" was selected:** + - **c. GitOps Configuration Management:** + - Present GitOps scope and integration with container platform + - Implement GitOps operators and configuration management systems + - Configure repository structures, sync policies, and environment promotion + - Set up policy enforcement and drift detection + - Validate GitOps workflows and configuration management + - [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options) + +- **If "YOLO Mode" was selected:** + - Deploy complete GitOps stack integrated with container and foundation platforms + +### 7. Service Mesh Implementation + +- **If "Incremental Mode" was selected:** + - **d. Service Communication Platform:** + - Present service mesh scope and integration with existing platform layers + - Install and configure service mesh control and data planes + - Implement traffic management, security policies, and observability + - Configure service discovery, load balancing, and communication policies + - Validate service mesh functionality and inter-service communication + - [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options) + +- **If "YOLO Mode" was selected:** + - Deploy complete service mesh integrated with all platform components + +### 8. Developer Experience Platform Implementation + +- **If "Incremental Mode" was selected:** + - **e. Developer Experience Platform:** + - Present developer platform scope and integration with complete platform stack + - Implement developer portals, self-service capabilities, and golden path templates + - Configure platform APIs, automation workflows, and productivity tooling + - Set up developer onboarding and documentation systems + - Validate developer experience and workflow integration + - [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options) + +- **If "YOLO Mode" was selected:** + - Deploy complete developer experience platform integrated with all infrastructure + +### 9. Platform Integration & Security Hardening + +- Implement end-to-end security policies across all platform layers +- Configure integrated monitoring and observability for the complete platform stack +- Set up platform-wide backup, disaster recovery, and business continuity procedures +- Implement cost optimization and resource management across all platform components +- Configure platform-wide compliance monitoring and audit logging +- Validate complete platform security posture and operational readiness + +### 10. Platform Operations & Automation + +- Set up comprehensive platform monitoring, alerting, and operational dashboards +- Implement automated platform maintenance, updates, and lifecycle management +- Configure platform health checks, performance optimization, and capacity planning +- Set up incident response procedures and operational runbooks for the complete platform +- Implement platform SLA monitoring and service level management +- Validate operational excellence and platform reliability + +### 11. BMAD Workflow Integration + +- Verify complete platform supports all BMAD agent workflows: + - **Frontend/Backend Development** - Test complete application development and deployment workflows + - **Infrastructure Development** - Validate infrastructure-as-code development and deployment + - **Cross-Agent Collaboration** - Ensure seamless collaboration between all agent types + - **CI/CD Integration** - Test complete continuous integration and deployment pipelines + - **Monitoring & Observability** - Verify complete application and infrastructure monitoring +- Document comprehensive integration verification results and workflow optimizations + +### 12. Platform Validation & Knowledge Transfer + +- Execute comprehensive platform testing with realistic workloads and scenarios +- Validate against all sections of infrastructure checklist for complete platform +- Perform security scanning, compliance verification, and performance testing +- Test complete platform disaster recovery and resilience procedures +- Complete comprehensive knowledge transfer to operations and development teams +- Document complete platform configuration, operational procedures, and troubleshooting guides +- Update infrastructure change request status to reflect completion + +### 13. Implementation Review & Architect Collaboration + +- **Post-Implementation Collaboration with Architect:** + - **Implementation Validation Review:** + - Present implementation outcomes against architectural specifications + - Document any deviations from original architecture and rationale + - Validate that implemented platform meets architectural intent and requirements + - **Lessons Learned & Architecture Feedback:** + - Provide feedback to Architect Agent on implementation experience + - Document implementation challenges and successful patterns + - Recommend architectural improvements for future implementations + - Share operational insights that could influence future architectural decisions + - **Knowledge Transfer & Documentation Review:** + - Review operational documentation with Architect for completeness and accuracy + - Ensure architectural decisions are properly documented in operational guides + - Plan ongoing collaboration for platform evolution and maintenance +- Document collaboration outcomes and recommendations for future architecture-implementation cycles + +### 14. Platform Handover & Continuous Improvement + +- Establish platform monitoring and continuous improvement processes +- Set up feedback loops with development teams and platform users +- Plan platform evolution roadmap and technology upgrade strategies +- Implement platform metrics and KPI tracking for operational excellence +- Create platform governance and change management procedures +- Establish platform support and maintenance responsibilities + +## Output + +Fully operational and integrated platform infrastructure with: + +1. **Complete Foundation Infrastructure** - Cloud resources, networking, storage, and security foundations +2. **Production-Ready Container Platform** - Orchestration with proper security, monitoring, and resource management +3. **Operational GitOps Workflows** - Version-controlled operations with automated sync and policy enforcement +4. **Service Mesh Communication Platform** - Advanced service communication with security and observability +5. **Developer Experience Platform** - Self-service capabilities with productivity tooling and golden paths +6. **Integrated Platform Operations** - Comprehensive monitoring, automation, and operational excellence +7. **BMAD Workflow Support** - Verified integration supporting all agent development and deployment patterns +8. **Platform Documentation** - Complete operational guides, troubleshooting resources, and developer documentation +9. **Joint Planning Documentation** - Collaborative planning outcomes and architectural alignment records +10. **Implementation Review Results** - Post-implementation validation and architect collaboration outcomes + +## Offer Advanced Self-Refinement & Elicitation Options + +Present the user with the following list of 'Advanced Reflective, Elicitation & Brainstorming Actions'. Explain that these are optional steps to help ensure quality, explore alternatives, and deepen the understanding of the current platform layer before finalizing it and moving to the next. The user can select an action by number, or choose to skip this and proceed. + +"To ensure the quality of the current platform layer: **[Specific Platform Layer Name]** and to ensure its robustness, explore alternatives, and consider all angles, I can perform any of the following actions. Please choose a number (8 to finalize and proceed): + +**Advanced Reflective, Elicitation & Brainstorming Actions I Can Take:** + +1. **Platform Layer Security Hardening & Integration Review** +2. **Performance Optimization & Resource Efficiency Analysis** +3. **Operational Excellence & Automation Enhancement** +4. **Platform Integration & Dependency Validation** +5. **Developer Experience & Workflow Optimization** +6. **Disaster Recovery & Platform Resilience Testing (Theoretical)** +7. **BMAD Agent Workflow Integration & Cross-Platform Testing** +8. **Finalize this Platform Layer and Proceed.** + +After I perform the selected action, we can discuss the outcome and decide on any further improvements for this platform layer." + +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 platform layer (or selects #8) diff --git a/bmad-agent/tasks/review-infrastructure.md b/bmad-agent/tasks/review-infrastructure.md index 86859a38..92c343c8 100644 --- a/bmad-agent/tasks/review-infrastructure.md +++ b/bmad-agent/tasks/review-infrastructure.md @@ -62,24 +62,80 @@ To conduct a thorough review of existing infrastructure to identify improvement - **Architecture Compliance:** Check if implementation follows Architect (Alphonse) decisions - Document any gaps in BMAD integration -### 6. Present and Plan +### 6. Architectural Escalation Assessment + +- **DevOps/Platform → Architect Escalation Review:** + - Evaluate review findings for issues requiring architectural intervention: + - **Technical Debt Escalation:** + - Identify infrastructure technical debt that impacts system architecture + - Document technical debt items that require architectural redesign vs. operational fixes + - Assess cumulative technical debt impact on system maintainability and scalability + - **Performance/Security Issue Escalation:** + - Identify performance bottlenecks that require architectural solutions (not just operational tuning) + - Document security vulnerabilities that need architectural security pattern changes + - Assess capacity and scalability issues requiring architectural scaling strategy revision + - **Technology Evolution Escalation:** + - Identify outdated technologies that need architectural migration planning + - Document new technology opportunities that could improve system architecture + - Assess technology compatibility issues requiring architectural integration strategy changes + - **Escalation Decision Matrix:** + - **Critical Architectural Issues:** Require immediate Architect Agent involvement for system redesign + - **Significant Architectural Concerns:** Recommend Architect Agent review for potential architecture evolution + - **Operational Issues:** Can be addressed through operational improvements without architectural changes + - **Unclear/Ambiguous Issues:** When escalation level is uncertain, consult with user for guidance and decision + - Document escalation recommendations with clear justification and impact assessment + - If escalation classification is unclear or ambiguous, HALT and ask user for guidance on appropriate escalation level and approach + +### 7. Present and Plan - Prepare an executive summary of key findings - Create detailed technical documentation for implementation teams - Develop an action plan for critical and high-priority items +- **Prepare Architectural Escalation Report** (if applicable): + - Document all findings requiring Architect Agent attention + - Provide specific recommendations for architectural changes or reviews + - Include impact assessment and priority levels for architectural work + - Prepare escalation summary for Architect Agent collaboration - Schedule follow-up reviews for specific areas -- Present findings in a way that enables clear decision-making on next steps. +- Present findings in a way that enables clear decision-making on next steps and escalation needs. + +### 8. Execute Escalation Protocol + +- **If Critical Architectural Issues Identified:** + - **Immediate Escalation to Architect Agent:** + - Present architectural escalation report with critical findings + - Request architectural review and potential redesign for identified issues + - Collaborate with Architect Agent on priority and timeline for architectural changes + - Document escalation outcomes and planned architectural work +- **If Significant Architectural Concerns Identified:** + - **Scheduled Architectural Review:** + - Prepare detailed technical findings for Architect Agent review + - Request architectural assessment of identified concerns + - Schedule collaborative planning session for potential architectural evolution + - Document architectural recommendations and planned follow-up +- **If Only Operational Issues Identified:** + - Proceed with operational improvement planning without architectural escalation + - Monitor for future architectural implications of operational changes +- **If Unclear/Ambiguous Escalation Needed:** + - **User Consultation Required:** + - Present unclear findings and escalation options to user + - Request user guidance on appropriate escalation level and approach + - Document user decision and rationale for escalation approach + - Proceed with user-directed escalation path +- All critical architectural escalations must be documented and acknowledged by Architect Agent before proceeding with implementation ## Output A comprehensive infrastructure review report that includes: -1. Current state assessment for each infrastructure component -2. Prioritized findings with severity ratings -3. Detailed recommendations with effort/impact estimates -4. Cost optimization opportunities -5. BMAD integration assessment -6. Action plan for critical improvements +1. **Current state assessment** for each infrastructure component +2. **Prioritized findings** with severity ratings +3. **Detailed recommendations** with effort/impact estimates +4. **Cost optimization opportunities** +5. **BMAD integration assessment** +6. **Architectural escalation assessment** with clear escalation recommendations +7. **Action plan** for critical improvements and architectural work +8. **Escalation documentation** for Architect Agent collaboration (if applicable) ## Offer Advanced Self-Refinement & Elicitation Options diff --git a/bmad-agent/tasks/validate-infrastructure.md b/bmad-agent/tasks/validate-infrastructure.md new file mode 100644 index 00000000..6f158b1b --- /dev/null +++ b/bmad-agent/tasks/validate-infrastructure.md @@ -0,0 +1,153 @@ +# Infrastructure Validation Task + +## Purpose + +To comprehensively validate platform infrastructure changes against security, reliability, operational, and compliance requirements before deployment. This task ensures all platform infrastructure meets organizational standards, follows best practices, and properly integrates with the broader BMAD ecosystem. + +## Inputs + +- Infrastructure Change Request (`docs/infrastructure/{ticketNumber}.change.md`) +- **Infrastructure Architecture Document** (`docs/infrastructure-architecture.md` - from Architect Agent) +- Infrastructure Guidelines (`docs/infrastructure/guidelines.md`) +- Technology Stack Document (`docs/tech-stack.md`) +- `infrastructure-checklist.md` (primary validation framework - 16 comprehensive sections) + +## Key Activities & Instructions + +### 1. Confirm Interaction Mode + +- Ask the user: "How would you like to proceed with platform infrastructure validation? We can work: + A. **Incrementally (Default & Recommended):** We'll work through each section of the checklist step-by-step, documenting compliance or gaps for each item before moving to the next section. This is best for thorough validation and detailed documentation of the complete platform stack. + B. **"YOLO" Mode:** I can perform a rapid assessment of all checklist items and present a comprehensive validation report for review. This is faster but may miss nuanced details that would be caught in the incremental approach." +- Request the user to select their preferred mode (e.g., "Please let me know if you'd prefer A or B."). +- Once the user chooses, confirm the selected mode and proceed accordingly. + +### 2. Initialize Platform Validation + +- Review the infrastructure change documentation to understand platform implementation scope and purpose +- Analyze the infrastructure architecture document for platform design patterns and compliance requirements +- Examine infrastructure guidelines for organizational standards across all platform components +- Prepare the validation environment and tools for comprehensive platform testing +- Verify the infrastructure change request is approved for validation. If not, HALT and inform the user. + +### 3. Architecture Design Review Gate + +- **DevOps/Platform → Architect Design Review:** + - Conduct systematic review of infrastructure architecture document for implementability + - Evaluate architectural decisions against operational constraints and capabilities: + - **Implementation Complexity:** Assess if proposed architecture can be implemented with available tools and expertise + - **Operational Feasibility:** Validate that operational patterns are achievable within current organizational maturity + - **Resource Availability:** Confirm required infrastructure resources are available and within budget constraints + - **Technology Compatibility:** Verify selected technologies integrate properly with existing infrastructure + - **Security Implementation:** Validate that security patterns can be implemented with current security toolchain + - **Maintenance Overhead:** Assess ongoing operational burden and maintenance requirements + - Document design review findings and recommendations: + - **Approved Aspects:** Document architectural decisions that are implementable as designed + - **Implementation Concerns:** Identify architectural decisions that may face implementation challenges + - **Required Modifications:** Recommend specific changes needed to make architecture implementable + - **Alternative Approaches:** Suggest alternative implementation patterns where needed + - **Collaboration Decision Point:** + - If **critical implementation blockers** identified: HALT validation and escalate to Architect Agent for architectural revision + - If **minor concerns** identified: Document concerns and proceed with validation, noting required implementation adjustments + - If **architecture approved**: Proceed with comprehensive platform validation + - All critical design review issues must be resolved before proceeding to detailed validation + +### 4. Execute Comprehensive Platform Validation Process + +- **If "Incremental Mode" was selected:** + - For each section of the infrastructure checklist (Sections 1-16): + - **a. Present Section Purpose:** Explain what this section validates and why it's important for platform operations + - **b. Work Through Items:** Present each checklist item, guide the user through validation, and document compliance or gaps + - **c. Evidence Collection:** For each compliant item, document how compliance was verified + - **d. Gap Documentation:** For each non-compliant item, document specific issues and proposed remediation + - **e. Platform Integration Testing:** For platform engineering sections (13-16), validate integration between platform components + - **f. [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options)** + - **g. Section Summary:** Provide a compliance percentage and highlight critical findings before moving to the next section + +- **If "YOLO Mode" was selected:** + - Work through all checklist sections rapidly (foundation infrastructure sections 1-12 + platform engineering sections 13-16) + - Document compliance status for each item across all platform components + - Identify and document critical non-compliance issues affecting platform operations + - Present a comprehensive validation report for all sections + - After presenting the full validation report in YOLO mode, you MAY still offer the 'Advanced Reflective & Elicitation Options' menu for deeper investigation of specific sections with issues. + +### 5. Generate Comprehensive Platform Validation Report + +- Summarize validation findings by section across all 16 checklist areas +- Calculate and present overall compliance percentage for complete platform stack +- Clearly document all non-compliant items with remediation plans prioritized by platform impact +- Highlight critical security or operational risks affecting platform reliability +- Include design review findings and architectural implementation recommendations +- Provide validation signoff recommendation based on complete platform assessment +- Document platform component integration validation results + +### 6. BMAD Integration Assessment + +- Review how platform infrastructure changes support other BMAD agents: + - **Development Agent Alignment:** Verify platform infrastructure supports Frontend Dev, Backend Dev, and Full Stack Dev requirements including: + - Container platform development environment provisioning + - GitOps workflows for application deployment + - Service mesh integration for development testing + - Developer experience platform self-service capabilities + - **Product Alignment:** Ensure platform infrastructure implements PRD requirements from Product Owner including: + - Scalability and performance requirements through container platform + - Deployment automation through GitOps workflows + - Service reliability through service mesh implementation + - **Architecture Alignment:** Validate that platform implementation aligns with architecture decisions including: + - Technology selections implemented correctly across all platform components + - Security architecture implemented in container platform, service mesh, and GitOps + - Integration patterns properly implemented between platform components + - Document all integration points and potential impacts on other agents' workflows + +### 7. Next Steps Recommendation + +- If validation successful: + - Prepare platform deployment recommendation with component dependencies + - Outline monitoring requirements for complete platform stack + - Suggest knowledge transfer activities for platform operations + - Document platform readiness certification +- If validation failed: + - Prioritize remediation actions by platform component and integration impact + - Recommend blockers vs. non-blockers for platform deployment + - Schedule follow-up validation with focus on failed platform components + - Document platform risks and mitigation strategies +- If design review identified architectural issues: + - **Escalate to Architect Agent** for architectural revision and re-design + - Document specific architectural changes required for implementability + - Schedule follow-up design review after architectural modifications +- Update documentation with validation results across all platform components +- Always ensure the Infrastructure Change Request status is updated to reflect the platform validation outcome. + +## Output + +A comprehensive platform validation report documenting: + +1. **Architecture Design Review Results** - Implementability assessment and architectural recommendations +2. **Compliance percentage by checklist section** (all 16 sections including platform engineering) +3. **Detailed findings for each non-compliant item** across foundation and platform components +4. **Platform integration validation results** documenting component interoperability +5. **Remediation recommendations with priority levels** based on platform impact +6. **BMAD integration assessment results** for complete platform stack +7. **Clear signoff recommendation** for platform deployment readiness or architectural revision requirements +8. **Next steps for implementation or remediation** prioritized by platform dependencies + +## Offer Advanced Self-Refinement & Elicitation Options + +Present the user with the following list of 'Advanced Reflective, Elicitation & Brainstorming Actions'. Explain that these are optional steps to help ensure quality, explore alternatives, and deepen the understanding of the current section before finalizing it and moving on. The user can select an action by number, or choose to skip this and proceed to finalize the section. + +"To ensure the quality of the current section: **[Specific Section Name]** and to ensure its robustness, explore alternatives, and consider all angles, I can perform any of the following actions. Please choose a number (8 to finalize and proceed): + +**Advanced Reflective, Elicitation & Brainstorming Actions I Can Take:** + +1. **Critical Security Assessment & Risk Analysis** +2. **Platform Integration & Component Compatibility Evaluation** +3. **Cross-Environment Consistency Review** +4. **Technical Debt & Maintainability Analysis** +5. **Compliance & Regulatory Alignment Deep Dive** +6. **Cost Optimization & Resource Efficiency Analysis** +7. **Operational Resilience & Platform Failure Mode Testing (Theoretical)** +8. **Finalize this Section and Proceed.** + +After I perform the selected action, we can discuss the outcome and decide on any further revisions for this section." + +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) diff --git a/bmad-agent/tasks/validate-infrastructure.task.md b/bmad-agent/tasks/validate-infrastructure.task.md deleted file mode 100644 index 8c5289a9..00000000 --- a/bmad-agent/tasks/validate-infrastructure.task.md +++ /dev/null @@ -1,110 +0,0 @@ -# Infrastructure Validation Task - -## Purpose - -To comprehensively validate infrastructure changes against security, reliability, operational, and compliance requirements before deployment. This task ensures all infrastructure meets organizational standards, follows best practices, and properly integrates with the broader BMAD ecosystem. - -## Inputs - -- Infrastructure Change Request (`docs/infrastructure/{ticketNumber}.change.md`) -- Infrastructure Architecture Document (output from `create-infrastructure-architecture.md`) -- Infrastructure Guidelines (`docs/infrastructure/guidelines.md`) -- Technology Stack Document (`docs/tech-stack.md`) -- `infrastructure-checklist.md` (primary validation framework) - -## Key Activities & Instructions - -### 1. Confirm Interaction Mode - -- Ask the user: "How would you like to proceed with infrastructure validation? We can work: - A. **Incrementally (Default & Recommended):** We'll work through each section of the checklist step-by-step, documenting compliance or gaps for each item before moving to the next section. This is best for thorough validation and detailed documentation. - B. **"YOLO" Mode:** I can perform a rapid assessment of all checklist items and present a comprehensive validation report for review. This is faster but may miss nuanced details that would be caught in the incremental approach." -- Request the user to select their preferred mode (e.g., "Please let me know if you'd prefer A or B."). -- Once the user chooses, confirm the selected mode and proceed accordingly. - -### 2. Initialize Validation - -- Review the infrastructure change documentation to understand scope and purpose -- Analyze the infrastructure architecture document for design patterns and compliance requirements -- Examine infrastructure guidelines for organizational standards -- Prepare the validation environment and tools -- Verify the infrastructure change request is approved for validation. If not, HALT and inform the user. - -### 3. Execute Validation Process - -- **If "Incremental Mode" was selected:** - - For each section of the infrastructure checklist: - - **a. Present Section Purpose:** Explain what this section validates and why it's important - - **b. Work Through Items:** Present each checklist item, guide the user through validation, and document compliance or gaps - - **c. Evidence Collection:** For each compliant item, document how compliance was verified - - **d. Gap Documentation:** For each non-compliant item, document specific issues and proposed remediation - - **e. [Offer Advanced Self-Refinement & Elicitation Options](#offer-advanced-self-refinement--elicitation-options)** - - **f. Section Summary:** Provide a compliance percentage and highlight critical findings before moving to the next section - -- **If "YOLO Mode" was selected:** - - Work through all checklist sections rapidly - - Document compliance status for each item - - Identify and document critical non-compliance issues - - Present a comprehensive validation report for all sections - - After presenting the full validation report in YOLO mode, you MAY still offer the 'Advanced Reflective & Elicitation Options' menu for deeper investigation of specific sections with issues. - -### 4. Generate Validation Report - -- Summarize validation findings by section -- Calculate and present overall compliance percentage -- Clearly document all non-compliant items with remediation plans -- Highlight critical security or operational risks -- Provide validation signoff recommendation based on findings - -### 5. BMAD Integration Assessment - -- Review how infrastructure changes support other BMAD agents: - - **Development Agent Alignment:** Verify infrastructure changes support Frontend Dev (Mira), Backend Dev (Enrique), and Full Stack Dev requirements - - **Product Alignment:** Ensure infrastructure changes map to PRD requirements from Product Owner (Oli) - - **Architecture Alignment:** Validate that infrastructure implementation aligns with decisions from Architect (Alphonse) - - Document all integration points and potential impacts on other agents' workflows - -### 6. Next Steps Recommendation - -- If validation successful: - - Prepare deployment recommendation - - Outline monitoring requirements - - Suggest knowledge transfer activities -- If validation failed: - - Prioritize remediation actions - - Recommend blockers vs. non-blockers - - Schedule follow-up validation -- Update documentation with validation results -- Always ensure the Infrastructure Change Request status is updated to reflect the validation outcome. - -## Output - -A comprehensive validation report documenting: - -1. Compliance percentage by checklist section -2. Detailed findings for each non-compliant item -3. Remediation recommendations with priority levels -4. BMAD integration assessment results -5. Clear signoff recommendation -6. Next steps for implementation or remediation - -## Offer Advanced Self-Refinement & Elicitation Options - -Present the user with the following list of 'Advanced Reflective, Elicitation & Brainstorming Actions'. Explain that these are optional steps to help ensure quality, explore alternatives, and deepen the understanding of the current section before finalizing it and moving on. The user can select an action by number, or choose to skip this and proceed to finalize the section. - -"To ensure the quality of the current section: **[Specific Section Name]** and to ensure its robustness, explore alternatives, and consider all angles, I can perform any of the following actions. Please choose a number (8 to finalize and proceed): - -**Advanced Reflective, Elicitation & Brainstorming Actions I Can Take:** - -1. **Critical Security Assessment & Risk Analysis** -2. **Alternative Implementation Evaluation** -3. **Cross-Environment Consistency Review** -4. **Technical Debt & Maintainability Analysis** -5. **Compliance & Regulatory Alignment Deep Dive** -6. **Cost Optimization & Resource Efficiency Analysis** -7. **Operational Resilience & Failure Mode Testing (Theoretical)** -8. **Finalize this Section and Proceed.** - -After I perform the selected action, we can discuss the outcome and decide on any further revisions for this section." - -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)