From 3aac5cdfe67ad22e7de95e51eb11053db3ea1bbf Mon Sep 17 00:00:00 2001 From: DJ Date: Fri, 3 Apr 2026 04:36:37 -0700 Subject: [PATCH] feat: add bmad-create-infrastructure workflow skill Co-Authored-By: Claude Opus 4.6 (1M context) --- .../bmad-create-infrastructure/SKILL.md | 6 + .../infrastructure-template.md | 12 + .../steps/step-01-init.md | 172 ++++++++++ .../steps/step-02-iac-strategy.md | 270 +++++++++++++++ .../steps/step-03-environment-strategy.md | 290 ++++++++++++++++ .../steps/step-04-container-strategy.md | 320 ++++++++++++++++++ .../steps/step-05-validation.md | 269 +++++++++++++++ .../bmad-create-infrastructure/workflow.md | 32 ++ src/bmm-skills/module-help.csv | 1 + 9 files changed, 1372 insertions(+) create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/SKILL.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/infrastructure-template.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-01-init.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-02-iac-strategy.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-03-environment-strategy.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-04-container-strategy.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-05-validation.md create mode 100644 src/bmm-skills/3-solutioning/bmad-create-infrastructure/workflow.md diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/SKILL.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/SKILL.md new file mode 100644 index 000000000..82d4b261a --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/SKILL.md @@ -0,0 +1,6 @@ +--- +name: bmad-create-infrastructure +description: 'Define infrastructure-as-code strategy, environment topology, and deployment foundations. Use when the user says "create infrastructure plan" or "define infrastructure strategy" or "plan the infrastructure"' +--- + +Follow the instructions in ./workflow.md. diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/infrastructure-template.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/infrastructure-template.md new file mode 100644 index 000000000..c52c08a6e --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/infrastructure-template.md @@ -0,0 +1,12 @@ +--- +stepsCompleted: [] +inputDocuments: [] +workflowType: 'infrastructure' +project_name: '{{project_name}}' +user_name: '{{user_name}}' +date: '{{date}}' +--- + +# Infrastructure Decision Document + +_This document builds collaboratively through step-by-step discovery. Sections are appended as we work through each infrastructure decision together._ diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-01-init.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-01-init.md new file mode 100644 index 000000000..4d7410021 --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-01-init.md @@ -0,0 +1,172 @@ +# Step 1: Infrastructure Workflow Initialization + +## MANDATORY EXECUTION RULES (READ FIRST): + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions +- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding +- ✅ ALWAYS treat this as collaborative discovery between infrastructure peers +- 📋 YOU ARE A FACILITATOR, not a content generator +- 💬 FOCUS on initialization and setup only - don't look ahead to future steps +- 🚪 DETECT existing workflow state and handle continuation properly +- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed +- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` + +## EXECUTION PROTOCOLS: + +- 🎯 Show your analysis before taking any action +- 💾 Initialize document and update frontmatter +- 📖 Set up frontmatter `stepsCompleted: [1]` before loading next step +- 🚫 FORBIDDEN to load next step until setup is complete + +## CONTEXT BOUNDARIES: + +- Variables from workflow.md are available in memory +- Previous context = what's in output document + frontmatter +- Don't assume knowledge from other steps +- Input document discovery happens in this step + +## YOUR TASK: + +Initialize the Infrastructure workflow by detecting continuation state, discovering input documents, scanning for existing infrastructure indicators, and setting up the document for collaborative infrastructure decision making. + +## INITIALIZATION SEQUENCE: + +### 1. Check for Existing Workflow + +First, check if the output document already exists: + +- Look for existing {planning_artifacts}/`*infrastructure*.md` +- If exists, read the complete file including frontmatter +- If not exists, this is a fresh workflow + +### 2. Handle Continuation (If Document Exists) + +If the document exists and has frontmatter with `stepsCompleted`: + +- Read the document to determine the last completed step +- Report what was previously completed +- Ask the user which step to resume from +- Load the appropriate step file + +### 3. Fresh Workflow Setup (If No Document) + +If no document exists or no `stepsCompleted` in frontmatter: + +#### A. Input Document Discovery + +Discover and load context documents using smart discovery. Documents can be in the following locations: +- {planning_artifacts}/** +- {project_knowledge}/** +- {project-root}/docs/** + +Also - when searching - documents can be a single markdown file, or a folder with an index and multiple files. For example, if searching for `*foo*.md` and not found, also search for a folder called *foo*/index.md (which indicates sharded content) + +Try to discover the following: +- Architecture Document (`*architecture*.md`) +- Product Requirements Document (`*prd*.md`) +- Project Context (`**/project-context.md`) + +Confirm what you have found with the user, along with asking if the user wants to provide anything else. Only after this confirmation will you proceed to follow the loading rules + +**Loading Rules:** + +- Load ALL discovered files completely that the user confirmed or provided (no offset/limit) +- If there is a project context, whatever is relevant should try to be biased in the remainder of this whole workflow process +- For sharded folders, load ALL files to get complete picture, using the index first to potentially know the potential of each document +- index.md is a guide to what's relevant whenever available +- Track all successfully loaded files in frontmatter `inputDocuments` array + +#### B. Scan for Existing Infrastructure Indicators + +Scan the project for existing infrastructure-as-code artifacts: + +**IaC Files:** +- `*.tf`, `*.tfvars` (Terraform) +- `Pulumi.*` (Pulumi) +- `cdk.json` (AWS CDK) +- `serverless.yml` (Serverless Framework) + +**Container Files:** +- `Dockerfile`, `docker-compose*.yml` +- `k8s/` directory + +**CI/CD Files:** +- `.github/workflows/` directory +- `.gitlab-ci.yml` +- `Jenkinsfile` + +Report all indicators found. These inform later decisions in steps 2-4. + +#### C. Extract Architecture Category 5 Context + +If `architecture.md` was discovered: +- Look for **Category 5: Infrastructure & Deployment** decisions +- Extract any existing infrastructure-related decisions as starting context +- These become the foundation for more detailed infrastructure planning + +#### D. Create Initial Document + +Copy the template from `../infrastructure-template.md` to `{planning_artifacts}/infrastructure.md` + +#### E. Complete Initialization and Report + +Complete setup and report to user: + +**Document Setup:** + +- Created: `{planning_artifacts}/infrastructure.md` from template +- Initialized frontmatter with workflow state + +**Report to User:** +"Welcome {{user_name}}! I've set up your Infrastructure workspace for {{project_name}}. + +**Documents Found:** + +- Architecture: {found or "None found"} +- PRD: {found or "None found"} +- Project Context: {found or "None found"} + +**Existing Infrastructure Indicators:** + +- IaC files: {list or "None found"} +- Container files: {list or "None found"} +- CI/CD files: {list or "None found"} + +**Architecture Category 5 Context:** +{extracted decisions or "No prior infrastructure decisions found"} + +**Files loaded:** {list of specific file names or "No additional documents found"} + +Ready to begin infrastructure decision making. Do you have any other documents or context you'd like me to include? + +[C] Continue to IaC Strategy decisions + +## SUCCESS METRICS: + +✅ Existing workflow detected and continuation handled correctly +✅ Fresh workflow initialized with template and frontmatter +✅ Input documents discovered and loaded using sharded-first logic +✅ All discovered files tracked in frontmatter `inputDocuments` +✅ Existing infrastructure indicators scanned and reported +✅ Architecture Category 5 decisions extracted as starting context +✅ User confirmed document setup and can proceed + +## FAILURE MODES: + +❌ Proceeding with fresh initialization when existing workflow exists +❌ Not updating frontmatter with discovered input documents +❌ Creating document without proper template +❌ Not scanning for existing infrastructure indicators +❌ Not extracting Architecture Category 5 context when available +❌ Not reporting what documents and indicators were found to user + +❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions +❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file +❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols + +## NEXT STEP: + +After user selects [C] to continue, only after ensuring all the template output has been created, then load `./step-02-iac-strategy.md` to begin IaC strategy decisions. + +Remember: Do NOT proceed to step-02 until user explicitly selects [C] from the menu and setup is confirmed! diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-02-iac-strategy.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-02-iac-strategy.md new file mode 100644 index 000000000..f416fb684 --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-02-iac-strategy.md @@ -0,0 +1,270 @@ +# Step 2: Infrastructure-as-Code Strategy + +## MANDATORY EXECUTION RULES (READ FIRST): + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions +- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding +- ✅ ALWAYS treat this as collaborative discovery between infrastructure peers +- 📋 YOU ARE A FACILITATOR, not a content generator +- 💬 FOCUS on making IaC strategy decisions collaboratively +- 🌐 ALWAYS search the web to verify current technology versions +- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed +- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` + +## EXECUTION PROTOCOLS: + +- 🎯 Show your analysis before taking any action +- 🌐 Search the web to verify technology versions and options +- ⚠️ Present A/P/C menu after each major decision category +- 💾 ONLY save when user chooses C (Continue) +- 📖 Update frontmatter `stepsCompleted: [1, 2]` before loading next step +- 🚫 FORBIDDEN to load next step until C is selected + +## COLLABORATION MENUS (A/P/C): + +This step will generate content and present choices for each decision category: + +- **A (Advanced Elicitation)**: Use discovery protocols to explore innovative approaches to specific decisions +- **P (Party Mode)**: Bring multiple perspectives to evaluate decision trade-offs +- **C (Continue)**: Save the current decisions and proceed to next decision category + +## PROTOCOL INTEGRATION: + +- When 'A' selected: Invoke the `bmad-advanced-elicitation` skill +- When 'P' selected: Invoke the `bmad-party-mode` skill +- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed +- User accepts/rejects protocol changes before proceeding + +## CONTEXT BOUNDARIES: + +- Infrastructure indicators from step 1 are available +- Architecture Category 5 decisions from step 1 are available +- Project context file may contain infrastructure preferences and rules +- Focus on IaC strategy decisions only - environment strategy is in step 3 +- Collaborative decision making, not recommendations + +## YOUR TASK: + +Facilitate collaborative IaC strategy decision making, leveraging existing infrastructure indicators and architecture decisions as starting context. + +## DECISION MAKING SEQUENCE: + +### 1. Load Context from Step 1 + +Review what was discovered in initialization: +- Existing IaC indicators found in the project +- Architecture Category 5 decisions (if any) +- Project context preferences + +### 2. Decision Categories + +#### Category 1: IaC Tool Selection + +Present the decision with skill-level-appropriate explanations: + +**Expert Mode:** +"IaC Tool Selection: Terraform, Pulumi, AWS CDK, CloudFormation, Crossplane + +Options with trade-offs: +- **Terraform** - HCL declarative, cloud-agnostic, massive provider ecosystem, state management overhead +- **Pulumi** - General-purpose languages (TS/Python/Go), cloud-agnostic, familiar programming constructs +- **AWS CDK** - TypeScript/Python, AWS-native, CloudFormation under the hood, strong typing +- **CloudFormation** - AWS-native, YAML/JSON, no state management needed, AWS-only +- **Crossplane** - Kubernetes-native, GitOps-aligned, control plane approach, steeper learning curve + +What's your preference?" + +**Intermediate Mode:** +"We need to choose our Infrastructure-as-Code tool. This is how we'll define and manage all our cloud resources as code instead of clicking through consoles. + +Common options: +- **Terraform** - The industry standard. Uses its own language (HCL). Works with any cloud provider. Huge community. +- **Pulumi** - Write infrastructure in languages you already know (TypeScript, Python). Newer but growing fast. +- **AWS CDK** - Best if you're all-in on AWS. Uses TypeScript or Python to generate CloudFormation. +- **CloudFormation** - AWS's built-in tool. No extra state management. AWS-only. +- **Crossplane** - If you're already deep into Kubernetes. Manages cloud resources like K8s resources. + +For your project, I'd lean toward {{recommendation}} because {{reason}}. What are your thoughts?" + +**Beginner Mode:** +"Let's talk about Infrastructure-as-Code (IaC). + +Instead of manually setting up servers and databases through a web console, IaC lets you describe your infrastructure in files - like a recipe for your cloud setup. Anyone can recreate the exact same environment from these files. + +Think of it like the difference between cooking from memory vs. having a detailed recipe. The recipe ensures consistency every time. + +Your main options: +- **Terraform** - Most popular. Like a universal recipe book that works with any kitchen (cloud provider). Great community support. +- **Pulumi** - Uses programming languages you might already know. Like writing recipes in your native language instead of learning a new one. +- **AWS CDK** - Best if your kitchen is exclusively AWS. Generates the native AWS recipe format automatically. + +My suggestion: {{recommendation}} +This is good for you because {{beginner_friendly_reason}}. + +What feels right to you?" + +**Verify Technology Versions:** +``` +Search the web: "{{selected_tool}} latest stable version" +Search the web: "{{selected_tool}} current LTS version" +``` + +#### Category 2: State Management + +- Remote backend selection (S3+DynamoDB, GCS, Azure Blob, Terraform Cloud, Pulumi Cloud) +- State locking mechanism +- Workspace/stack strategy (per-environment, per-component, or hybrid) +- State file organization and access control + +#### Category 3: Module/Component Design + +- Module structure for reusability (monorepo vs multi-repo) +- Shared module registry strategy +- Versioning approach for infrastructure modules +- Composability patterns (root modules, child modules, data sources) + +#### Category 4: Policy-as-Code + +- Policy engine selection (OPA/Rego, Sentinel, Checkov, tfsec, Bridgecrew) +- Policy scope (security, cost, compliance, naming conventions) +- Enforcement model (advisory, soft-mandatory, hard-mandatory) +- Integration with CI/CD pipeline + +#### Category 5: Drift Detection and Remediation + +- Drift detection approach (scheduled plans, continuous monitoring) +- Remediation strategy (auto-fix, alert-and-review, manual) +- Notification and alerting integration +- Reconciliation workflow + +### 3. Facilitate Each Decision Category + +For each category: +- Present the decision context with skill-level-appropriate explanation +- Reference any existing indicators or Architecture Category 5 decisions +- Get user input +- Record decision with rationale + +**Record Each Decision:** + +- Category: {{category}} +- Decision: {{user_choice}} +- Version: {{verified_version_if_applicable}} +- Rationale: {{user_reasoning_or_default}} +- Affects: {{components_or_environments}} + +### 4. Generate IaC Strategy Content + +After facilitating all decision categories, prepare the content to append: + +#### Content Structure: + +```markdown +## IaC Strategy + +### Tool Selection + +**IaC Tool:** {{selected_tool}} {{version}} +**Rationale:** {{rationale}} + +### State Management + +**Backend:** {{backend_choice}} +**Locking:** {{locking_mechanism}} +**Workspace Strategy:** {{workspace_approach}} +**Access Control:** {{access_control_approach}} + +### Module/Component Design + +**Structure:** {{module_structure}} +**Registry:** {{registry_strategy}} +**Versioning:** {{versioning_approach}} +**Composability:** {{composability_patterns}} + +### Policy-as-Code + +**Engine:** {{policy_engine}} +**Scope:** {{policy_scope}} +**Enforcement:** {{enforcement_model}} +**CI/CD Integration:** {{integration_approach}} + +### Drift Detection & Remediation + +**Detection:** {{detection_approach}} +**Remediation:** {{remediation_strategy}} +**Alerting:** {{alerting_integration}} +**Reconciliation:** {{reconciliation_workflow}} +``` + +### 5. Present Content and Menu + +Show the generated IaC strategy content and present choices: + +"I've documented the IaC strategy decisions we've made together. + +**Here's what I'll add to the document:** + +[Show the complete markdown content from step 4] + +**What would you like to do?** +[A] Advanced Elicitation - Explore innovative approaches to any specific decisions +[P] Party Mode - Review decisions from multiple perspectives +[C] Continue - Save these decisions and move to Environment Strategy" + +### 6. Handle Menu Selection + +#### If 'A' (Advanced Elicitation): + +- Invoke the `bmad-advanced-elicitation` skill with specific decision categories +- Process enhanced insights about particular decisions +- Ask user: "Accept these enhancements to the IaC strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'P' (Party Mode): + +- Invoke the `bmad-party-mode` skill with IaC strategy context +- Process collaborative insights about decision trade-offs +- Ask user: "Accept these changes to the IaC strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'C' (Continue): + +- Append the final content to `{planning_artifacts}/infrastructure.md` +- Update frontmatter: `stepsCompleted: [1, 2]` +- Load `./step-03-environment-strategy.md` + +## APPEND TO DOCUMENT: + +When user selects 'C', append the content directly to the document using the structure from step 4. + +## SUCCESS METRICS: + +✅ All IaC strategy decisions made collaboratively +✅ Technology versions verified using web search +✅ Decision rationale clearly documented +✅ Existing infrastructure indicators factored into decisions +✅ Architecture Category 5 decisions used as starting context +✅ User provided appropriate level of explanation for skill level +✅ A/P/C menu presented and handled correctly for each category +✅ Content properly appended to document when C selected + +## FAILURE MODES: + +❌ Making recommendations instead of facilitating decisions +❌ Not verifying technology versions with web search +❌ Ignoring existing infrastructure indicators from step 1 +❌ Not adapting explanations to user skill level +❌ Not presenting A/P/C menu after content generation + +❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions +❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file +❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols + +## NEXT STEP: + +After user selects 'C' and content is saved to document, load `./step-03-environment-strategy.md` to define environment management strategy. + +Remember: Do NOT proceed to step-03 until user explicitly selects 'C' from the A/P/C menu and content is saved! diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-03-environment-strategy.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-03-environment-strategy.md new file mode 100644 index 000000000..9213ae08c --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-03-environment-strategy.md @@ -0,0 +1,290 @@ +# Step 3: Environment Management Strategy + +## MANDATORY EXECUTION RULES (READ FIRST): + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions +- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding +- ✅ ALWAYS treat this as collaborative discovery between infrastructure peers +- 📋 YOU ARE A FACILITATOR, not a content generator +- 💬 FOCUS on making environment strategy decisions collaboratively +- 🌐 ALWAYS search the web to verify current technology versions +- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed +- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` + +## EXECUTION PROTOCOLS: + +- 🎯 Show your analysis before taking any action +- 🌐 Search the web to verify technology versions and options +- ⚠️ Present A/P/C menu after each major decision category +- 💾 ONLY save when user chooses C (Continue) +- 📖 Update frontmatter `stepsCompleted: [1, 2, 3]` before loading next step +- 🚫 FORBIDDEN to load next step until C is selected + +## COLLABORATION MENUS (A/P/C): + +This step will generate content and present choices for each decision category: + +- **A (Advanced Elicitation)**: Use discovery protocols to explore innovative approaches to specific decisions +- **P (Party Mode)**: Bring multiple perspectives to evaluate decision trade-offs +- **C (Continue)**: Save the current decisions and proceed to next decision category + +## PROTOCOL INTEGRATION: + +- When 'A' selected: Invoke the `bmad-advanced-elicitation` skill +- When 'P' selected: Invoke the `bmad-party-mode` skill +- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed +- User accepts/rejects protocol changes before proceeding + +## CONTEXT BOUNDARIES: + +- IaC strategy decisions from step 2 are available +- Infrastructure indicators from step 1 are available +- Architecture decisions from step 1 are available +- Focus on environment management decisions only - containerization is in step 4 +- Collaborative decision making, not recommendations + +## YOUR TASK: + +Facilitate collaborative environment management decision making, building on the IaC strategy established in step 2 to define how environments are structured, configured, and managed. + +## DECISION MAKING SEQUENCE: + +### 1. Load Context from Previous Steps + +Review relevant decisions: +- IaC tool and state management choices from step 2 +- Architecture Category 5 environment-related decisions +- Existing CI/CD indicators from step 1 + +### 2. Decision Categories + +#### Category 1: Environment Topology + +- Define environment tiers (development, staging, QA, production) +- Ephemeral/preview environments for pull requests +- Environment promotion flow (which environments gate production?) +- Shared vs isolated environments (per-developer, per-team, per-feature) + +Present with skill-level-appropriate explanations: + +**Expert Mode:** +"Environment Topology: Define your environment tiers and promotion flow. + +Considerations: +- Minimal: dev -> prod (fast, risky) +- Standard: dev -> staging -> prod (balanced) +- Enterprise: dev -> QA -> staging -> prod (thorough) +- Plus ephemeral: PR-based preview environments for testing + +What topology fits your team and risk tolerance?" + +**Intermediate Mode:** +"We need to decide which environments your project will have. Environments are separate copies of your application - each serving a different purpose. + +Common setups: +- **Minimal** (dev + prod) - Fast iteration, but less safety +- **Standard** (dev + staging + prod) - Good balance of speed and safety +- **Extended** (dev + QA + staging + prod) - More validation gates before production +- **With ephemeral** - Temporary environments for each pull request + +For most projects, I'd suggest starting with {{recommendation}}. What makes sense for your team?" + +**Beginner Mode:** +"Let's talk about environments. + +Think of environments like dress rehearsals before opening night. You wouldn't perform a play without practicing first - similarly, you want to test your application in conditions similar to production before releasing it to users. + +Your options: +- **Development** - Where you build and test daily (like a practice room) +- **Staging** - A near-perfect copy of production (like a dress rehearsal) +- **Production** - The real thing, what your users see (opening night) +- **Ephemeral** - Temporary test environments created automatically for each change + +My suggestion: {{recommendation}} +This gives you {{beginner_friendly_reason}}. + +What feels right for your project?" + +#### Category 2: Environment Parity (12-Factor Factor X) + +- Dev/prod parity principles and practical trade-offs +- Which services should be identical across environments vs. scaled down +- Data parity strategy (anonymized production data, synthetic data, seed data) +- Infrastructure parity (same IaC modules with different parameters vs. separate definitions) + +#### Category 3: Configuration Management (12-Factor Factor III) + +- Per-environment configuration approach (env vars, config files, parameter store) +- Configuration hierarchy and override strategy +- Feature flags vs. environment-specific configuration +- Configuration validation and drift detection + +#### Category 4: Secrets Management + +- Secrets management tool (HashiCorp Vault, AWS KMS, Azure Key Vault, GCP Secret Manager, sealed-secrets, SOPS) +- Secret rotation policy and automation +- Secret injection method (env vars, mounted volumes, sidecar, init container) +- Access control and audit logging for secrets + +**Verify Technology Versions:** +``` +Search the web: "{{selected_tool}} latest stable version" +Search the web: "{{selected_tool}} secret rotation best practices" +``` + +#### Category 5: Environment Provisioning and Teardown + +- Environment creation automation (IaC apply, scripts, GitOps) +- Teardown automation and scheduling (auto-destroy ephemeral after merge) +- Environment bootstrapping (initial data, service accounts, network peering) +- Self-service environment creation capabilities + +#### Category 6: Cost Management and Resource Tagging + +- Resource tagging strategy (environment, team, cost-center, project) +- Cost allocation and chargeback approach +- Non-production environment scheduling (scale down after hours) +- Resource cleanup automation for orphaned resources +- Budget alerts and spending limits per environment + +### 3. Facilitate Each Decision Category + +For each category: +- Present the decision context with skill-level-appropriate explanation +- Reference IaC tool choice from step 2 where relevant +- Get user input +- Record decision with rationale + +**Record Each Decision:** + +- Category: {{category}} +- Decision: {{user_choice}} +- Rationale: {{user_reasoning_or_default}} +- Affects: {{environments_or_workflows}} + +### 4. Generate Environment Strategy Content + +After facilitating all decision categories, prepare the content to append: + +#### Content Structure: + +```markdown +## Environment Management Strategy + +### Environment Topology + +**Tiers:** {{environment_tiers}} +**Promotion Flow:** {{promotion_flow}} +**Ephemeral Environments:** {{ephemeral_strategy}} +**Isolation Model:** {{isolation_approach}} + +### Environment Parity (12-Factor X) + +**Parity Principles:** {{parity_approach}} +**Service Scaling:** {{service_scaling_per_environment}} +**Data Strategy:** {{data_parity_approach}} +**Infrastructure Parity:** {{infra_parity_approach}} + +### Configuration Management (12-Factor III) + +**Configuration Approach:** {{config_approach}} +**Hierarchy:** {{config_hierarchy}} +**Feature Flags:** {{feature_flag_strategy}} +**Validation:** {{config_validation_approach}} + +### Secrets Management + +**Tool:** {{secrets_tool}} {{version}} +**Rotation:** {{rotation_policy}} +**Injection:** {{injection_method}} +**Access Control:** {{access_control_approach}} + +### Environment Provisioning & Teardown + +**Creation:** {{creation_automation}} +**Teardown:** {{teardown_automation}} +**Bootstrapping:** {{bootstrapping_approach}} +**Self-Service:** {{self_service_capabilities}} + +### Cost Management & Tagging + +**Tagging Strategy:** {{tagging_strategy}} +**Cost Allocation:** {{cost_allocation}} +**Scheduling:** {{non_prod_scheduling}} +**Cleanup:** {{cleanup_automation}} +**Budget Alerts:** {{budget_alert_approach}} +``` + +### 5. Present Content and Menu + +Show the generated environment strategy content and present choices: + +"I've documented the environment management strategy we've made together. + +**Here's what I'll add to the document:** + +[Show the complete markdown content from step 4] + +**What would you like to do?** +[A] Advanced Elicitation - Explore innovative approaches to any specific decisions +[P] Party Mode - Review decisions from multiple perspectives +[C] Continue - Save these decisions and move to Container Strategy" + +### 6. Handle Menu Selection + +#### If 'A' (Advanced Elicitation): + +- Invoke the `bmad-advanced-elicitation` skill with specific decision categories +- Process enhanced insights about particular decisions +- Ask user: "Accept these enhancements to the environment strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'P' (Party Mode): + +- Invoke the `bmad-party-mode` skill with environment strategy context +- Process collaborative insights about decision trade-offs +- Ask user: "Accept these changes to the environment strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'C' (Continue): + +- Append the final content to `{planning_artifacts}/infrastructure.md` +- Update frontmatter: `stepsCompleted: [1, 2, 3]` +- Load `./step-04-container-strategy.md` + +## APPEND TO DOCUMENT: + +When user selects 'C', append the content directly to the document using the structure from step 4. + +## SUCCESS METRICS: + +✅ All environment management decisions made collaboratively +✅ Technology versions verified using web search +✅ Decision rationale clearly documented +✅ 12-Factor principles (Factor III and X) properly addressed +✅ Cost management and tagging strategy defined +✅ User provided appropriate level of explanation for skill level +✅ A/P/C menu presented and handled correctly for each category +✅ Content properly appended to document when C selected + +## FAILURE MODES: + +❌ Making recommendations instead of facilitating decisions +❌ Not verifying technology versions with web search +❌ Ignoring IaC tool choice from step 2 when discussing state/config +❌ Not adapting explanations to user skill level +❌ Skipping cost management and tagging decisions +❌ Not presenting A/P/C menu after content generation + +❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions +❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file +❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols + +## NEXT STEP: + +After user selects 'C' and content is saved to document, load `./step-04-container-strategy.md` to define containerization strategy. + +Remember: Do NOT proceed to step-04 until user explicitly selects 'C' from the A/P/C menu and content is saved! diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-04-container-strategy.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-04-container-strategy.md new file mode 100644 index 000000000..d86454664 --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-04-container-strategy.md @@ -0,0 +1,320 @@ +# Step 4: Containerization Strategy + +## MANDATORY EXECUTION RULES (READ FIRST): + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions +- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding +- ✅ ALWAYS treat this as collaborative discovery between infrastructure peers +- 📋 YOU ARE A FACILITATOR, not a content generator +- 💬 FOCUS on making containerization decisions collaboratively +- 🌐 ALWAYS search the web to verify current technology versions +- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed +- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` + +## EXECUTION PROTOCOLS: + +- 🎯 Show your analysis before taking any action +- 🌐 Search the web to verify technology versions and options +- ⚠️ Present A/P/C menu after each major decision category +- 💾 ONLY save when user chooses C (Continue) +- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4]` before loading next step +- 🚫 FORBIDDEN to load next step until C is selected + +## COLLABORATION MENUS (A/P/C): + +This step will generate content and present choices for each decision category: + +- **A (Advanced Elicitation)**: Use discovery protocols to explore innovative approaches to specific decisions +- **P (Party Mode)**: Bring multiple perspectives to evaluate decision trade-offs +- **C (Continue)**: Save the current decisions and proceed to next decision category + +## PROTOCOL INTEGRATION: + +- When 'A' selected: Invoke the `bmad-advanced-elicitation` skill +- When 'P' selected: Invoke the `bmad-party-mode` skill +- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed +- User accepts/rejects protocol changes before proceeding + +## CONTEXT BOUNDARIES: + +- IaC strategy from step 2 is available +- Environment strategy from step 3 is available +- Infrastructure indicators from step 1 are available (container-related files) +- Focus on containerization decisions only - validation is in step 5 +- Collaborative decision making, not recommendations + +## YOUR TASK: + +Facilitate collaborative containerization decision making. First determine if the project should use containers at all, then if applicable, define the complete containerization strategy. + +## DECISION MAKING SEQUENCE: + +### 1. Assess Containerization Context + +Review what was discovered in step 1: +- Were any container files found? (`Dockerfile`, `docker-compose*.yml`, `k8s/`) +- What does the Architecture document say about deployment? +- What IaC tool was chosen in step 2? + +### 2. Initial Decision: Should This Project Use Containers? + +**If container indicators were found in step 1:** +"I found existing container artifacts in your project: {{found_artifacts}}. Let's build on these and define a comprehensive containerization strategy." + +Proceed directly to decision categories. + +**If NO container indicators were found:** + +Present the decision with skill-level-appropriate trade-off analysis: + +**Expert Mode:** +"No containerization indicators found. Should this project use containers? + +Trade-offs: +- **Containerized**: Consistent environments, portable, orchestration ecosystem, image management overhead +- **Serverless/PaaS**: Managed infrastructure, auto-scaling, vendor lock-in, cold starts +- **VM-based**: Full OS control, simpler networking, larger resource footprint, slower provisioning +- **Hybrid**: Mix approaches per service based on requirements + +Your project characteristics suggest {{analysis}}. What's your preference?" + +**Intermediate Mode:** +"Your project doesn't currently use containers. Let's decide if it should. + +**Containers** (Docker, Kubernetes): +- Pros: Same environment everywhere, easy to scale, great tooling ecosystem +- Cons: Added complexity, need to manage images and orchestration + +**Serverless/PaaS** (Lambda, Cloud Run, Heroku): +- Pros: Zero server management, auto-scaling, pay-per-use +- Cons: Vendor lock-in, cold starts, limited runtime options + +**Traditional VMs** (EC2, GCE): +- Pros: Full control, simple model, no container overhead +- Cons: More manual management, slower to provision + +Based on your project, I'd lean toward {{recommendation}} because {{reason}}. What do you think?" + +**Beginner Mode:** +"Let's talk about whether your project should use containers. + +Think of a container like a lunchbox that has everything your application needs to run - the code, settings, and all dependencies. No matter where you open the lunchbox, you get the exact same meal. + +Your options: +- **Containers** (Docker) - Pack your app in a lunchbox. Same app everywhere. Very popular in modern development. +- **Serverless** (like AWS Lambda) - Don't worry about servers at all. Just upload your code and it runs. Great for simpler apps. +- **Traditional servers** - Set up a computer in the cloud and run your app on it. Simple to understand, more to manage. + +My suggestion: {{recommendation}} +This is good for you because {{beginner_friendly_reason}}. + +What feels right?" + +**If user chooses "not containerized":** +- Record the decision with rationale +- Skip to generating a minimal content section noting the decision +- Proceed to step 5 + +### 3. Decision Categories (If Containerized) + +#### Category 1: Container Runtime Selection + +- Docker (industry standard, widest tooling support) +- containerd (lightweight, Kubernetes-native runtime) +- Podman (daemonless, rootless by default, Docker-compatible CLI) + +**Verify Technology Versions:** +``` +Search the web: "{{selected_runtime}} latest stable version" +``` + +#### Category 2: Dockerfile Best Practices + +- Multi-stage builds strategy (builder vs runtime stages) +- Base image selection (distroless, alpine, slim, full) +- Layer optimization approach (dependency caching, minimal layers) +- Security: non-root user, read-only filesystem, minimal packages +- `.dockerignore` strategy +- Build argument and secret handling during build + +#### Category 3: Container Orchestration + +- Kubernetes (EKS, GKE, AKS, self-managed) +- Amazon ECS / Fargate +- Google Cloud Run +- AWS App Runner +- Docker Compose (development/small deployments only) +- Nomad + +Present trade-offs based on: +- Team expertise and operational readiness +- Scale requirements from architecture decisions +- Cost implications +- Managed vs self-managed preference + +**Verify Technology Versions:** +``` +Search the web: "{{selected_orchestrator}} latest stable version" +Search the web: "{{selected_orchestrator}} production best practices" +``` + +#### Category 4: Registry and Image Management + +- Registry selection (ECR, GCR/Artifact Registry, Docker Hub, GitHub Container Registry, Harbor) +- Image tagging strategy (semver, git SHA, branch-based, immutable tags) +- Image scanning (Trivy, Snyk Container, ECR scanning, Grype) +- Image signing (cosign, Notary, Docker Content Trust) +- Retention policy for old images + +#### Category 5: Manifest Management + +- Helm (templated charts, release management, repository ecosystem) +- Kustomize (overlay-based, built into kubectl, no templating) +- Raw manifests (simple, no abstraction, harder to manage at scale) +- CDK8s / Pulumi K8s (programmatic, type-safe, general-purpose languages) + +### 4. Facilitate Each Decision Category + +For each category: +- Present the decision context with skill-level-appropriate explanation +- Reference container indicators found in step 1 +- Reference IaC and environment decisions from steps 2-3 +- Get user input +- Record decision with rationale + +**Record Each Decision:** + +- Category: {{category}} +- Decision: {{user_choice}} +- Version: {{verified_version_if_applicable}} +- Rationale: {{user_reasoning_or_default}} +- Affects: {{deployment_and_operations}} + +### 5. Generate Container Strategy Content + +After facilitating all decision categories, prepare the content to append: + +#### Content Structure (If Containerized): + +```markdown +## Containerization Strategy + +### Container Runtime + +**Runtime:** {{selected_runtime}} {{version}} +**Rationale:** {{rationale}} + +### Dockerfile Standards + +**Build Strategy:** {{multi_stage_approach}} +**Base Images:** {{base_image_selection}} +**Layer Optimization:** {{layer_strategy}} +**Security Practices:** {{security_practices}} +**Build Secrets:** {{build_secret_handling}} + +### Container Orchestration + +**Platform:** {{selected_orchestrator}} {{version}} +**Management:** {{managed_vs_self_managed}} +**Rationale:** {{rationale}} + +### Registry & Image Management + +**Registry:** {{selected_registry}} +**Tagging Strategy:** {{tagging_approach}} +**Scanning:** {{scanning_tool}} +**Signing:** {{signing_approach}} +**Retention:** {{retention_policy}} + +### Manifest Management + +**Tool:** {{selected_tool}} {{version}} +**Rationale:** {{rationale}} +**Structure:** {{manifest_organization}} +``` + +#### Content Structure (If Not Containerized): + +```markdown +## Containerization Strategy + +### Decision: Not Containerized + +**Deployment Model:** {{chosen_model}} (serverless/VM/PaaS) +**Rationale:** {{rationale}} +**Future Consideration:** {{when_to_reconsider_containers}} +``` + +### 6. Present Content and Menu + +Show the generated container strategy content and present choices: + +"I've documented the containerization strategy we've made together. + +**Here's what I'll add to the document:** + +[Show the complete markdown content from step 5] + +**What would you like to do?** +[A] Advanced Elicitation - Explore innovative approaches to any specific decisions +[P] Party Mode - Review decisions from multiple perspectives +[C] Continue - Save these decisions and move to Final Validation" + +### 7. Handle Menu Selection + +#### If 'A' (Advanced Elicitation): + +- Invoke the `bmad-advanced-elicitation` skill with specific decision categories +- Process enhanced insights about particular decisions +- Ask user: "Accept these enhancements to the container strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'P' (Party Mode): + +- Invoke the `bmad-party-mode` skill with container strategy context +- Process collaborative insights about decision trade-offs +- Ask user: "Accept these changes to the container strategy? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'C' (Continue): + +- Append the final content to `{planning_artifacts}/infrastructure.md` +- Update frontmatter: `stepsCompleted: [1, 2, 3, 4]` +- Load `./step-05-validation.md` + +## APPEND TO DOCUMENT: + +When user selects 'C', append the content directly to the document using the structure from step 5. + +## SUCCESS METRICS: + +✅ Containerization decision made (use containers or not) with clear rationale +✅ If containerized: all container strategy decisions made collaboratively +✅ Technology versions verified using web search +✅ Decision rationale clearly documented +✅ Existing container indicators factored into decisions +✅ User provided appropriate level of explanation for skill level +✅ A/P/C menu presented and handled correctly for each category +✅ Content properly appended to document when C selected + +## FAILURE MODES: + +❌ Assuming containers without asking when no indicators found +❌ Making recommendations instead of facilitating decisions +❌ Not verifying technology versions with web search +❌ Ignoring container indicators from step 1 +❌ Not adapting explanations to user skill level +❌ Not presenting A/P/C menu after content generation + +❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions +❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file +❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols + +## NEXT STEP: + +After user selects 'C' and content is saved to document, load `./step-05-validation.md` to validate and finalize the infrastructure decision document. + +Remember: Do NOT proceed to step-05 until user explicitly selects 'C' from the A/P/C menu and content is saved! diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-05-validation.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-05-validation.md new file mode 100644 index 000000000..cda66865a --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/steps/step-05-validation.md @@ -0,0 +1,269 @@ +# Step 5: Infrastructure Validation & Completion + +## MANDATORY EXECUTION RULES (READ FIRST): + +- 🛑 NEVER generate content without user input +- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete decisions +- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding +- ✅ ALWAYS treat this as collaborative discovery between infrastructure peers +- 📋 YOU ARE A FACILITATOR, not a content generator +- 💬 FOCUS on validating infrastructure coherence and completeness +- ✅ VALIDATE all critical decisions were made +- ⚠️ ABSOLUTELY NO TIME ESTIMATES - AI development speed has fundamentally changed +- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` + +## EXECUTION PROTOCOLS: + +- 🎯 Show your analysis before taking any action +- ✅ Run comprehensive validation checks on the complete infrastructure document +- ⚠️ Present A/P/C menu after generating validation results +- 💾 ONLY save when user chooses C (Continue) +- 📖 Update frontmatter `stepsCompleted: [1, 2, 3, 4, 5]` on final save +- 🚫 THIS IS THE FINAL STEP IN THIS WORKFLOW + +## COLLABORATION MENUS (A/P/C): + +This step will generate content and present choices: + +- **A (Advanced Elicitation)**: Use discovery protocols to address complex infrastructure concerns found during validation +- **P (Party Mode)**: Bring multiple perspectives to resolve validation concerns +- **C (Continue)**: Save the validation results and complete the infrastructure document + +## PROTOCOL INTEGRATION: + +- When 'A' selected: Invoke the `bmad-advanced-elicitation` skill +- When 'P' selected: Invoke the `bmad-party-mode` skill +- PROTOCOLS always return to display this step's A/P/C menu after the A or P have completed +- User accepts/rejects protocol changes before proceeding + +## CONTEXT BOUNDARIES: + +- Complete infrastructure document with all sections is available +- All infrastructure decisions from steps 2-4 are documented +- Architecture document (if available) provides cross-reference context +- Focus on validation, gap analysis, and coherence checking + +## YOUR TASK: + +Validate the complete Infrastructure Decision Document for coherence, completeness, and alignment with architecture decisions. Present a summary for final review. + +## VALIDATION SEQUENCE: + +### 1. Present Complete Document Summary + +Read the full `{planning_artifacts}/infrastructure.md` and present a structured summary of all decisions made: + +"Here's a summary of your complete Infrastructure Decision Document: + +**IaC Strategy:** +- Tool: {{tool_and_version}} +- State: {{state_management}} +- Modules: {{module_strategy}} +- Policy: {{policy_approach}} +- Drift: {{drift_strategy}} + +**Environment Management:** +- Topology: {{environment_tiers}} +- Parity: {{parity_approach}} +- Configuration: {{config_approach}} +- Secrets: {{secrets_tool}} +- Provisioning: {{provisioning_approach}} +- Cost: {{cost_strategy}} + +**Containerization:** +- {{containerized_or_not}} +- {{key_container_decisions_if_applicable}}" + +### 2. Cross-Reference with Architecture Category 5 + +If architecture.md was loaded in step 1: +- Compare all infrastructure decisions against Architecture Category 5 (Infrastructure & Deployment) +- Identify any alignment issues or contradictions +- Report findings: + +"**Architecture Alignment Check:** +- {{decision}}: {{aligned/misaligned}} - {{explanation}} +- ..." + +If no architecture document: +"**Note:** No architecture document was available for cross-reference. Ensure infrastructure decisions are reviewed when the architecture is created." + +### 3. Validate Critical Decisions + +Check that all critical decisions were made based on project type: + +**All Projects Must Have:** +- [ ] IaC tool selected with version +- [ ] State management strategy defined +- [ ] Environment topology defined +- [ ] Configuration management approach chosen +- [ ] Secrets management tool and strategy defined + +**Containerized Projects Must Also Have:** +- [ ] Container runtime selected +- [ ] Orchestration platform chosen +- [ ] Registry and image management defined +- [ ] Dockerfile standards established + +**Missing Decision Handling:** +If any critical decisions are missing: +"I noticed the following decisions weren't fully addressed: +- {{missing_decision}} + +Would you like to address these now, or note them as deferred?" + +### 4. Check for Missing Decisions by Project Type + +Based on the project context and architecture: +- Web application: Does it address CDN, static asset hosting, SSL/TLS? +- API service: Does it address API gateway, rate limiting infrastructure? +- Data-intensive: Does it address data pipeline infrastructure, storage tiers? +- Multi-region: Does it address region strategy, failover, data replication? + +Report any gaps relevant to the project type. + +### 5. Generate Validation Content + +Prepare the content to append: + +#### Content Structure: + +```markdown +## Infrastructure Validation + +### Decision Summary + +| Area | Key Decision | Status | +|------|-------------|--------| +| IaC Tool | {{tool}} | ✅ Decided | +| State Management | {{backend}} | ✅ Decided | +| Environment Topology | {{topology}} | ✅ Decided | +| Configuration | {{approach}} | ✅ Decided | +| Secrets Management | {{tool}} | ✅ Decided | +| Containerization | {{decision}} | ✅ Decided | +| {{other_decisions}} | {{details}} | ✅/⚠️ | + +### Architecture Alignment + +{{alignment_findings}} + +### Completeness Assessment + +**Critical Decisions:** {{all_addressed / gaps_identified}} +**Project-Type Decisions:** {{relevant_decisions_checked}} +**Overall Status:** {{READY / NEEDS_ATTENTION}} + +### Deferred Decisions + +{{any_decisions_explicitly_deferred_with_rationale}} + +### Infrastructure Readiness Assessment + +**Overall Status:** READY FOR PIPELINE DEFINITION + +**Confidence Level:** {{high/medium/low}} based on validation results + +**Key Strengths:** +{{list_of_infrastructure_strengths}} + +**Areas for Future Enhancement:** +{{areas_that_could_be_improved_later}} +``` + +### 6. Present Content and Menu + +Show the validation results and present choices: + +"I've completed validation of your Infrastructure Decision Document. + +**Validation Summary:** + +- ✅ Decision coherence validated +- ✅ Architecture alignment checked +- ✅ Critical decisions verified +- ✅ Project-type gaps assessed + +**Here's what I'll add to complete the document:** + +[Show the complete markdown content from step 5] + +**What would you like to do?** +[A] Advanced Elicitation - Address any complex infrastructure concerns +[P] Party Mode - Review validation from different operational perspectives +[C] Continue - Complete the infrastructure document" + +### 7. Handle Menu Selection + +#### If 'A' (Advanced Elicitation): + +- Invoke the `bmad-advanced-elicitation` skill with validation issues +- Process enhanced solutions for complex concerns +- Ask user: "Accept these infrastructure improvements? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'P' (Party Mode): + +- Invoke the `bmad-party-mode` skill with validation context +- Process collaborative insights on infrastructure readiness +- Ask user: "Accept these changes to the validation results? (y/n)" +- If yes: Update content, then return to A/P/C menu +- If no: Keep original content, then return to A/P/C menu + +#### If 'C' (Continue): + +- Append the final content to `{planning_artifacts}/infrastructure.md` +- Update frontmatter: + ```yaml + stepsCompleted: [1, 2, 3, 4, 5] + workflowType: 'infrastructure' + lastStep: 5 + status: 'complete' + completedAt: '{{current_date}}' + ``` +- Save final document to `{planning_artifacts}/infrastructure.md` + +### 8. Report Completion + +Both you and the user completed something important here - give a summary of what you achieved together and congratulate the user. + +"Infrastructure decisions documented. Consider running the pipeline workflow (bmad-create-pipeline) to define your CI/CD strategy, or proceed to Create Epics and Stories to plan implementation." + +Invoke the `bmad-help` skill for next steps guidance. + +Upon completion: offer to answer any questions about the Infrastructure Decision Document. + +## APPEND TO DOCUMENT: + +When user selects 'C', append the content directly to the document using the structure from step 5. + +## SUCCESS METRICS: + +✅ Complete infrastructure document summary presented +✅ Architecture Category 5 cross-reference completed +✅ All critical decisions validated as present +✅ Project-type specific gaps identified and addressed +✅ Comprehensive validation checklist completed +✅ A/P/C menu presented and handled correctly +✅ Content properly appended to document when C selected +✅ Clear next steps provided to user + +## FAILURE MODES: + +❌ Skipping cross-reference with architecture decisions +❌ Not checking for missing critical decisions +❌ Missing project-type specific gap analysis +❌ Not addressing gaps found during validation +❌ Providing incomplete validation summary +❌ Not presenting A/P/C menu after content generation +❌ Not providing clear next steps after completion + +❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor decisions +❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file +❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols + +## WORKFLOW COMPLETE: + +This is the final step of the Infrastructure workflow. The user now has a complete, validated infrastructure decision document ready to guide deployment and operations decisions. + +The infrastructure document will serve as the foundation for CI/CD pipeline definition and consistent environment management across the project lifecycle. diff --git a/src/bmm-skills/3-solutioning/bmad-create-infrastructure/workflow.md b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/workflow.md new file mode 100644 index 000000000..37b59e7a8 --- /dev/null +++ b/src/bmm-skills/3-solutioning/bmad-create-infrastructure/workflow.md @@ -0,0 +1,32 @@ +# Infrastructure Workflow + +**Goal:** Define infrastructure-as-code decisions and environment strategy through collaborative step-by-step discovery that ensures consistent, reproducible deployments. + +**Your Role:** You are an infrastructure facilitator collaborating with a peer. This is a partnership, not a client-vendor relationship. You bring infrastructure engineering knowledge and operational experience, while the user brings domain expertise and project requirements. Work together as equals to make decisions that prevent deployment drift and environment inconsistencies. + +--- + +## WORKFLOW ARCHITECTURE + +This uses **micro-file architecture** for disciplined execution: + +- Each step is a self-contained file with embedded rules +- Sequential progression with user control at each step +- Document state tracked in frontmatter +- Append-only document building through conversation +- You NEVER proceed to a step file if the current step file indicates the user must approve and indicate continuation. + +## Activation + +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning + +2. EXECUTION + +Read fully and follow: `./steps/step-01-init.md` to begin the workflow. + +**Note:** Input document discovery and all initialization protocols are handled in step-01-init.md. diff --git a/src/bmm-skills/module-help.csv b/src/bmm-skills/module-help.csv index 8a2207757..a5db5418a 100644 --- a/src/bmm-skills/module-help.csv +++ b/src/bmm-skills/module-help.csv @@ -19,6 +19,7 @@ BMad Method,bmad-validate-prd,Validate PRD,VP,,,[path],2-planning,bmad-create-pr BMad Method,bmad-edit-prd,Edit PRD,EP,,,[path],2-planning,bmad-validate-prd,,false,planning_artifacts,updated prd BMad Method,bmad-create-ux-design,Create UX,CU,"Guidance through realizing the plan for your UX, strongly recommended if a UI is a primary piece of the proposed project.",,2-planning,bmad-create-prd,,false,planning_artifacts,ux design BMad Method,bmad-agent-devops,DevOps Lead,DL,Infrastructure-as-code CI/CD pipelines deployment strategies and environment management.,,3-solutioning,,,false,, +BMad Method,bmad-create-infrastructure,Create Infrastructure,II,Define infrastructure-as-code strategy environment topology and deployment foundations.,,3-solutioning,,,false,planning_artifacts,infrastructure BMad Method,bmad-create-architecture,Create Architecture,CA,Guided workflow to document technical decisions.,,3-solutioning,,,true,planning_artifacts,architecture BMad Method,bmad-create-epics-and-stories,Create Epics and Stories,CE,,,3-solutioning,bmad-create-architecture,,true,planning_artifacts,epics and stories BMad Method,bmad-check-implementation-readiness,Check Implementation Readiness,IR,Ensure PRD UX Architecture and Epics Stories are aligned.,,3-solutioning,bmad-create-epics-and-stories,,true,planning_artifacts,readiness report