diff --git a/docs/installers-bundlers/installers-modules-platforms-reference.md b/docs/installers-bundlers/installers-modules-platforms-reference.md
index f9437d74..a0c7f074 100644
--- a/docs/installers-bundlers/installers-modules-platforms-reference.md
+++ b/docs/installers-bundlers/installers-modules-platforms-reference.md
@@ -311,6 +311,66 @@ bmad status -v # Detailed status
- Agent references (cross-module)
- Template dependencies
- Partial module installation (only required files)
+- Workflow vendoring for standalone module operation
+
+## Workflow Vendoring
+
+**Problem**: Modules that reference workflows from other modules create dependencies, forcing users to install multiple modules even when they only need one.
+
+**Solution**: Workflow vendoring allows modules to copy workflows from other modules during installation, making them fully standalone.
+
+### How It Works
+
+Agents can specify both `workflow` (source location) and `workflow-install` (destination location) in their menu items:
+
+```yaml
+menu:
+ - trigger: create-story
+ workflow: '{project-root}/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml'
+ workflow-install: '{project-root}/bmad/bmgd/workflows/4-production/create-story/workflow.yaml'
+ description: 'Create a game feature story'
+```
+
+**During Installation:**
+
+1. **Vendoring Phase**: Before copying module files, the installer:
+ - Scans source agent YAML files for `workflow-install` attributes
+ - Copies entire workflow folders from `workflow` path to `workflow-install` path
+ - Updates vendored `workflow.yaml` files to reference target module's config
+
+2. **Compilation Phase**: When compiling agents:
+ - If `workflow-install` exists, uses its value for the `workflow` attribute
+ - `workflow-install` is build-time metadata only, never appears in final XML
+ - Compiled agent references vendored workflow location
+
+3. **Config Update**: Vendored workflows get their `config_source` updated:
+
+ ```yaml
+ # Source workflow (in bmm):
+ config_source: "{project-root}/bmad/bmm/config.yaml"
+
+ # Vendored workflow (in bmgd):
+ config_source: "{project-root}/bmad/bmgd/config.yaml"
+ ```
+
+**Result**: Modules become completely standalone with their own copies of needed workflows, configured for their specific use case.
+
+### Example Use Case: BMGD Module
+
+The BMad Game Development module vendors implementation workflows from BMM:
+
+- Game Dev Scrum Master agent references BMM workflows
+- During installation, workflows are copied to `bmgd/workflows/4-production/`
+- Vendored workflows use BMGD's config (with game-specific settings)
+- BMGD can be installed without BMM dependency
+
+### Benefits
+
+✅ **Module Independence** - No forced dependencies
+✅ **Clean Namespace** - Workflows live in their module
+✅ **Config Isolation** - Each module uses its own configuration
+✅ **Customization Ready** - Vendored workflows can be modified independently
+✅ **No User Confusion** - Avoid partial module installations
### File Processing
@@ -318,6 +378,7 @@ bmad status -v # Detailed status
- Excludes `_module-installer/` directories
- Replaces path placeholders at runtime
- Injects activation blocks
+- Vendors cross-module workflows (see Workflow Vendoring below)
### Web Bundling
diff --git a/src/modules/bmb/workflows/create-agent/instructions.md b/src/modules/bmb/workflows/create-agent/instructions.md
index 745aab1a..97b41de9 100644
--- a/src/modules/bmb/workflows/create-agent/instructions.md
+++ b/src/modules/bmb/workflows/create-agent/instructions.md
@@ -193,9 +193,23 @@ menu:
- trigger: [emerging from conversation]
workflow: [path based on capability]
description: [user's words refined]
-```
+
+# For cross-module workflow references (advanced):
+
+- trigger: [another capability]
+ workflow: "{project-root}/bmad/SOURCE_MODULE/workflows/path/to/workflow.yaml"
+ workflow-install: "{project-root}/bmad/THIS_MODULE/workflows/vendored/path/workflow.yaml"
+ description: [description]
+
+`````
+**Workflow Vendoring (Advanced):**
+When an agent needs workflows from another module, use both `workflow` (source) and `workflow-install` (destination).
+During installation, the workflow will be copied and configured for this module, making it standalone.
+This is typically used when creating specialized modules that reuse common workflows with different configurations.
+
+
agent_commands
@@ -298,14 +312,16 @@ menu: {{The capabilities built}}
**Folder Structure:**
-```
+`````
+
{{agent_filename}}-sidecar/
-├── memories.md # Persistent memory
-├── instructions.md # Private directives
-├── knowledge/ # Knowledge base
-│ └── README.md
-└── sessions/ # Session notes
-```
+├── memories.md # Persistent memory
+├── instructions.md # Private directives
+├── knowledge/ # Knowledge base
+│ └── README.md
+└── sessions/ # Session notes
+
+````
**File: memories.md**
@@ -323,7 +339,7 @@ menu: {{The capabilities built}}
## Personal Notes
-```
+````
**File: instructions.md**
diff --git a/src/modules/bmb/workflows/create-module/module-structure.md b/src/modules/bmb/workflows/create-module/module-structure.md
index 52b0d7f5..56c76f63 100644
--- a/src/modules/bmb/workflows/create-module/module-structure.md
+++ b/src/modules/bmb/workflows/create-module/module-structure.md
@@ -136,6 +136,40 @@ Tasks should be used for:
- Declare dependencies in config.yaml
- Version compatibility notes
+### Workflow Vendoring (Advanced)
+
+For modules that need workflows from other modules but want to remain standalone, use **workflow vendoring**:
+
+**In Agent YAML:**
+
+```yaml
+menu:
+ - trigger: command-name
+ workflow: '{project-root}/bmad/SOURCE_MODULE/workflows/path/workflow.yaml'
+ workflow-install: '{project-root}/bmad/THIS_MODULE/workflows/vendored/workflow.yaml'
+ description: 'Command description'
+```
+
+**What Happens:**
+
+- During installation, workflows are copied from `workflow` to `workflow-install` location
+- Vendored workflows get `config_source` updated to reference this module's config
+- Compiled agent only references the `workflow-install` path
+- Module becomes fully standalone - no source module dependency required
+
+**Use Cases:**
+
+- Specialized modules that reuse common workflows with different configs
+- Domain-specific adaptations (e.g., game dev using standard dev workflows)
+- Testing workflows in isolation
+
+**Benefits:**
+
+- Module independence (no forced dependencies)
+- Clean namespace (workflows in your module)
+- Config isolation (use your module's settings)
+- Customization ready (modify vendored workflows freely)
+
## Installation Infrastructure
### Required: \_module-installer/install-config.yaml
diff --git a/src/modules/bmgd/README.md b/src/modules/bmgd/README.md
new file mode 100644
index 00000000..ab83797b
--- /dev/null
+++ b/src/modules/bmgd/README.md
@@ -0,0 +1,208 @@
+# BMad Game Development (BMGD)
+
+A comprehensive game development toolkit providing specialized agents and workflows for creating games from initial concept through production.
+
+## Overview
+
+The BMGD module brings together game-specific development workflows organized around industry-standard development phases:
+
+- **Preproduction** - Concept development, brainstorming, game brief creation
+- **Design** - Game Design Document (GDD) and narrative design
+- **Technical** - Game architecture and technical specifications
+- **Production** - Sprint-based implementation using BMM workflows
+
+## Installation
+
+```bash
+bmad install bmgd
+```
+
+During installation, you'll be asked to configure:
+
+- Game project name
+- Document storage locations
+- Development experience level
+- Primary target platform
+
+## Components
+
+### Agents (4)
+
+**Game Designer** 🎨
+Creative vision and game design documentation specialist. Creates compelling GDDs and defines game mechanics.
+
+**Game Developer** 🕹️
+Senior implementation specialist with expertise across Unity, Unreal, and custom engines. Handles gameplay programming, physics, AI, and optimization.
+
+**Game Architect** 🏗️
+Technical systems and infrastructure expert. Designs scalable game architecture and engine-level solutions.
+
+**Game Dev Scrum Master** 🎯
+Sprint orchestrator specialized in game development workflows. Coordinates multi-disciplinary teams and translates GDDs into actionable development stories.
+
+### Team Bundle
+
+**Team Game Development** 🎮
+Pre-configured team including Game Designer, Game Developer, and Game Architect for comprehensive game projects.
+
+### Workflows
+
+#### Phase 1: Preproduction
+
+- **brainstorm-game** - Interactive game concept brainstorming
+- **game-brief** - Create focused game brief document
+
+#### Phase 2: Design
+
+- **gdd** - Generate comprehensive Game Design Document
+- **narrative** - Design narrative structure and story elements
+
+#### Phase 3: Technical
+
+- **game-architecture** - Define technical architecture (adapted from BMM architecture workflow)
+
+#### Phase 4: Production
+
+Production workflows are provided by the BMM module and accessible through the Game Dev Scrum Master agent:
+
+- Sprint planning
+- Story creation and management
+- Epic technical specifications
+- Code review and retrospectives
+
+## Quick Start
+
+### 1. Start with Concept Development
+
+```
+Load agent: game-designer
+Run workflow: brainstorm-game
+```
+
+### 2. Create Game Brief
+
+```
+Run workflow: game-brief
+```
+
+### 3. Develop Game Design Document
+
+```
+Run workflow: gdd
+```
+
+### 4. Define Technical Architecture
+
+```
+Load agent: game-architect
+Run workflow: game-architecture
+```
+
+### 5. Begin Production Sprints
+
+```
+Load agent: game-scrum-master
+Run: *sprint-planning
+```
+
+## Module Structure
+
+```
+bmgd/
+├── agents/
+│ ├── game-designer.agent.yaml
+│ ├── game-dev.agent.yaml
+│ ├── game-architect.agent.yaml
+│ └── game-scrum-master.agent.yaml
+├── teams/
+│ └── team-gamedev.yaml
+├── workflows/
+│ ├── 1-preproduction/
+│ │ ├── brainstorm-game/
+│ │ └── game-brief/
+│ ├── 2-design/
+│ │ ├── gdd/
+│ │ └── narrative/
+│ ├── 3-technical/
+│ │ └── game-architecture/
+│ └── 4-production/
+│ (Uses BMM workflows via cross-module references)
+├── templates/
+├── data/
+└── _module-installer/
+ └── install-config.yaml
+```
+
+## Configuration
+
+After installation, configure the module in `bmad/bmgd/config.yaml`
+
+Key settings:
+
+- **game_project_name** - Your game's working title
+- **game_design_docs** - Location for GDD and design documents
+- **game_tech_docs** - Location for technical documentation
+- **game_story_location** - Location for development user stories
+- **game_dev_experience** - Your experience level (affects agent communication)
+- **primary_platform** - Target platform (PC, mobile, console, web, multi-platform)
+
+## Workflow Integration
+
+BMGD leverages the BMM module for production/implementation workflows. The Game Dev Scrum Master agent provides access to:
+
+- Sprint planning and management
+- Story creation from GDD specifications
+- Epic technical context generation
+- Code review workflows
+- Retrospectives and course correction
+
+This separation allows BMGD to focus on game-specific design and architecture while using battle-tested agile implementation workflows.
+
+## Example: Creating a 2D Platformer
+
+1. **Brainstorm** concepts with `brainstorm-game` workflow
+2. **Define** the vision with `game-brief` workflow
+3. **Design** mechanics and progression with `gdd` workflow
+4. **Craft** character arcs and story with `narrative` workflow
+5. **Architect** technical systems with `game-architecture` workflow
+6. **Implement** via Game Dev Scrum Master sprint workflows
+
+## Development Roadmap
+
+### Phase 1: Core Enhancement
+
+- [ ] Customize game-architecture workflow for game-specific patterns
+- [ ] Add game-specific templates (level design, character sheets, etc.)
+- [ ] Create asset pipeline workflows
+
+### Phase 2: Expanded Features
+
+- [ ] Add monetization planning workflows
+- [ ] Create playtesting and feedback workflows
+- [ ] Develop game balancing tools
+
+### Phase 3: Platform Integration
+
+- [ ] Add platform-specific deployment workflows
+- [ ] Create build and release automation
+- [ ] Develop live ops workflows
+
+## Contributing
+
+To extend this module:
+
+1. Add new agents using `/bmad:bmb:workflows:create-agent`
+2. Add new workflows using `/bmad:bmb:workflows:create-workflow`
+3. Submit improvements via pull request
+
+## Dependencies
+
+- **BMM Module** - Required for production/implementation workflows
+
+## Author
+
+Extracted and refined from BMM module on 2025-11-05
+
+## License
+
+Part of the BMAD Method ecosystem
diff --git a/src/modules/bmgd/_module-installer/install-config.yaml b/src/modules/bmgd/_module-installer/install-config.yaml
new file mode 100644
index 00000000..c0b2f51e
--- /dev/null
+++ b/src/modules/bmgd/_module-installer/install-config.yaml
@@ -0,0 +1,66 @@
+# BMad Game Dev Module Configuration
+
+code: bmgd
+name: "BMGD: BMad Game Development"
+default_selected: false
+
+prompt:
+ - "Welcome to the BMad Game Development Module!"
+ - "This module provides specialized agents and workflows for game creation,"
+ - "from initial concept through production, covering all major game dev phases."
+ - "All paths are relative to project root, with no leading slash."
+
+# Core config values automatically inherited:
+## user_name
+## communication_language
+## document_output_language
+## output_folder
+
+game_project_name:
+ prompt: "What is the name of your game project?"
+ default: "{directory_name}"
+ result: "{value}"
+
+game_design_docs:
+ prompt: "Where should game design documents (GDD, narrative, etc.) be stored?"
+ default: "docs/design"
+ result: "{project-root}/{value}"
+
+game_tech_docs:
+ prompt: "Where should game technical documentation be stored?"
+ default: "docs/technical"
+ result: "{project-root}/{value}"
+
+game_story_location:
+ prompt: "Where should game development stories be stored?"
+ default: "docs/stories"
+ result: "{project-root}/{value}"
+
+game_dev_experience:
+ prompt: "What is your game development experience level?"
+ default: "intermediate"
+ result: "{value}"
+ single-select:
+ - value: "beginner"
+ label: "Beginner - New to game development, provide detailed guidance"
+ - value: "intermediate"
+ label: "Intermediate - Familiar with game dev concepts, balanced approach"
+ - value: "expert"
+ label: "Expert - Experienced game developer, be direct and technical"
+
+specified_framework:
+ prompt: "Which game development framework or engine do you want to install support for?"
+ default: "unity"
+ result: "{value}"
+ multi-select:
+ - value: "unity"
+ label: "Unity"
+ - value: "unreal"
+ label: "Unreal Engine"
+ - value: "godot"
+ label: "Godot"
+ - value: "custom"
+ label: "Custom / Other"
+
+data_path:
+ result: "{project-root}/bmad/bmgd/data"
diff --git a/src/modules/bmm/agents/game-architect.agent.yaml b/src/modules/bmgd/agents/game-architect.agent.yaml
similarity index 74%
rename from src/modules/bmm/agents/game-architect.agent.yaml
rename to src/modules/bmgd/agents/game-architect.agent.yaml
index 7f2c741f..dde1f526 100644
--- a/src/modules/bmm/agents/game-architect.agent.yaml
+++ b/src/modules/bmgd/agents/game-architect.agent.yaml
@@ -2,11 +2,11 @@
agent:
metadata:
- id: bmad/bmm/agents/game-architect.md
+ id: bmad/bmgd/agents/game-architect.md
name: Cloud Dragonborn
title: Game Architect
icon: 🏛️
- module: bmm
+ module: bmgd
persona:
role: Principal Game Systems Architect + Technical Director
@@ -18,18 +18,11 @@ agent:
- Scalability means building for tomorrow without over-engineering today. Simplicity is the ultimate sophistication in system design.
menu:
- - trigger: workflow-status
- workflow: "{project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml"
- description: Check workflow status and get recommendations
-
- trigger: correct-course
workflow: "{project-root}/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/correct-course/workflow.yaml"
description: Course Correction Analysis
- trigger: create-architecture
- workflow: "{project-root}/bmad/bmm/workflows/3-solutioning/architecture/workflow.yaml"
- description: Produce a Scale Adaptive Architecture
-
- - trigger: solutioning-gate-check
- workflow: "{project-root}/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml"
- description: Validate solutioning complete, ready for Phase 4 (Level 2-4 only)
+ workflow: "{project-root}/bmad/bmgd/workflows/3-technical/game-architecture/workflow.yaml"
+ description: Produce a Scale Adaptive Game Architecture
diff --git a/src/modules/bmm/agents/game-designer.agent.yaml b/src/modules/bmgd/agents/game-designer.agent.yaml
similarity index 57%
rename from src/modules/bmm/agents/game-designer.agent.yaml
rename to src/modules/bmgd/agents/game-designer.agent.yaml
index 3db30534..113efb99 100644
--- a/src/modules/bmm/agents/game-designer.agent.yaml
+++ b/src/modules/bmgd/agents/game-designer.agent.yaml
@@ -2,11 +2,11 @@
agent:
metadata:
- id: bmad/bmm/agents/game-designer.md
+ id: bmad/bmgd/agents/game-designer.md
name: Samus Shepard
title: Game Designer
icon: 🎲
- module: bmm
+ module: bmgd
persona:
role: Lead Game Designer + Creative Vision Architect
@@ -18,30 +18,18 @@ agent:
- Design is about making meaningful choices matter, creating moments of mastery, and respecting player time while delivering compelling challenge.
menu:
- - trigger: workflow-init
- workflow: "{project-root}/bmad/bmm/workflows/workflow-status/init/workflow.yaml"
- description: Start a new sequenced workflow path
-
- - trigger: workflow-status
- workflow: "{project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml"
- description: Check workflow status and get recommendations (START HERE!)
-
- trigger: brainstorm-game
- workflow: "{project-root}/bmad/bmm/workflows/1-analysis/brainstorm-game/workflow.yaml"
- description: Guide me through Game Brainstorming
+ workflow: "{project-root}/bmad/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml"
+ description: 1. Guide me through Game Brainstorming
- trigger: create-game-brief
- workflow: "{project-root}/bmad/bmm/workflows/1-analysis/game-brief/workflow.yaml"
- description: Create Game Brief
+ workflow: "{project-root}/bmad/bmgd/workflows/1-preproduction/game-brief/workflow.yaml"
+ description: 3. Create Game Brief
- trigger: create-gdd
- workflow: "{project-root}/bmad/bmm/workflows/2-plan-workflows/gdd/workflow.yaml"
- description: Create Game Design Document (GDD)
+ workflow: "{project-root}/bmad/bmgd/workflows/2-design/gdd/workflow.yaml"
+ description: 4. Create Game Design Document (GDD)
- trigger: narrative
- workflow: "{project-root}/bmad/bmm/workflows/2-plan-workflows/narrative/workflow.yaml"
- description: Create Narrative Design Document (story-driven games)
-
- - trigger: research
- workflow: "{project-root}/bmad/bmm/workflows/1-analysis/research/workflow.yaml"
- description: Conduct Game Market Research
+ workflow: "{project-root}/bmad/bmgd/workflows/2-design/narrative/workflow.yaml"
+ description: 5. Create Narrative Design Document (story-driven games)
diff --git a/src/modules/bmm/agents/game-dev.agent.yaml b/src/modules/bmgd/agents/game-dev.agent.yaml
similarity index 85%
rename from src/modules/bmm/agents/game-dev.agent.yaml
rename to src/modules/bmgd/agents/game-dev.agent.yaml
index 97c4b0f9..3718988b 100644
--- a/src/modules/bmm/agents/game-dev.agent.yaml
+++ b/src/modules/bmgd/agents/game-dev.agent.yaml
@@ -2,11 +2,11 @@
agent:
metadata:
- id: bmad/bmm/agents/game-dev.md
+ id: bmad/bmgd/agents/game-dev.md
name: Link Freeman
title: Game Developer
icon: 🕹️
- module: bmm
+ module: bmgd
persona:
role: Senior Game Developer + Technical Implementation Specialist
@@ -18,18 +18,17 @@ agent:
- Clean architecture enables creativity - messy code kills innovation. Ship early, ship often, iterate based on player feedback.
menu:
- - trigger: workflow-status
- workflow: "{project-root}/bmad/bmm/workflows/workflow-status/workflow.yaml"
- description: "Check workflow status and get recommendations"
-
- trigger: develop-story
workflow: "{project-root}/bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/dev-story/workflow.yaml"
description: "Execute Dev Story workflow, implementing tasks and tests, or performing updates to the story"
- - trigger: story-done
- workflow: "{project-root}/bmad/bmm/workflows/4-implementation/story-done/workflow.yaml"
- description: "Mark story done after DoD complete"
-
- trigger: code-review
workflow: "{project-root}/bmad/bmm/workflows/4-implementation/code-review/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/code-review/workflow.yaml"
description: "Perform a thorough clean context QA code review on a story flagged Ready for Review"
+
+ - trigger: story-done
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/story-done/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/story-done/workflow.yaml"
+ description: "Mark story done after DoD complete"
diff --git a/src/modules/bmgd/agents/game-scrum-master.agent.yaml b/src/modules/bmgd/agents/game-scrum-master.agent.yaml
new file mode 100644
index 00000000..29832bc1
--- /dev/null
+++ b/src/modules/bmgd/agents/game-scrum-master.agent.yaml
@@ -0,0 +1,70 @@
+# Game Dev Scrum Master Agent Definition
+
+agent:
+ metadata:
+ id: bmad/bmgd/agents/game-scrum-master.md
+ name: Max
+ title: Game Dev Scrum Master
+ icon: 🎯
+ module: bmgd
+
+ persona:
+ role: Game Development Scrum Master + Sprint Orchestrator
+ identity: Certified Scrum Master specializing in game development workflows. Expert in agile game development, story preparation for game features, and coordinating multi-disciplinary game teams (designers, developers, artists). Experienced in managing sprints across all game development phases from preproduction through production. Skilled at translating game design documents into actionable development stories.
+ communication_style: Energetic and milestone-focused. I speak in game dev terminology and celebrate hitting development milestones like hitting save points in a tough level. Clear handoffs and structured preparation are my special abilities. I keep the team moving forward through each phase of development.
+ principles:
+ - I maintain clean separation between design specification and implementation, ensuring GDDs and Tech Specs flow smoothly into developer-ready user stories that capture the essence of gameplay features.
+ - My commitment to iterative development means every sprint delivers playable increments, enabling rapid playtesting and feedback loops that keep the game fun.
+ - I coordinate across disciplines - ensuring designers, developers, and architects are aligned on feature implementation and technical approach.
+
+ critical_actions:
+ - "When running *create-story for game features, use GDD, Architecture, and Tech Spec to generate complete draft stories without elicitation, focusing on playable outcomes."
+
+ menu:
+ - trigger: sprint-planning
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/sprint-planning/workflow.yaml"
+ description: Generate or update sprint-status.yaml from epic files
+
+ - trigger: epic-tech-context
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/epic-tech-context/workflow.yaml"
+ description: (Optional) Use the GDD and Architecture to create an Epic-Tech-Spec for a specific epic
+
+ - trigger: validate-epic-tech-context
+ validate-workflow: "{project-root}/bmad/bmgd/workflows/4-production/epic-tech-context/workflow.yaml"
+ description: (Optional) Validate latest Tech Spec against checklist
+
+ - trigger: create-story-draft
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/create-story/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/create-story/workflow.yaml"
+ description: Create a Story Draft for a game feature
+
+ - trigger: validate-create-story
+ validate-workflow: "{project-root}/bmad/bmgd/workflows/4-production/create-story/workflow.yaml"
+ description: (Optional) Validate Story Draft with Independent Review
+
+ - trigger: story-context
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/story-context/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/story-context/workflow.yaml"
+ description: (Optional) Assemble dynamic Story Context (XML) from latest docs and code and mark story ready for dev
+
+ - trigger: validate-story-context
+ validate-workflow: "{project-root}/bmad/bmgd/workflows/4-production/story-context/workflow.yaml"
+ description: (Optional) Validate latest Story Context XML against checklist
+
+ - trigger: story-ready-for-dev
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/story-ready/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/story-ready/workflow.yaml"
+ description: (Optional) Mark drafted story ready for dev without generating Story Context
+
+ - trigger: epic-retrospective
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/retrospective/workflow.yaml"
+ data: "{project-root}/bmad/_cfg/agent-manifest.csv"
+ description: (Optional) Facilitate team retrospective after a game development epic is completed
+
+ - trigger: correct-course
+ workflow: "{project-root}/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml"
+ workflow-install: "{project-root}/bmad/bmgd/workflows/4-production/correct-course/workflow.yaml"
+ description: (Optional) Navigate significant changes during game dev sprint
diff --git a/src/modules/bmm/teams/team-gamedev.yaml b/src/modules/bmgd/teams/team-gamedev.yaml
similarity index 60%
rename from src/modules/bmm/teams/team-gamedev.yaml
rename to src/modules/bmgd/teams/team-gamedev.yaml
index f2c8e702..461efef4 100644
--- a/src/modules/bmm/teams/team-gamedev.yaml
+++ b/src/modules/bmgd/teams/team-gamedev.yaml
@@ -2,13 +2,15 @@
bundle:
name: Team Game Development
icon: 🎮
- description: Specialized game development team including Game Designer (creative vision and GDD), Game Developer (implementation and code), and Game Architect (technical systems and infrastructure). Perfect for game projects across all scales and platforms.
+ description: Specialized game development team including Game Designer (creative vision and GDD), Game Developer (implementation and code), Game Architect (technical systems and infrastructure), and Game Dev Scrum Master (sprint coordination). Perfect for game projects across all scales and platforms.
agents:
- game-designer
- game-dev
- game-architect
+ - game-scrum-master
workflows:
- brainstorm-game
- game-brief
- gdd
+ - narrative
diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-game/game-brain-methods.csv b/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/game-brain-methods.csv
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/brainstorm-game/game-brain-methods.csv
rename to src/modules/bmgd/workflows/1-preproduction/brainstorm-game/game-brain-methods.csv
diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-game/game-context.md b/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/game-context.md
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/brainstorm-game/game-context.md
rename to src/modules/bmgd/workflows/1-preproduction/brainstorm-game/game-context.md
diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md b/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/brainstorm-game/instructions.md
rename to src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md
diff --git a/src/modules/bmm/workflows/1-analysis/brainstorm-game/workflow.yaml b/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml
similarity index 72%
rename from src/modules/bmm/workflows/1-analysis/brainstorm-game/workflow.yaml
rename to src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml
index 356ec3f4..712dcfe6 100644
--- a/src/modules/bmm/workflows/1-analysis/brainstorm-game/workflow.yaml
+++ b/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml
@@ -4,16 +4,16 @@ description: "Facilitate game brainstorming sessions by orchestrating the CIS br
author: "BMad"
# Critical variables from config
-config_source: "{project-root}/bmad/bmm/config.yaml"
+config_source: "{project-root}/bmad/bmgd/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
-user_skill_level: "{config_source}:user_skill_level"
+game_dev_experience: "{config_source}:game_dev_experience"
date: system-generated
# Module path and component files
-installed_path: "{project-root}/bmad/bmm/workflows/1-analysis/brainstorm-game"
+installed_path: "{project-root}/bmad/bmgd/workflows/1-preproduction/brainstorm-game"
template: false
instructions: "{installed_path}/instructions.md"
@@ -30,12 +30,12 @@ web_bundle:
name: "brainstorm-game"
description: "Facilitate game brainstorming sessions by orchestrating the CIS brainstorming workflow with game-specific context, guidance, and additional game design techniques."
author: "BMad"
- instructions: "bmad/bmm/workflows/1-analysis/brainstorm-game/instructions.md"
+ instructions: "bmad/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md"
template: false
web_bundle_files:
- - "bmad/bmm/workflows/1-analysis/brainstorm-game/instructions.md"
- - "bmad/bmm/workflows/1-analysis/brainstorm-game/game-context.md"
- - "bmad/bmm/workflows/1-analysis/brainstorm-game/game-brain-methods.csv"
+ - "bmad/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md"
+ - "bmad/bmgd/workflows/1-preproduction/brainstorm-game/game-context.md"
+ - "bmad/bmgd/workflows/1-preproduction/brainstorm-game/game-brain-methods.csv"
- "bmad/core/workflows/brainstorming/workflow.yaml"
existing_workflows:
- core_brainstorming: "bmad/core/workflows/brainstorming/workflow.yaml"
diff --git a/src/modules/bmm/workflows/1-analysis/game-brief/checklist.md b/src/modules/bmgd/workflows/1-preproduction/game-brief/checklist.md
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/game-brief/checklist.md
rename to src/modules/bmgd/workflows/1-preproduction/game-brief/checklist.md
diff --git a/src/modules/bmm/workflows/1-analysis/game-brief/instructions.md b/src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/game-brief/instructions.md
rename to src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md
diff --git a/src/modules/bmm/workflows/1-analysis/game-brief/template.md b/src/modules/bmgd/workflows/1-preproduction/game-brief/template.md
similarity index 100%
rename from src/modules/bmm/workflows/1-analysis/game-brief/template.md
rename to src/modules/bmgd/workflows/1-preproduction/game-brief/template.md
diff --git a/src/modules/bmm/workflows/1-analysis/game-brief/workflow.yaml b/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml
similarity index 69%
rename from src/modules/bmm/workflows/1-analysis/game-brief/workflow.yaml
rename to src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml
index 98c2699e..43bfc19e 100644
--- a/src/modules/bmm/workflows/1-analysis/game-brief/workflow.yaml
+++ b/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml
@@ -4,12 +4,12 @@ description: "Interactive game brief creation workflow that guides users through
author: "BMad"
# Critical variables from config
-config_source: "{project-root}/bmad/bmm/config.yaml"
+config_source: "{project-root}/bmad/bmgd/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
-user_skill_level: "{config_source}:user_skill_level"
+game_dev_experience: "{config_source}:game_dev_experience"
date: system-generated
# Optional input documents
@@ -21,7 +21,7 @@ recommended_inputs:
- reference_games: "List of inspiration games (optional)"
# Module path and component files
-installed_path: "{project-root}/bmad/bmm/workflows/1-analysis/game-brief"
+installed_path: "{project-root}/bmad/bmgd/workflows/1-preproduction/game-brief"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
@@ -35,10 +35,10 @@ web_bundle:
name: "game-brief"
description: "Interactive game brief creation workflow that guides users through defining their game vision with multiple input sources and conversational collaboration"
author: "BMad"
- instructions: "bmad/bmm/workflows/1-analysis/game-brief/instructions.md"
- validation: "bmad/bmm/workflows/1-analysis/game-brief/checklist.md"
- template: "bmad/bmm/workflows/1-analysis/game-brief/template.md"
+ instructions: "bmad/bmgd/workflows/1-preproduction/game-brief/instructions.md"
+ validation: "bmad/bmgd/workflows/1-preproduction/game-brief/checklist.md"
+ template: "bmad/bmgd/workflows/1-preproduction/game-brief/template.md"
web_bundle_files:
- - "bmad/bmm/workflows/1-analysis/game-brief/instructions.md"
- - "bmad/bmm/workflows/1-analysis/game-brief/checklist.md"
- - "bmad/bmm/workflows/1-analysis/game-brief/template.md"
+ - "bmad/bmgd/workflows/1-preproduction/game-brief/instructions.md"
+ - "bmad/bmgd/workflows/1-preproduction/game-brief/checklist.md"
+ - "bmad/bmgd/workflows/1-preproduction/game-brief/template.md"
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/checklist.md b/src/modules/bmgd/workflows/2-design/gdd/checklist.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/checklist.md
rename to src/modules/bmgd/workflows/2-design/gdd/checklist.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types.csv b/src/modules/bmgd/workflows/2-design/gdd/game-types.csv
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types.csv
rename to src/modules/bmgd/workflows/2-design/gdd/game-types.csv
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/action-platformer.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/action-platformer.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/action-platformer.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/action-platformer.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/adventure.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/adventure.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/adventure.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/adventure.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/card-game.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/card-game.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/card-game.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/card-game.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/fighting.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/fighting.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/fighting.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/fighting.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/horror.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/horror.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/horror.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/horror.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/idle-incremental.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/idle-incremental.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/idle-incremental.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/idle-incremental.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/metroidvania.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/metroidvania.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/metroidvania.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/metroidvania.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/moba.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/moba.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/moba.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/moba.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/party-game.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/party-game.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/party-game.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/party-game.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/puzzle.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/puzzle.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/puzzle.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/puzzle.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/racing.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/racing.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/racing.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/racing.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/rhythm.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/rhythm.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/rhythm.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/rhythm.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/roguelike.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/roguelike.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/roguelike.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/roguelike.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/rpg.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/rpg.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/rpg.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/rpg.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/sandbox.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/sandbox.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/sandbox.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/sandbox.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/shooter.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/shooter.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/shooter.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/shooter.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/simulation.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/simulation.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/simulation.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/simulation.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/sports.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/sports.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/sports.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/sports.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/strategy.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/strategy.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/strategy.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/strategy.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/survival.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/survival.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/survival.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/survival.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/text-based.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/text-based.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/text-based.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/text-based.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/tower-defense.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/tower-defense.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/tower-defense.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/tower-defense.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/turn-based-tactics.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/turn-based-tactics.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/turn-based-tactics.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/turn-based-tactics.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/visual-novel.md b/src/modules/bmgd/workflows/2-design/gdd/game-types/visual-novel.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/game-types/visual-novel.md
rename to src/modules/bmgd/workflows/2-design/gdd/game-types/visual-novel.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/gdd-template.md b/src/modules/bmgd/workflows/2-design/gdd/gdd-template.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/gdd-template.md
rename to src/modules/bmgd/workflows/2-design/gdd/gdd-template.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md b/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/gdd/instructions-gdd.md
rename to src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md
diff --git a/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml b/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml
new file mode 100644
index 00000000..92b8cad5
--- /dev/null
+++ b/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml
@@ -0,0 +1,81 @@
+# Game Design Document (GDD) Workflow
+name: gdd
+description: "Game Design Document workflow for all game project levels - from small prototypes to full AAA games. Generates comprehensive GDD with game mechanics, systems, progression, and implementation guidance."
+author: "BMad"
+
+# Critical variables from config
+config_source: "{project-root}/bmad/bmgd/config.yaml"
+output_folder: "{config_source}:output_folder"
+user_name: "{config_source}:user_name"
+communication_language: "{config_source}:communication_language"
+document_output_language: "{config_source}:document_output_language"
+game_dev_experience: "{config_source}:game_dev_experience"
+date: system-generated
+
+# Workflow components
+installed_path: "{project-root}/bmad/bmgd/workflows/2-design/gdd"
+instructions: "{installed_path}/instructions-gdd.md"
+template: "{installed_path}/gdd-template.md"
+game_types_csv: "{installed_path}/game-types.csv"
+
+# Output configuration
+default_output_file: "{output_folder}/GDD.md"
+
+# Game type references (loaded based on game type selection)
+game_type_guides: "{installed_path}/game-types/"
+
+# Recommended input documents
+recommended_inputs:
+ - game_brief: "{output_folder}/game-brief.md"
+ - narrative_design: "{output_folder}/narrative-design.md"
+ - market_research: "{output_folder}/market-research.md"
+
+# Smart input file references - handles both whole docs and sharded docs
+# Priority: Whole document first, then sharded version
+input_file_patterns:
+ game_brief:
+ whole: "{output_folder}/*game-brief*.md"
+ sharded: "{output_folder}/*game-brief*/index.md"
+
+ research:
+ whole: "{output_folder}/*research*.md"
+ sharded: "{output_folder}/*research*/index.md"
+
+ document_project:
+ sharded: "{output_folder}/docs/index.md"
+
+standalone: true
+
+web_bundle:
+ name: "gdd"
+ description: "Game Design Document workflow for all game project levels - from small prototypes to full AAA games. Generates comprehensive GDD with game mechanics, systems, progression, and implementation guidance."
+ author: "BMad"
+ instructions: "bmad/bmgd/workflows/2-design/gdd/instructions-gdd.md"
+ web_bundle_files:
+ - "bmad/bmgd/workflows/2-design/gdd/instructions-gdd.md"
+ - "bmad/bmgd/workflows/2-design/gdd/gdd-template.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types.csv"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/action-platformer.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/adventure.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/card-game.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/fighting.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/horror.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/idle-incremental.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/metroidvania.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/moba.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/party-game.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/puzzle.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/racing.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/rhythm.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/roguelike.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/rpg.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/sandbox.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/shooter.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/simulation.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/sports.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/strategy.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/survival.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/text-based.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/tower-defense.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/turn-based-tactics.md"
+ - "bmad/bmgd/workflows/2-design/gdd/game-types/visual-novel.md"
diff --git a/src/modules/bmm/workflows/2-plan-workflows/narrative/checklist.md b/src/modules/bmgd/workflows/2-design/narrative/checklist.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/narrative/checklist.md
rename to src/modules/bmgd/workflows/2-design/narrative/checklist.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md b/src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md
rename to src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/narrative/narrative-template.md b/src/modules/bmgd/workflows/2-design/narrative/narrative-template.md
similarity index 100%
rename from src/modules/bmm/workflows/2-plan-workflows/narrative/narrative-template.md
rename to src/modules/bmgd/workflows/2-design/narrative/narrative-template.md
diff --git a/src/modules/bmm/workflows/2-plan-workflows/narrative/workflow.yaml b/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml
similarity index 74%
rename from src/modules/bmm/workflows/2-plan-workflows/narrative/workflow.yaml
rename to src/modules/bmgd/workflows/2-design/narrative/workflow.yaml
index 8ba66c37..2587ee05 100644
--- a/src/modules/bmm/workflows/2-plan-workflows/narrative/workflow.yaml
+++ b/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml
@@ -4,16 +4,16 @@ description: "Narrative design workflow for story-driven games and applications.
author: "BMad"
# Critical variables from config
-config_source: "{project-root}/bmad/bmm/config.yaml"
+config_source: "{project-root}/bmad/bmgd/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
-user_skill_level: "{config_source}:user_skill_level"
+game_dev_experience: "{config_source}:game_dev_experience"
date: system-generated
# Workflow components
-installed_path: "{project-root}/bmad/bmm/workflows/2-plan-workflows/narrative"
+installed_path: "{project-root}/bmad/bmgd/workflows/2-design/narrative"
instructions: "{installed_path}/instructions-narrative.md"
template: "{installed_path}/narrative-template.md"
@@ -32,7 +32,7 @@ web_bundle:
name: "narrative"
description: "Narrative design workflow for story-driven games and applications. Creates comprehensive narrative documentation including story structure, character arcs, dialogue systems, and narrative implementation guidance."
author: "BMad"
- instructions: "bmad/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md"
+ instructions: "bmad/bmgd/workflows/2-design/narrative/instructions-narrative.md"
web_bundle_files:
- - "bmad/bmm/workflows/2-plan-workflows/narrative/instructions-narrative.md"
- - "bmad/bmm/workflows/2-plan-workflows/narrative/narrative-template.md"
+ - "bmad/bmgd/workflows/2-design/narrative/instructions-narrative.md"
+ - "bmad/bmgd/workflows/2-design/narrative/narrative-template.md"
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-patterns.yaml b/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-patterns.yaml
new file mode 100644
index 00000000..247e7af8
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-patterns.yaml
@@ -0,0 +1,347 @@
+# Architecture Patterns - Common patterns identified from requirements
+
+requirement_patterns:
+ realtime_collaboration:
+ triggers:
+ - "real-time"
+ - "collaborative"
+ - "live updates"
+ - "multi-user"
+ - "simultaneous editing"
+ decisions_needed:
+ - websocket_solution
+ - conflict_resolution
+ - state_synchronization
+ - presence_tracking
+ - optimistic_updates
+ suggested_stack:
+ - "Socket.io or WebSocket native"
+ - "Redis for pub/sub"
+ - "Operational Transforms or CRDTs for conflict resolution"
+ - "PostgreSQL for persistence"
+
+ ecommerce:
+ triggers:
+ - "shopping cart"
+ - "checkout"
+ - "payments"
+ - "inventory"
+ - "product catalog"
+ decisions_needed:
+ - payment_processor
+ - cart_persistence
+ - inventory_management
+ - order_workflow
+ - tax_calculation
+ suggested_stack:
+ - "Stripe or PayPal for payments"
+ - "PostgreSQL for products and orders"
+ - "Redis for cart sessions"
+ - "BullMQ for order processing"
+
+ saas_platform:
+ triggers:
+ - "multi-tenant"
+ - "subscription"
+ - "billing"
+ - "team management"
+ - "roles and permissions"
+ decisions_needed:
+ - tenancy_model
+ - subscription_billing
+ - permission_system
+ - team_collaboration
+ - usage_tracking
+ suggested_stack:
+ - "PostgreSQL with Row Level Security"
+ - "Stripe Billing for subscriptions"
+ - "RBAC or ABAC for permissions"
+ - "NextAuth or Clerk for auth"
+
+ content_platform:
+ triggers:
+ - "CMS"
+ - "blog"
+ - "publishing"
+ - "content management"
+ - "editorial workflow"
+ decisions_needed:
+ - content_storage
+ - rich_text_editor
+ - media_handling
+ - version_control
+ - publishing_workflow
+ suggested_stack:
+ - "PostgreSQL for structured content"
+ - "S3 or Cloudinary for media"
+ - "Tiptap or Slate for rich text"
+ - "Algolia for search"
+
+ data_analytics:
+ triggers:
+ - "dashboards"
+ - "reporting"
+ - "metrics"
+ - "analytics"
+ - "data visualization"
+ decisions_needed:
+ - data_warehouse
+ - etl_pipeline
+ - visualization_library
+ - query_optimization
+ - caching_strategy
+ suggested_stack:
+ - "PostgreSQL or ClickHouse"
+ - "Apache Airflow or Temporal for ETL"
+ - "Chart.js or D3 for visualization"
+ - "Redis for query caching"
+
+ social_platform:
+ triggers:
+ - "social network"
+ - "feed"
+ - "following"
+ - "likes"
+ - "comments"
+ decisions_needed:
+ - graph_relationships
+ - feed_algorithm
+ - notification_system
+ - content_moderation
+ - privacy_controls
+ suggested_stack:
+ - "PostgreSQL with graph extensions or Neo4j"
+ - "Redis for feed caching"
+ - "Elasticsearch for user search"
+ - "WebSockets for notifications"
+
+ marketplace:
+ triggers:
+ - "marketplace"
+ - "vendors"
+ - "buyers and sellers"
+ - "transactions"
+ - "escrow"
+ decisions_needed:
+ - payment_splitting
+ - escrow_handling
+ - vendor_management
+ - dispute_resolution
+ - commission_model
+ suggested_stack:
+ - "Stripe Connect for payments"
+ - "PostgreSQL for transactions"
+ - "BullMQ for async processing"
+ - "S3 for vendor assets"
+
+ streaming_platform:
+ triggers:
+ - "video streaming"
+ - "live streaming"
+ - "media delivery"
+ - "broadcast"
+ decisions_needed:
+ - video_encoding
+ - cdn_strategy
+ - streaming_protocol
+ - bandwidth_optimization
+ - drm_protection
+ suggested_stack:
+ - "AWS MediaConvert or Mux"
+ - "CloudFront or Fastly CDN"
+ - "HLS or DASH protocol"
+ - "S3 for video storage"
+
+ iot_platform:
+ triggers:
+ - "IoT"
+ - "sensors"
+ - "device management"
+ - "telemetry"
+ - "edge computing"
+ decisions_needed:
+ - message_protocol
+ - time_series_database
+ - device_authentication
+ - data_ingestion
+ - edge_processing
+ suggested_stack:
+ - "MQTT or CoAP protocol"
+ - "TimescaleDB or InfluxDB"
+ - "Apache Kafka for ingestion"
+ - "Grafana for monitoring"
+
+ ai_application:
+ triggers:
+ - "machine learning"
+ - "AI features"
+ - "LLM integration"
+ - "computer vision"
+ - "NLP"
+ decisions_needed:
+ - model_serving
+ - vector_database
+ - prompt_management
+ - token_optimization
+ - fallback_strategy
+ suggested_stack:
+ - "OpenAI or Anthropic API"
+ - "Pinecone or pgvector for embeddings"
+ - "Redis for prompt caching"
+ - "Langchain or LlamaIndex"
+
+# Quality attribute patterns
+quality_attributes:
+ high_availability:
+ triggers:
+ - "99.9% uptime"
+ - "high availability"
+ - "fault tolerance"
+ - "disaster recovery"
+ architectural_needs:
+ - load_balancing
+ - database_replication
+ - health_checks
+ - circuit_breakers
+ - graceful_degradation
+
+ high_performance:
+ triggers:
+ - "millisecond response"
+ - "high throughput"
+ - "low latency"
+ - "performance critical"
+ architectural_needs:
+ - caching_layers
+ - database_optimization
+ - cdn_strategy
+ - code_splitting
+ - lazy_loading
+
+ high_security:
+ triggers:
+ - "compliance"
+ - "HIPAA"
+ - "GDPR"
+ - "financial data"
+ - "PCI DSS"
+ architectural_needs:
+ - encryption_at_rest
+ - encryption_in_transit
+ - audit_logging
+ - access_controls
+ - data_isolation
+
+ scalability:
+ triggers:
+ - "millions of users"
+ - "elastic scale"
+ - "global reach"
+ - "viral growth"
+ architectural_needs:
+ - horizontal_scaling
+ - database_sharding
+ - microservices
+ - queue_systems
+ - auto_scaling
+
+# Integration patterns
+integration_requirements:
+ payment_processing:
+ common_choices:
+ - "Stripe - most developer friendly"
+ - "PayPal - widest consumer adoption"
+ - "Square - best for in-person + online"
+ considerations:
+ - transaction_fees
+ - international_support
+ - subscription_handling
+ - marketplace_capabilities
+
+ email_service:
+ common_choices:
+ - "Resend - modern, developer friendly"
+ - "SendGrid - mature, scalable"
+ - "Amazon SES - cost effective at scale"
+ - "Postmark - transactional focus"
+ considerations:
+ - deliverability
+ - template_management
+ - analytics_needs
+ - cost_per_email
+
+ sms_notifications:
+ common_choices:
+ - "Twilio - most comprehensive"
+ - "Amazon SNS - AWS integrated"
+ - "Vonage - competitive pricing"
+ considerations:
+ - international_coverage
+ - delivery_rates
+ - two_way_messaging
+ - cost_per_message
+
+ authentication_providers:
+ social_providers:
+ - "Google - highest adoption"
+ - "GitHub - developer focused"
+ - "Microsoft - enterprise"
+ - "Apple - iOS users"
+ enterprise_providers:
+ - "SAML 2.0"
+ - "OAuth 2.0"
+ - "OpenID Connect"
+ - "Active Directory"
+
+# Decision heuristics
+decision_rules:
+ database_selection:
+ if_requirements_include:
+ - complex_relationships: "PostgreSQL"
+ - flexible_schema: "MongoDB"
+ - time_series: "TimescaleDB"
+ - graph_data: "Neo4j or PostgreSQL with extensions"
+ - key_value: "Redis"
+ - wide_column: "Cassandra"
+
+ api_pattern_selection:
+ if_requirements_include:
+ - simple_crud: "REST"
+ - complex_queries: "GraphQL"
+ - type_safety_critical: "tRPC"
+ - microservices: "gRPC"
+ - public_api: "REST with OpenAPI"
+
+ deployment_selection:
+ if_requirements_include:
+ - nextjs_only: "Vercel"
+ - complex_infrastructure: "AWS"
+ - quick_prototype: "Railway"
+ - global_edge: "Fly.io"
+ - kubernetes_needed: "GCP or AWS EKS"
+
+# Anti-patterns to avoid
+anti_patterns:
+ overengineering:
+ signs:
+ - "Microservices for < 10k users"
+ - "Kubernetes for single app"
+ - "GraphQL for 5 endpoints"
+ - "Event sourcing for CRUD app"
+ recommendation: "Start simple, evolve as needed"
+
+ underengineering:
+ signs:
+ - "No authentication strategy"
+ - "No error handling plan"
+ - "No monitoring approach"
+ - "No backup strategy"
+ recommendation: "Cover the fundamentals"
+
+ technology_soup:
+ signs:
+ - "5+ different databases"
+ - "Multiple frontend frameworks"
+ - "Inconsistent patterns"
+ - "Too many languages"
+ recommendation: "Maintain consistency"
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-template.md b/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-template.md
new file mode 100644
index 00000000..5012469d
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/architecture-template.md
@@ -0,0 +1,103 @@
+# Architecture
+
+## Executive Summary
+
+{{executive_summary}}
+
+{{project_initialization_section}}
+
+## Decision Summary
+
+| Category | Decision | Version | Affects Epics | Rationale |
+| -------- | -------- | ------- | ------------- | --------- |
+
+{{decision_table_rows}}
+
+## Project Structure
+
+```
+{{project_root}}/
+{{source_tree}}
+```
+
+## Epic to Architecture Mapping
+
+{{epic_mapping_table}}
+
+## Technology Stack Details
+
+### Core Technologies
+
+{{core_stack_details}}
+
+### Integration Points
+
+{{integration_details}}
+
+{{novel_pattern_designs_section}}
+
+## Implementation Patterns
+
+These patterns ensure consistent implementation across all AI agents:
+
+{{implementation_patterns}}
+
+## Consistency Rules
+
+### Naming Conventions
+
+{{naming_conventions}}
+
+### Code Organization
+
+{{code_organization_patterns}}
+
+### Error Handling
+
+{{error_handling_approach}}
+
+### Logging Strategy
+
+{{logging_approach}}
+
+## Data Architecture
+
+{{data_models_and_relationships}}
+
+## API Contracts
+
+{{api_specifications}}
+
+## Security Architecture
+
+{{security_approach}}
+
+## Performance Considerations
+
+{{performance_strategies}}
+
+## Deployment Architecture
+
+{{deployment_approach}}
+
+## Development Environment
+
+### Prerequisites
+
+{{development_prerequisites}}
+
+### Setup Commands
+
+```bash
+{{setup_commands}}
+```
+
+## Architecture Decision Records (ADRs)
+
+{{key_architecture_decisions}}
+
+---
+
+_Generated by BMAD Decision Architecture Workflow v1.0_
+_Date: {{date}}_
+_For: {{user_name}}_
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/checklist.md b/src/modules/bmgd/workflows/3-technical/game-architecture/checklist.md
new file mode 100644
index 00000000..fe1de530
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/checklist.md
@@ -0,0 +1,244 @@
+# Architecture Document Validation Checklist
+
+**Purpose**: Validate the architecture document itself is complete, implementable, and provides clear guidance for AI agents.
+
+**Note**: This checklist validates the ARCHITECTURE DOCUMENT only. For cross-workflow validation (PRD → Architecture → Stories alignment), use the solutioning-gate-check workflow.
+
+---
+
+## 1. Decision Completeness
+
+### All Decisions Made
+
+- [ ] Every critical decision category has been resolved
+- [ ] All important decision categories addressed
+- [ ] No placeholder text like "TBD", "[choose]", or "{TODO}" remains
+- [ ] Optional decisions either resolved or explicitly deferred with rationale
+
+### Decision Coverage
+
+- [ ] Data persistence approach decided
+- [ ] API pattern chosen
+- [ ] Authentication/authorization strategy defined
+- [ ] Deployment target selected
+- [ ] All functional requirements have architectural support
+
+---
+
+## 2. Version Specificity
+
+### Technology Versions
+
+- [ ] Every technology choice includes a specific version number
+- [ ] Version numbers are current (verified via WebSearch, not hardcoded)
+- [ ] Compatible versions selected (e.g., Node.js version supports chosen packages)
+- [ ] Verification dates noted for version checks
+
+### Version Verification Process
+
+- [ ] WebSearch used during workflow to verify current versions
+- [ ] No hardcoded versions from decision catalog trusted without verification
+- [ ] LTS vs. latest versions considered and documented
+- [ ] Breaking changes between versions noted if relevant
+
+---
+
+## 3. Starter Template Integration (if applicable)
+
+### Template Selection
+
+- [ ] Starter template chosen (or "from scratch" decision documented)
+- [ ] Project initialization command documented with exact flags
+- [ ] Starter template version is current and specified
+- [ ] Command search term provided for verification
+
+### Starter-Provided Decisions
+
+- [ ] Decisions provided by starter marked as "PROVIDED BY STARTER"
+- [ ] List of what starter provides is complete
+- [ ] Remaining decisions (not covered by starter) clearly identified
+- [ ] No duplicate decisions that starter already makes
+
+---
+
+## 4. Novel Pattern Design (if applicable)
+
+### Pattern Detection
+
+- [ ] All unique/novel concepts from PRD identified
+- [ ] Patterns that don't have standard solutions documented
+- [ ] Multi-epic workflows requiring custom design captured
+
+### Pattern Documentation Quality
+
+- [ ] Pattern name and purpose clearly defined
+- [ ] Component interactions specified
+- [ ] Data flow documented (with sequence diagrams if complex)
+- [ ] Implementation guide provided for agents
+- [ ] Edge cases and failure modes considered
+- [ ] States and transitions clearly defined
+
+### Pattern Implementability
+
+- [ ] Pattern is implementable by AI agents with provided guidance
+- [ ] No ambiguous decisions that could be interpreted differently
+- [ ] Clear boundaries between components
+- [ ] Explicit integration points with standard patterns
+
+---
+
+## 5. Implementation Patterns
+
+### Pattern Categories Coverage
+
+- [ ] **Naming Patterns**: API routes, database tables, components, files
+- [ ] **Structure Patterns**: Test organization, component organization, shared utilities
+- [ ] **Format Patterns**: API responses, error formats, date handling
+- [ ] **Communication Patterns**: Events, state updates, inter-component messaging
+- [ ] **Lifecycle Patterns**: Loading states, error recovery, retry logic
+- [ ] **Location Patterns**: URL structure, asset organization, config placement
+- [ ] **Consistency Patterns**: UI date formats, logging, user-facing errors
+
+### Pattern Quality
+
+- [ ] Each pattern has concrete examples
+- [ ] Conventions are unambiguous (agents can't interpret differently)
+- [ ] Patterns cover all technologies in the stack
+- [ ] No gaps where agents would have to guess
+- [ ] Implementation patterns don't conflict with each other
+
+---
+
+## 6. Technology Compatibility
+
+### Stack Coherence
+
+- [ ] Database choice compatible with ORM choice
+- [ ] Frontend framework compatible with deployment target
+- [ ] Authentication solution works with chosen frontend/backend
+- [ ] All API patterns consistent (not mixing REST and GraphQL for same data)
+- [ ] Starter template compatible with additional choices
+
+### Integration Compatibility
+
+- [ ] Third-party services compatible with chosen stack
+- [ ] Real-time solutions (if any) work with deployment target
+- [ ] File storage solution integrates with framework
+- [ ] Background job system compatible with infrastructure
+
+---
+
+## 7. Document Structure
+
+### Required Sections Present
+
+- [ ] Executive summary exists (2-3 sentences maximum)
+- [ ] Project initialization section (if using starter template)
+- [ ] Decision summary table with ALL required columns:
+ - Category
+ - Decision
+ - Version
+ - Rationale
+- [ ] Project structure section shows complete source tree
+- [ ] Implementation patterns section comprehensive
+- [ ] Novel patterns section (if applicable)
+
+### Document Quality
+
+- [ ] Source tree reflects actual technology decisions (not generic)
+- [ ] Technical language used consistently
+- [ ] Tables used instead of prose where appropriate
+- [ ] No unnecessary explanations or justifications
+- [ ] Focused on WHAT and HOW, not WHY (rationale is brief)
+
+---
+
+## 8. AI Agent Clarity
+
+### Clear Guidance for Agents
+
+- [ ] No ambiguous decisions that agents could interpret differently
+- [ ] Clear boundaries between components/modules
+- [ ] Explicit file organization patterns
+- [ ] Defined patterns for common operations (CRUD, auth checks, etc.)
+- [ ] Novel patterns have clear implementation guidance
+- [ ] Document provides clear constraints for agents
+- [ ] No conflicting guidance present
+
+### Implementation Readiness
+
+- [ ] Sufficient detail for agents to implement without guessing
+- [ ] File paths and naming conventions explicit
+- [ ] Integration points clearly defined
+- [ ] Error handling patterns specified
+- [ ] Testing patterns documented
+
+---
+
+## 9. Practical Considerations
+
+### Technology Viability
+
+- [ ] Chosen stack has good documentation and community support
+- [ ] Development environment can be set up with specified versions
+- [ ] No experimental or alpha technologies for critical path
+- [ ] Deployment target supports all chosen technologies
+- [ ] Starter template (if used) is stable and well-maintained
+
+### Scalability
+
+- [ ] Architecture can handle expected user load
+- [ ] Data model supports expected growth
+- [ ] Caching strategy defined if performance is critical
+- [ ] Background job processing defined if async work needed
+- [ ] Novel patterns scalable for production use
+
+---
+
+## 10. Common Issues to Check
+
+### Beginner Protection
+
+- [ ] Not overengineered for actual requirements
+- [ ] Standard patterns used where possible (starter templates leveraged)
+- [ ] Complex technologies justified by specific needs
+- [ ] Maintenance complexity appropriate for team size
+
+### Expert Validation
+
+- [ ] No obvious anti-patterns present
+- [ ] Performance bottlenecks addressed
+- [ ] Security best practices followed
+- [ ] Future migration paths not blocked
+- [ ] Novel patterns follow architectural principles
+
+---
+
+## Validation Summary
+
+### Document Quality Score
+
+- Architecture Completeness: [Complete / Mostly Complete / Partial / Incomplete]
+- Version Specificity: [All Verified / Most Verified / Some Missing / Many Missing]
+- Pattern Clarity: [Crystal Clear / Clear / Somewhat Ambiguous / Ambiguous]
+- AI Agent Readiness: [Ready / Mostly Ready / Needs Work / Not Ready]
+
+### Critical Issues Found
+
+- [ ] Issue 1: **\*\***\_\_\_**\*\***
+- [ ] Issue 2: **\*\***\_\_\_**\*\***
+- [ ] Issue 3: **\*\***\_\_\_**\*\***
+
+### Recommended Actions Before Implementation
+
+1. ***
+2. ***
+3. ***
+
+---
+
+**Next Step**: Run the **solutioning-gate-check** workflow to validate alignment between PRD, Architecture, and Stories before beginning implementation.
+
+---
+
+_This checklist validates architecture document quality only. Use solutioning-gate-check for comprehensive readiness validation._
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/decision-catalog.yaml b/src/modules/bmgd/workflows/3-technical/game-architecture/decision-catalog.yaml
new file mode 100644
index 00000000..fe0b9c03
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/decision-catalog.yaml
@@ -0,0 +1,222 @@
+# Decision Catalog - Composability knowledge for architectural decisions
+# This provides RELATIONSHIPS and WORKFLOW LOGIC, not generic tech knowledge
+#
+# ⚠️ CRITICAL: All version/feature info MUST be verified via WebSearch during workflow
+# This file only provides: triggers, relationships (pairs_with), and opinionated stacks
+
+decision_categories:
+ data_persistence:
+ triggers: ["database", "storage", "data model", "persistence", "state management"]
+ importance: "critical"
+ affects: "most epics"
+ options:
+ postgresql:
+ pairs_with: ["Prisma ORM", "TypeORM", "Drizzle", "node-postgres"]
+ mongodb:
+ pairs_with: ["Mongoose", "Prisma", "MongoDB driver"]
+ redis:
+ pairs_with: ["ioredis", "node-redis"]
+ supabase:
+ pairs_with: ["@supabase/supabase-js"]
+ firebase:
+ pairs_with: ["firebase-admin"]
+
+ api_pattern:
+ triggers: ["API", "client communication", "frontend backend", "service communication"]
+ importance: "critical"
+ affects: "all client-facing epics"
+ options:
+ rest:
+ pairs_with: ["Express", "Fastify", "NestJS", "Hono"]
+ graphql:
+ pairs_with: ["Apollo Server", "GraphQL Yoga", "Mercurius"]
+ trpc:
+ pairs_with: ["Next.js", "React Query"]
+ grpc:
+ pairs_with: ["@grpc/grpc-js", "protobufjs"]
+
+ authentication:
+ triggers: ["auth", "login", "user management", "security", "identity"]
+ importance: "critical"
+ affects: "security and user epics"
+ options:
+ nextauth:
+ pairs_with: ["Next.js", "Prisma"]
+ auth0:
+ pairs_with: ["@auth0/nextjs-auth0"]
+ clerk:
+ pairs_with: ["@clerk/nextjs"]
+ supabase_auth:
+ pairs_with: ["@supabase/supabase-js"]
+ firebase_auth:
+ pairs_with: ["firebase-admin"]
+
+ real_time:
+ triggers: ["real-time", "websocket", "live updates", "chat", "collaboration"]
+ importance: "medium"
+ affects: "real-time features"
+ options:
+ socket_io:
+ pairs_with: ["Express", "socket.io-client"]
+ pusher:
+ pairs_with: ["pusher-js"]
+ ably:
+ pairs_with: ["ably"]
+ supabase_realtime:
+ pairs_with: ["@supabase/supabase-js"]
+ firebase_realtime:
+ pairs_with: ["firebase"]
+
+ email:
+ triggers: ["email", "notifications", "transactional email"]
+ importance: "medium"
+ affects: "notification epics"
+ options:
+ resend:
+ pairs_with: ["resend", "react-email"]
+ sendgrid:
+ pairs_with: ["@sendgrid/mail"]
+ postmark:
+ pairs_with: ["postmark"]
+ ses:
+ pairs_with: ["@aws-sdk/client-ses"]
+
+ file_storage:
+ triggers: ["upload", "file storage", "images", "media", "CDN"]
+ importance: "medium"
+ affects: "media handling epics"
+ options:
+ s3:
+ pairs_with: ["@aws-sdk/client-s3", "multer"]
+ cloudinary:
+ pairs_with: ["cloudinary"]
+ uploadthing:
+ pairs_with: ["uploadthing"]
+ supabase_storage:
+ pairs_with: ["@supabase/supabase-js"]
+
+ search:
+ triggers: ["search", "full text", "elasticsearch", "algolia", "fuzzy"]
+ importance: "medium"
+ affects: "search and discovery epics"
+ options:
+ postgres_fts:
+ pairs_with: ["PostgreSQL"]
+ elasticsearch:
+ pairs_with: ["@elastic/elasticsearch"]
+ algolia:
+ pairs_with: ["algoliasearch"]
+ typesense:
+ pairs_with: ["typesense"]
+
+ background_jobs:
+ triggers: ["queue", "jobs", "workers", "async", "background processing", "scheduled"]
+ importance: "medium"
+ affects: "async processing epics"
+ options:
+ bullmq:
+ pairs_with: ["Redis"]
+ sqs:
+ pairs_with: ["@aws-sdk/client-sqs"]
+ temporal:
+ pairs_with: ["@temporalio/client"]
+ inngest:
+ pairs_with: ["inngest"]
+
+ deployment_target:
+ triggers: ["deployment", "hosting", "infrastructure", "cloud", "server"]
+ importance: "high"
+ affects: "all epics"
+ options:
+ vercel:
+ pairs_with: ["Next.js", "serverless functions"]
+ aws:
+ pairs_with: ["any stack"]
+ railway:
+ pairs_with: ["any stack", "managed databases"]
+ fly_io:
+ pairs_with: ["Docker containers"]
+
+# Opinionated stack combinations (BMM methodology)
+common_stacks:
+ modern_fullstack:
+ name: "Modern Full-Stack"
+ components: ["Next.js", "PostgreSQL or Supabase", "Prisma ORM", "NextAuth.js", "Tailwind CSS", "TypeScript", "Vercel"]
+ good_for: "Most web applications"
+
+ enterprise_stack:
+ name: "Enterprise Stack"
+ components: ["NestJS", "PostgreSQL", "TypeORM", "Auth0", "Redis", "Docker", "AWS"]
+ good_for: "Large-scale enterprise applications"
+
+ rapid_prototype:
+ name: "Rapid Prototype"
+ components: ["Next.js", "Supabase", "shadcn/ui", "Vercel"]
+ good_for: "MVP and rapid development"
+
+ real_time_app:
+ name: "Real-Time Application"
+ components: ["Next.js", "Supabase Realtime", "PostgreSQL", "Prisma", "Socket.io fallback"]
+ good_for: "Chat, collaboration, live updates"
+
+ mobile_app:
+ name: "Mobile Application"
+ components: ["Expo", "React Native", "Supabase or Firebase", "React Query"]
+ good_for: "Cross-platform mobile apps"
+
+# Starter templates and what decisions they make
+starter_templates:
+ create_next_app:
+ name: "Create Next App"
+ command_search: "npx create-next-app@latest"
+ decisions_provided: ["Next.js framework", "TypeScript option", "App Router vs Pages", "Tailwind CSS option", "ESLint"]
+ good_for: ["React web applications", "Full-stack apps", "SSR/SSG"]
+
+ create_t3_app:
+ name: "Create T3 App"
+ command_search: "npm create t3-app@latest"
+ decisions_provided: ["Next.js", "TypeScript", "tRPC", "Prisma", "NextAuth", "Tailwind CSS"]
+ good_for: ["Type-safe full-stack apps"]
+
+ create_vite:
+ name: "Create Vite"
+ command_search: "npm create vite@latest"
+ decisions_provided: ["Framework choice (React/Vue/Svelte)", "TypeScript option", "Vite bundler"]
+ good_for: ["Fast dev SPAs", "Library development"]
+
+ create_remix:
+ name: "Create Remix"
+ command_search: "npx create-remix@latest"
+ decisions_provided: ["Remix framework", "TypeScript option", "Deployment target", "CSS solution"]
+ good_for: ["Web standards", "Nested routing", "Progressive enhancement"]
+
+ nest_new:
+ name: "NestJS CLI"
+ command_search: "nest new project"
+ decisions_provided: ["TypeScript (always)", "Package manager", "Testing framework (Jest)", "Project structure"]
+ good_for: ["Enterprise APIs", "Microservices", "GraphQL APIs"]
+
+ create_expo_app:
+ name: "Create Expo App"
+ command_search: "npx create-expo-app"
+ decisions_provided: ["React Native", "Expo SDK", "TypeScript option", "Navigation option"]
+ good_for: ["Cross-platform mobile", "React Native apps"]
+
+# Starter selection heuristics (workflow logic)
+starter_selection_rules:
+ by_project_type:
+ web_application:
+ recommended: ["create_next_app", "create_t3_app", "create_vite"]
+ considerations: "SSR needs? → Next.js. Type safety critical? → T3. SPA only? → Vite"
+
+ mobile_app:
+ recommended: ["create_expo_app"]
+ considerations: "Cross-platform → Expo. Native-heavy → React Native CLI"
+
+ api_backend:
+ recommended: ["nest_new"]
+ considerations: "Enterprise → NestJS. Simple → Express starter. Performance → Fastify"
+
+ full_stack:
+ recommended: ["create_t3_app", "create_remix"]
+ considerations: "Type safety → T3. Web standards → Remix. Monolith → RedwoodJS"
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md b/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md
new file mode 100644
index 00000000..b78b74c5
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md
@@ -0,0 +1,704 @@
+# Decision Architecture Workflow Instructions
+
+
+
+The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml
+You MUST have already loaded and processed: {installed_path}/workflow.yaml
+This workflow uses ADAPTIVE FACILITATION - adjust your communication style based on {user_skill_level}
+The goal is ARCHITECTURAL DECISIONS that prevent AI agent conflicts, not detailed implementation specs
+Communicate all responses in {communication_language} and tailor to {user_skill_level}
+Generate all documents in {document_output_language}
+This workflow replaces architecture with a conversation-driven approach
+Input documents specified in workflow.yaml input_file_patterns - workflow engine handles fuzzy matching, whole vs sharded document discovery automatically
+ELICITATION POINTS: After completing each major architectural decision area (identified by template-output tags for decision_record, project_structure, novel_pattern_designs, implementation_patterns, and architecture_document), invoke advanced elicitation to refine decisions before proceeding
+
+
+Check if {output_folder}/bmm-workflow-status.yaml exists
+
+
+
+
+ Continue in standalone mode or exit to run workflow-init? (continue/exit)
+
+ Set standalone_mode = true
+
+
+ Exit workflow
+
+
+
+
+ Load the FULL file: {output_folder}/bmm-workflow-status.yaml
+ Parse workflow_status section
+ Check status of "create-architecture" workflow
+ Get project_level from YAML metadata
+ Find first non-completed workflow (next expected workflow)
+
+
+
+
+
+
+
+ Re-running will overwrite the existing architecture. Continue? (y/n)
+
+
+ Exit workflow
+
+
+
+
+
+ Continue with Architecture anyway? (y/n)
+
+
+ Exit workflow
+
+
+
+Set standalone_mode = false
+
+
+Check for existing PRD and epics files using fuzzy matching
+
+Fuzzy match PRD file: {prd_file}
+
+
+Exit workflow - PRD required
+
+
+
+
+
+ Load the PRD using fuzzy matching: {prd_file}, if the PRD is mulitple files in a folder, load the index file and all files associated with the PRD
+ Load epics file using fuzzy matching: {epics_file}
+
+Check for UX specification using fuzzy matching:
+Attempt to locate: {ux_spec_file}
+
+Load UX spec and extract architectural implications: - Component complexity (simple forms vs rich interactions) - Animation/transition requirements - Real-time update needs (live data, collaborative features) - Platform-specific UI requirements - Accessibility standards (WCAG compliance level) - Responsive design breakpoints - Offline capability requirements - Performance expectations (load times, interaction responsiveness)
+
+
+
+
+Extract and understand from PRD: - Functional Requirements (what it must do) - Non-Functional Requirements (performance, security, compliance, etc.) - Epic structure and user stories - Acceptance criteria - Any technical constraints mentioned
+
+
+Count and assess project scale: - Number of epics: {{epic_count}} - Number of stories: {{story_count}} - Complexity indicators (real-time, multi-tenant, regulated, etc.) - UX complexity level (if UX spec exists) - Novel features
+
+
+Reflect understanding back to {user_name}:
+"I'm reviewing your project documentation for {{project_name}}.
+I see {{epic_count}} epics with {{story_count}} total stories.
+{{if_ux_spec}}I also found your UX specification which defines the user experience requirements.{{/if_ux_spec}}
+
+ Key aspects I notice:
+ - [Summarize core functionality]
+ - [Note critical NFRs]
+ {{if_ux_spec}}- [Note UX complexity and requirements]{{/if_ux_spec}}
+ - [Identify unique challenges]
+
+ This will help me guide you through the architectural decisions needed
+ to ensure AI agents implement this consistently."
+
+
+
+Does this match your understanding of the project?
+project_context_understanding
+
+
+
+ Modern starter templates make many good architectural decisions by default
+
+Based on PRD analysis, identify the primary technology domain: - Web application → Look for Next.js, Vite, Remix starters - Mobile app → Look for React Native, Expo, Flutter starters - API/Backend → Look for NestJS, Express, Fastify starters - CLI tool → Look for CLI framework starters - Full-stack → Look for T3, RedwoodJS, Blitz starters
+
+
+
+ Consider UX requirements when selecting starter:
+ - Rich animations → Framer Motion compatible starter
+ - Complex forms → React Hook Form included starter
+ - Real-time features → Socket.io or WebSocket ready starter
+ - Accessibility focus → WCAG-compliant component library starter
+ - Design system → Storybook-enabled starter
+
+
+
+Search for relevant starter templates with websearch, examples:
+{{primary_technology}} starter template CLI create command latest {date}
+{{primary_technology}} boilerplate generator latest options
+
+
+
+ Investigate what each starter provides:
+ {{starter_name}} default setup technologies included latest
+ {{starter_name}} project structure file organization
+
+
+
+ Present starter options concisely:
+ "Found {{starter_name}} which provides:
+ {{quick_decision_list}}
+
+ This would establish our base architecture. Use it?"
+
+
+
+
+ Explain starter benefits:
+ "I found {{starter_name}}, which is like a pre-built foundation for your project.
+
+ Think of it like buying a prefab house frame instead of cutting each board yourself.
+
+ It makes these decisions for you:
+ {{friendly_decision_list}}
+
+ This is a great starting point that follows best practices. Should we use it?"
+
+
+
+ Use {{starter_name}} as the foundation? (recommended) [y/n]
+
+
+ Get current starter command and options:
+ {{starter_name}} CLI command options flags latest 2024
+
+
+ Document the initialization command:
+ Store command: {{full_starter_command_with_options}}
+ Example: "npx create-next-app@latest my-app --typescript --tailwind --app"
+
+
+ Extract and document starter-provided decisions:
+ Starter provides these architectural decisions:
+ - Language/TypeScript: {{provided_or_not}}
+ - Styling solution: {{provided_or_not}}
+ - Testing framework: {{provided_or_not}}
+ - Linting/Formatting: {{provided_or_not}}
+ - Build tooling: {{provided_or_not}}
+ - Project structure: {{provided_pattern}}
+
+
+ Mark these decisions as "PROVIDED BY STARTER" in our decision tracking
+
+ Note for first implementation story:
+ "Project initialization using {{starter_command}} should be the first implementation story"
+
+
+
+
+ Any specific reason to avoid the starter? (helps me understand constraints)
+ Note: Manual setup required, all decisions need to be made explicitly
+
+
+
+
+
+ Note: No standard starter template found for this project type.
+ We will make all architectural decisions explicitly.
+
+
+starter_template_decision
+
+
+
+ Based on {user_skill_level} from config, set facilitation approach:
+
+
+ Set mode: EXPERT
+ - Use technical terminology freely
+ - Move quickly through decisions
+ - Assume familiarity with patterns and tools
+ - Focus on edge cases and advanced concerns
+
+
+
+ Set mode: INTERMEDIATE
+ - Balance technical accuracy with clarity
+ - Explain complex patterns briefly
+ - Confirm understanding at key points
+ - Provide context for non-obvious choices
+
+
+
+ Set mode: BEGINNER
+ - Use analogies and real-world examples
+ - Explain technical concepts in simple terms
+ - Provide education about why decisions matter
+ - Protect from complexity overload
+
+
+
+Load decision catalog: {decision_catalog}
+Load architecture patterns: {architecture_patterns}
+
+Analyze PRD against patterns to identify needed decisions: - Match functional requirements to known patterns - Identify which categories of decisions are needed - Flag any novel/unique aspects requiring special attention - Consider which decisions the starter template already made (if applicable)
+
+
+Create decision priority list:
+CRITICAL (blocks everything): - {{list_of_critical_decisions}}
+
+ IMPORTANT (shapes architecture):
+ - {{list_of_important_decisions}}
+
+ NICE-TO-HAVE (can defer):
+ - {{list_of_optional_decisions}}
+
+
+
+Announce plan to {user_name} based on mode:
+
+"Based on your PRD, we need to make {{total_decision_count}} architectural decisions.
+{{starter_covered_count}} are covered by the starter template.
+Let's work through the remaining {{remaining_count}} decisions."
+
+
+
+ "Great! I've analyzed your requirements and found {{total_decision_count}} technical
+ choices we need to make. Don't worry - I'll guide you through each one and explain
+ why it matters. {{if_starter}}The starter template handles {{starter_covered_count}}
+ of these automatically.{{/if_starter}}"
+
+
+
+
+decision_identification
+
+
+
+ Each decision must be made WITH the user, not FOR them
+ ALWAYS verify current versions using WebSearch - NEVER trust hardcoded versions
+
+For each decision in priority order:
+
+Present the decision based on mode:
+
+"{{Decision_Category}}: {{Specific_Decision}}
+
+ Options: {{concise_option_list_with_tradeoffs}}
+
+ Recommendation: {{recommendation}} for {{reason}}"
+
+
+
+
+ "Next decision: {{Human_Friendly_Category}}
+
+ We need to choose {{Specific_Decision}}.
+
+ Common options:
+ {{option_list_with_brief_explanations}}
+
+ For your project, {{recommendation}} would work well because {{reason}}."
+
+
+
+
+ "Let's talk about {{Human_Friendly_Category}}.
+
+ {{Educational_Context_About_Why_This_Matters}}
+
+ Think of it like {{real_world_analogy}}.
+
+ Your main options:
+ {{friendly_options_with_pros_cons}}
+
+ My suggestion: {{recommendation}}
+ This is good for you because {{beginner_friendly_reason}}."
+
+
+
+
+
+
+ Verify current stable version:
+ {{technology}} latest stable version 2024
+ {{technology}} current LTS version
+
+
+ Update decision record with verified version:
+ Technology: {{technology}}
+ Verified Version: {{version_from_search}}
+ Verification Date: {{today}}
+
+
+
+
+What's your preference? (or 'explain more' for details)
+
+
+ Provide deeper explanation appropriate to skill level
+
+ Consider using advanced elicitation:
+ "Would you like to explore innovative approaches to this decision?
+ I can help brainstorm unconventional solutions if you have specific goals."
+
+
+
+
+Record decision:
+Category: {{category}}
+Decision: {{user_choice}}
+Version: {{verified_version_if_applicable}}
+Affects Epics: {{list_of_affected_epics}}
+Rationale: {{user_reasoning_or_default}}
+Provided by Starter: {{yes_if_from_starter}}
+
+
+Check for cascading implications:
+"This choice means we'll also need to {{related_decisions}}"
+
+
+decision_record
+{project-root}/bmad/core/tasks/adv-elicit.xml
+
+
+
+ These decisions affect EVERY epic and story
+
+Facilitate decisions for consistency patterns: - Error handling strategy (How will all agents handle errors?) - Logging approach (Structured? Format? Levels?) - Date/time handling (Timezone? Format? Library?) - Authentication pattern (Where? How? Token format?) - API response format (Structure? Status codes? Errors?) - Testing strategy (Unit? Integration? E2E?)
+
+
+
+ Explain why these matter why its critical to go through and decide these things now.
+
+
+cross_cutting_decisions
+
+
+
+ Based on all decisions made, define the project structure
+
+Create comprehensive source tree: - Root configuration files - Source code organization - Test file locations - Build/dist directories - Documentation structure
+
+
+Map epics to architectural boundaries:
+"Epic: {{epic_name}} → Lives in {{module/directory/service}}"
+
+
+Define integration points: - Where do components communicate? - What are the API boundaries? - How do services interact?
+
+
+project_structure
+{project-root}/bmad/core/tasks/adv-elicit.xml
+
+
+
+ Some projects require INVENTING new patterns, not just choosing existing ones
+
+Scan PRD for concepts that don't have standard solutions: - Novel interaction patterns (e.g., "swipe to match" before Tinder existed) - Unique multi-component workflows (e.g., "viral invitation system") - New data relationships (e.g., "social graph" before Facebook) - Unprecedented user experiences (e.g., "ephemeral messages" before Snapchat) - Complex state machines crossing multiple epics
+
+
+
+ For each novel pattern identified:
+
+ Engage user in design collaboration:
+
+ "The {{pattern_name}} concept requires architectural innovation.
+
+ Core challenge: {{challenge_description}}
+
+ Let's design the component interaction model:"
+
+
+
+ "Your idea about {{pattern_name}} is unique - there isn't a standard way to build this yet!
+
+ This is exciting - we get to invent the architecture together.
+
+ Let me help you think through how this should work:"
+
+
+
+ Facilitate pattern design:
+ 1. Identify core components involved
+ 2. Map data flow between components
+ 3. Design state management approach
+ 4. Create sequence diagrams for complex flows
+ 5. Define API contracts for the pattern
+ 6. Consider edge cases and failure modes
+
+
+ Use advanced elicitation for innovation:
+ "What if we approached this differently?
+ - What would the ideal user experience look like?
+ - Are there analogies from other domains we could apply?
+ - What constraints can we challenge?"
+
+
+ Document the novel pattern:
+ Pattern Name: {{pattern_name}}
+ Purpose: {{what_problem_it_solves}}
+ Components:
+ {{component_list_with_responsibilities}}
+ Data Flow:
+ {{sequence_description_or_diagram}}
+ Implementation Guide:
+ {{how_agents_should_build_this}}
+ Affects Epics:
+ {{epics_that_use_this_pattern}}
+
+
+ Validate pattern completeness:
+ "Does this {{pattern_name}} design cover all the use cases in your epics?
+ - {{use_case_1}}: ✓ Handled by {{component}}
+ - {{use_case_2}}: ✓ Handled by {{component}}
+ ..."
+
+
+
+
+
+ Note: All patterns in this project have established solutions.
+ Proceeding with standard architectural patterns.
+
+
+novel_pattern_designs
+{project-root}/bmad/core/tasks/adv-elicit.xml
+
+
+
+ These patterns ensure multiple AI agents write compatible code
+ Focus on what agents could decide DIFFERENTLY if not specified
+
+Load pattern categories: {pattern_categories}
+
+Based on chosen technologies, identify potential conflict points:
+"Given that we're using {{tech_stack}}, agents need consistency rules for:"
+
+
+For each relevant pattern category, facilitate decisions:
+
+ NAMING PATTERNS (How things are named):
+
+ - REST endpoint naming: /users or /user? Plural or singular?
+ - Route parameter format: :id or {id}?
+
+
+ - Table naming: users or Users or user?
+ - Column naming: user_id or userId?
+ - Foreign key format: user_id or fk_user?
+
+
+ - Component naming: UserCard or user-card?
+ - File naming: UserCard.tsx or user-card.tsx?
+
+
+ STRUCTURE PATTERNS (How things are organized):
+ - Where do tests live? __tests__/ or *.test.ts co-located?
+ - How are components organized? By feature or by type?
+ - Where do shared utilities go?
+
+ FORMAT PATTERNS (Data exchange formats):
+
+ - API response wrapper? {data: ..., error: ...} or direct response?
+ - Error format? {message, code} or {error: {type, detail}}?
+ - Date format in JSON? ISO strings or timestamps?
+
+
+ COMMUNICATION PATTERNS (How components interact):
+
+ - Event naming convention?
+ - Event payload structure?
+
+
+ - State update pattern?
+ - Action naming convention?
+
+
+ LIFECYCLE PATTERNS (State and flow):
+ - How are loading states handled?
+ - What's the error recovery pattern?
+ - How are retries implemented?
+
+ LOCATION PATTERNS (Where things go):
+ - API route structure?
+ - Static asset organization?
+ - Config file locations?
+
+ CONSISTENCY PATTERNS (Cross-cutting):
+ - How are dates formatted in the UI?
+ - What's the logging format?
+ - How are user-facing errors written?
+
+
+
+
+ Rapid-fire through patterns:
+ "Quick decisions on implementation patterns:
+ - {{pattern}}: {{suggested_convention}} OK? [y/n/specify]"
+
+
+
+
+ Explain each pattern's importance:
+ "Let me explain why this matters:
+ If one AI agent names database tables 'users' and another names them 'Users',
+ your app will crash. We need to pick one style and make sure everyone follows it."
+
+
+
+Document implementation patterns:
+Category: {{pattern_category}}
+Pattern: {{specific_pattern}}
+Convention: {{decided_convention}}
+Example: {{concrete_example}}
+Enforcement: "All agents MUST follow this pattern"
+
+
+implementation_patterns
+{project-root}/bmad/core/tasks/adv-elicit.xml
+
+
+
+ Run coherence checks:
+
+Check decision compatibility: - Do all decisions work together? - Are there any conflicting choices? - Do the versions align properly?
+
+
+Verify epic coverage: - Does every epic have architectural support? - Are all user stories implementable with these decisions? - Are there any gaps?
+
+
+Validate pattern completeness: - Are there any patterns we missed that agents would need? - Do novel patterns integrate with standard architecture? - Are implementation patterns comprehensive enough?
+
+
+
+ Address issues with {user_name}:
+ "I notice {{issue_description}}.
+ We should {{suggested_resolution}}."
+
+ How would you like to resolve this?
+ Update decisions based on resolution
+
+
+coherence_validation
+
+
+
+ The document must be complete, specific, and validation-ready
+ This is the consistency contract for all AI agents
+
+Load template: {architecture_template}
+
+Generate sections: 1. Executive Summary (2-3 sentences about the architecture approach) 2. Project Initialization (starter command if applicable) 3. Decision Summary Table (with verified versions and epic mapping) 4. Complete Project Structure (full tree, no placeholders) 5. Epic to Architecture Mapping (every epic placed) 6. Technology Stack Details (versions, configurations) 7. Integration Points (how components connect) 8. Novel Pattern Designs (if any were created) 9. Implementation Patterns (all consistency rules) 10. Consistency Rules (naming, organization, formats) 11. Data Architecture (models and relationships) 12. API Contracts (request/response formats) 13. Security Architecture (auth, authorization, data protection) 14. Performance Considerations (from NFRs) 15. Deployment Architecture (where and how) 16. Development Environment (setup and prerequisites) 17. Architecture Decision Records (key decisions with rationale)
+
+
+Fill template with all collected decisions and patterns
+
+Ensure starter command is first implementation story:
+
+"## Project Initialization
+
+ First implementation story should execute:
+ ```bash
+ {{starter_command_with_options}}
+ ```
+
+ This establishes the base architecture with these decisions:
+ {{starter_provided_decisions}}"
+
+
+
+
+architecture_document
+{project-root}/bmad/core/tasks/adv-elicit.xml
+
+
+
+ Load validation checklist: {installed_path}/checklist.md
+
+Run validation checklist from {installed_path}/checklist.md
+
+Verify MANDATORY items:
+□ Decision table has Version column with specific versions
+□ Every epic is mapped to architecture components
+□ Source tree is complete, not generic
+□ No placeholder text remains
+□ All FRs from PRD have architectural support
+□ All NFRs from PRD are addressed
+□ Implementation patterns cover all potential conflicts
+□ Novel patterns are fully documented (if applicable)
+
+
+
+ Fix missing items automatically
+ Regenerate document section
+
+
+validation_results
+
+
+
+ Present completion summary:
+
+
+ "Architecture complete. {{decision_count}} decisions documented.
+ Ready for implementation phase."
+
+
+
+ "Excellent! Your architecture is complete. You made {{decision_count}} important
+ decisions that will keep AI agents consistent as they build your app.
+
+ What happens next:
+ 1. AI agents will read this architecture before implementing each story
+ 2. They'll follow your technical choices exactly
+ 3. Your app will be built with consistent patterns throughout
+
+ You're ready to move to the implementation phase!"
+
+
+
+Save document to {output_folder}/architecture.md
+
+
+ Load the FULL file: {output_folder}/bmm-workflow-status.yaml
+ Find workflow_status key "create-architecture"
+ ONLY write the file path as the status value - no other text, notes, or metadata
+ Update workflow_status["create-architecture"] = "{output_folder}/bmm-architecture-{{date}}.md"
+ Save file, preserving ALL comments and structure including STATUS DEFINITIONS
+
+ Find first non-completed workflow in workflow_status (next workflow to do)
+ Determine next agent from path file based on next workflow
+
+
+
+
+
+
+
+completion_summary
+
+
+
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/pattern-categories.csv b/src/modules/bmgd/workflows/3-technical/game-architecture/pattern-categories.csv
new file mode 100644
index 00000000..bad699b1
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/pattern-categories.csv
@@ -0,0 +1,13 @@
+category,when_needed,what_to_define,why_critical
+naming_patterns,Any technology with named entities,How things are named (format/case/structure),Agents will create different names for same concept
+structure_patterns,Any technology with organization,How things are organized (folders/modules/layers),Agents will put things in different places
+format_patterns,Any technology with data exchange,How data is formatted (JSON/XML/responses),Agents will use incompatible formats
+communication_patterns,Any technology with inter-component communication,How components talk (protocols/events/messages),Agents will use different communication methods
+lifecycle_patterns,Any technology with state or flow,How state changes and flows work,Agents will handle state transitions differently
+location_patterns,Any technology with storage or routing,Where things go (URLs/paths/storage),Agents will put things in different locations
+consistency_patterns,Always,Cross-cutting concerns (dates/errors/logs),Every agent will do these differently
+
+# PRINCIPLE FOR LLM:
+# Any time multiple agents might make the SAME decision DIFFERENTLY, that's a pattern to capture.
+# Think about: What could an agent encounter where they'd have to guess?
+# If they'd guess, define the pattern. If it's obvious from the tech choice, skip it.
\ No newline at end of file
diff --git a/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml b/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml
new file mode 100644
index 00000000..55ed1c61
--- /dev/null
+++ b/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml
@@ -0,0 +1,67 @@
+# Game Architecture Workflow Configuration
+name: game-architecture
+description: "Collaborative game architecture workflow for AI-agent consistency. Intelligent, adaptive conversation that produces a decision-focused game architecture document covering engine, systems, networking, and technical design optimized for game development."
+author: "BMad"
+
+# Critical variables
+config_source: "{project-root}/bmad/bmgd/config.yaml"
+output_folder: "{config_source}:output_folder"
+user_name: "{config_source}:user_name"
+communication_language: "{config_source}:communication_language"
+document_output_language: "{config_source}:document_output_language"
+game_dev_experience: "{config_source}:game_dev_experience"
+date: system-generated
+
+# Input requirements - We work from GDD, Epics, and optionally Narrative Design
+recommended_inputs:
+ - gdd: "Game Design Document with mechanics, systems, and features"
+ - epics: "Epic definitions with user stories and acceptance criteria"
+ - narrative: "Narrative design document with story and character systems (optional)"
+
+# Smart input file references - handles both whole docs and sharded docs
+# Priority: Whole document first, then sharded version
+input_file_patterns:
+ gdd:
+ whole: "{output_folder}/*gdd*.md"
+ sharded: "{output_folder}/*gdd*/index.md"
+
+ epics:
+ whole: "{output_folder}/*epic*.md"
+ sharded: "{output_folder}/*epic*/index.md"
+
+ narrative:
+ whole: "{output_folder}/*narrative*.md"
+ sharded: "{output_folder}/*narrative*/index.md"
+
+ document_project:
+ sharded: "{output_folder}/docs/index.md"
+
+# Module path and component files
+installed_path: "{project-root}/bmad/bmgd/workflows/3-technical/game-architecture"
+instructions: "{installed_path}/instructions.md"
+validation: "{installed_path}/checklist.md"
+template: "{installed_path}/architecture-template.md"
+
+# Knowledge bases for intelligent decision making
+decision_catalog: "{installed_path}/decision-catalog.yaml"
+architecture_patterns: "{installed_path}/architecture-patterns.yaml"
+pattern_categories: "{installed_path}/pattern-categories.csv"
+
+# Output configuration
+default_output_file: "{output_folder}/game-architecture.md"
+
+# Workflow metadata
+version: "1.3.2"
+replaces: "architecture"
+paradigm: "facilitation-driven"
+execution_time: "30-90 minutes depending on user skill level"
+features:
+ - "Starter template discovery and integration"
+ - "Dynamic version verification via web search"
+ - "Adaptive facilitation by skill level"
+ - "Decision-focused architecture"
+ - "Novel pattern design for unique concepts"
+ - "Intelligent pattern identification - LLM figures out what patterns matter"
+ - "Implementation patterns for agent consistency"
+
+standalone: true
diff --git a/src/modules/bmgd/workflows/4-production/code-review/backlog_template.md b/src/modules/bmgd/workflows/4-production/code-review/backlog_template.md
new file mode 100644
index 00000000..28cfe767
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/code-review/backlog_template.md
@@ -0,0 +1,12 @@
+# Engineering Backlog
+
+This backlog collects cross-cutting or future action items that emerge from reviews and planning.
+
+Routing guidance:
+
+- Use this file for non-urgent optimizations, refactors, or follow-ups that span multiple stories/epics.
+- Must-fix items to ship a story belong in that story’s `Tasks / Subtasks`.
+- Same-epic improvements may also be captured under the epic Tech Spec `Post-Review Follow-ups` section.
+
+| Date | Story | Epic | Type | Severity | Owner | Status | Notes |
+| ---- | ----- | ---- | ---- | -------- | ----- | ------ | ----- |
diff --git a/src/modules/bmgd/workflows/4-production/code-review/checklist.md b/src/modules/bmgd/workflows/4-production/code-review/checklist.md
new file mode 100644
index 00000000..ce903701
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/code-review/checklist.md
@@ -0,0 +1,22 @@
+# Senior Developer Review - Validation Checklist
+
+- [ ] Story file loaded from `{{story_path}}`
+- [ ] Story Status verified as one of: {{allow_status_values}}
+- [ ] Epic and Story IDs resolved ({{epic_num}}.{{story_num}})
+- [ ] Story Context located or warning recorded
+- [ ] Epic Tech Spec located or warning recorded
+- [ ] Architecture/standards docs loaded (as available)
+- [ ] Tech stack detected and documented
+- [ ] MCP doc search performed (or web fallback) and references captured
+- [ ] Acceptance Criteria cross-checked against implementation
+- [ ] File List reviewed and validated for completeness
+- [ ] Tests identified and mapped to ACs; gaps noted
+- [ ] Code quality review performed on changed files
+- [ ] Security review performed on changed files and dependencies
+- [ ] Outcome decided (Approve/Changes Requested/Blocked)
+- [ ] Review notes appended under "Senior Developer Review (AI)"
+- [ ] Change Log updated with review entry
+- [ ] Status updated according to settings (if enabled)
+- [ ] Story saved successfully
+
+_Reviewer: {{user_name}} on {{date}}_
diff --git a/src/modules/bmgd/workflows/4-production/code-review/instructions.md b/src/modules/bmgd/workflows/4-production/code-review/instructions.md
new file mode 100644
index 00000000..e277df46
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/code-review/instructions.md
@@ -0,0 +1,420 @@
+# Senior Developer Review - Workflow Instructions
+
+````xml
+The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml
+You MUST have already loaded and processed: {installed_path}/workflow.yaml
+Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
+Generate all documents in {document_output_language}
+This workflow performs a SYSTEMATIC Senior Developer Review on a story with status "review", validates EVERY acceptance criterion and EVERY completed task, appends structured review notes with evidence, and updates the story status based on outcome.
+If story_path is provided, use it. Otherwise, find the first story in sprint-status.yaml with status "review". If none found, offer ad-hoc review option.
+Ad-hoc review mode: User can specify any files to review and what to review for (quality, security, requirements, etc.). Creates standalone review report.
+SYSTEMATIC VALIDATION REQUIREMENT: For EVERY acceptance criterion, verify implementation with evidence (file:line). For EVERY task marked complete, verify it was actually done. Tasks marked complete but not done = HIGH SEVERITY finding.
+⚠️ ZERO TOLERANCE FOR LAZY VALIDATION ⚠️
+If you FAIL to catch even ONE task marked complete that was NOT actually implemented, or ONE acceptance criterion marked done that is NOT in the code with evidence, you have FAILED YOUR ONLY PURPOSE. This is an IMMEDIATE DISQUALIFICATION. No shortcuts. No assumptions. No "looks good enough." You WILL read every file. You WILL verify every claim. You WILL provide evidence (file:line) for EVERY validation. Failure to catch false completions = you failed humanity and the project. Your job is to be the uncompromising gatekeeper. DO YOUR JOB COMPLETELY OR YOU WILL BE REPLACED.
+Only modify the story file in these areas: Status, Dev Agent Record (Completion Notes), File List (if corrections needed), Change Log, and the appended "Senior Developer Review (AI)" section.
+Execute ALL steps in exact order; do NOT skip steps
+
+DOCUMENT OUTPUT: Technical review reports. Structured findings with severity levels and action items. User skill level ({user_skill_level}) affects conversation style ONLY, not review content.
+
+## 📚 Document Discovery - Selective Epic Loading
+
+**Strategy**: This workflow needs only ONE specific epic and its stories for review context, not all epics. This provides huge efficiency gains when epics are sharded.
+
+**Epic Discovery Process (SELECTIVE OPTIMIZATION):**
+
+1. **Determine which epic** you need (epic_num from story being reviewed - e.g., story "3-2-feature-name" needs Epic 3)
+2. **Check for sharded version**: Look for `epics/index.md`
+3. **If sharded version found**:
+ - Read `index.md` to understand structure
+ - **Load ONLY `epic-{epic_num}.md`** (e.g., `epics/epic-3.md` for Epic 3)
+ - DO NOT load all epic files - only the one needed!
+ - This is the key efficiency optimization for large multi-epic projects
+4. **If whole document found**: Load the complete `epics.md` file and extract the relevant epic
+
+**Other Documents (architecture, ux-design) - Full Load:**
+
+1. **Search for whole document first** - Use fuzzy file matching
+2. **Check for sharded version** - If whole document not found, look for `{doc-name}/index.md`
+3. **If sharded version found**:
+ - Read `index.md` to understand structure
+ - Read ALL section files listed in the index
+ - Treat combined content as single document
+4. **Brownfield projects**: The `document-project` workflow creates `{output_folder}/docs/index.md`
+
+**Priority**: If both whole and sharded versions exist, use the whole document.
+
+**UX-Heavy Projects**: Always check for ux-design documentation as it provides critical context for reviewing UI-focused stories.
+
+
+
+
+
+ Use {{story_path}} directly
+ Read COMPLETE story file and parse sections
+ Extract story_key from filename or story metadata
+ Verify Status is "review" - if not, HALT with message: "Story status must be 'review' to proceed"
+
+
+
+ MUST read COMPLETE sprint-status.yaml file from start to end to preserve order
+ Load the FULL file: {{output_folder}}/sprint-status.yaml
+ Read ALL lines from beginning to end - do not skip any content
+ Parse the development_status section completely
+
+ Find FIRST story (reading in order from top to bottom) where:
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
+ - Status value equals "review"
+
+
+
+
+ Select an option (1/2/3):
+
+
+ What code would you like me to review?
+
+Provide:
+- File path(s) or directory to review
+- What to review for:
+ • General quality and standards
+ • Requirements compliance
+ • Security concerns
+ • Performance issues
+ • Architecture alignment
+ • Something else (specify)
+
+Your input:
+
+ Parse user input to extract:
+ - {{review_files}}: file paths or directories to review
+ - {{review_focus}}: what aspects to focus on
+ - {{review_context}}: any additional context provided
+
+
+ Set ad_hoc_review_mode = true
+ Skip to step 4 with custom scope
+
+
+
+ HALT
+
+
+
+ Use the first story found with status "review"
+ Resolve story file path in {{story_dir}}
+ Read the COMPLETE story file
+
+
+ Extract {{epic_num}} and {{story_num}} from filename (e.g., story-2.3.*.md) and story metadata
+ Parse sections: Status, Story, Acceptance Criteria, Tasks/Subtasks (and completion states), Dev Notes, Dev Agent Record (Context Reference, Completion Notes, File List), Change Log
+ HALT with message: "Unable to read story file"
+
+
+
+ Locate story context file: Under Dev Agent Record → Context Reference, read referenced path(s). If missing, search {{output_folder}} for files matching pattern "story-{{epic_num}}.{{story_num}}*.context.xml" and use the most recent.
+ Continue but record a WARNING in review notes: "No story context file found"
+
+ Locate Epic Tech Spec: Search {{tech_spec_search_dir}} with glob {{tech_spec_glob_template}} (resolve {{epic_num}})
+ Continue but record a WARNING in review notes: "No Tech Spec found for epic {{epic_num}}"
+
+ Load architecture/standards docs: For each file name in {{arch_docs_file_names}} within {{arch_docs_search_dirs}}, read if exists. Collect testing, coding standards, security, and architectural patterns.
+
+
+
+ Detect primary ecosystem(s) by scanning for manifests (e.g., package.json, pyproject.toml, go.mod, Dockerfile). Record key frameworks (e.g., Node/Express, React/Vue, Python/FastAPI, etc.).
+ Synthesize a concise "Best-Practices and References" note capturing any updates or considerations that should influence the review (cite links and versions if available).
+
+
+
+
+ Use {{review_files}} as the file list to review
+ Focus review on {{review_focus}} aspects specified by user
+ Use {{review_context}} for additional guidance
+ Skip acceptance criteria checking (no story context)
+ If architecture docs exist, verify alignment with architectural constraints
+
+
+
+ SYSTEMATIC VALIDATION - Check EVERY AC and EVERY task marked complete
+
+ From the story, read Acceptance Criteria section completely - parse into numbered list
+ From the story, read Tasks/Subtasks section completely - parse ALL tasks and subtasks with their completion state ([x] = completed, [ ] = incomplete)
+ From Dev Agent Record → File List, compile list of changed/added files. If File List is missing or clearly incomplete, search repo for recent changes relevant to the story scope (heuristics: filenames matching components/services/routes/tests inferred from ACs/tasks).
+
+ Step 4A: SYSTEMATIC ACCEPTANCE CRITERIA VALIDATION
+ Create AC validation checklist with one entry per AC
+ For EACH acceptance criterion (AC1, AC2, AC3, etc.):
+ 1. Read the AC requirement completely
+ 2. Search changed files for evidence of implementation
+ 3. Determine: IMPLEMENTED, PARTIAL, or MISSING
+ 4. Record specific evidence (file:line references where AC is satisfied)
+ 5. Check for corresponding tests (unit/integration/E2E as applicable)
+ 6. If PARTIAL or MISSING: Flag as finding with severity based on AC criticality
+ 7. Document in AC validation checklist
+
+ Generate AC Coverage Summary: "X of Y acceptance criteria fully implemented"
+
+ Step 4B: SYSTEMATIC TASK COMPLETION VALIDATION
+ Create task validation checklist with one entry per task/subtask
+ For EACH task/subtask marked as COMPLETED ([x]):
+ 1. Read the task description completely
+ 2. Search changed files for evidence the task was actually done
+ 3. Determine: VERIFIED COMPLETE, QUESTIONABLE, or NOT DONE
+ 4. Record specific evidence (file:line references proving task completion)
+ 5. **CRITICAL**: If marked complete but NOT DONE → Flag as HIGH SEVERITY finding with message: "Task marked complete but implementation not found: [task description]"
+ 6. If QUESTIONABLE → Flag as MEDIUM SEVERITY finding: "Task completion unclear: [task description]"
+ 7. Document in task validation checklist
+
+ For EACH task/subtask marked as INCOMPLETE ([ ]):
+ 1. Note it was not claimed to be complete
+ 2. Check if it was actually done anyway (sometimes devs forget to check boxes)
+ 3. If done but not marked: Note in review (helpful correction, not a finding)
+
+ Generate Task Completion Summary: "X of Y completed tasks verified, Z questionable, W falsely marked complete"
+
+ Step 4C: CROSS-CHECK EPIC TECH-SPEC REQUIREMENTS
+ Cross-check epic tech-spec requirements and architecture constraints against the implementation intent in files.
+ flag as High Severity finding.
+
+ Step 4D: COMPILE VALIDATION FINDINGS
+ Compile all validation findings into structured list:
+ - Missing AC implementations (severity based on AC importance)
+ - Partial AC implementations (MEDIUM severity)
+ - Tasks falsely marked complete (HIGH severity - this is critical)
+ - Questionable task completions (MEDIUM severity)
+ - Missing tests for ACs (severity based on AC criticality)
+ - Architecture violations (HIGH severity)
+
+
+
+
+
+ For each changed file, skim for common issues appropriate to the stack: error handling, input validation, logging, dependency injection, thread-safety/async correctness, resource cleanup, performance anti-patterns.
+ Perform security review: injection risks, authZ/authN handling, secret management, unsafe defaults, un-validated redirects, CORS misconfigured, dependency vulnerabilities (based on manifests).
+ Check tests quality: assertions are meaningful, edge cases covered, deterministic behavior, proper fixtures, no flakiness patterns.
+ Capture concrete, actionable suggestions with severity (High/Med/Low) and rationale. When possible, suggest specific code-level changes (filenames + line ranges) without rewriting large sections.
+
+
+
+ Determine outcome based on validation results:
+ - BLOCKED: Any HIGH severity finding (AC missing, task falsely marked complete, critical architecture violation)
+ - CHANGES REQUESTED: Any MEDIUM severity findings or multiple LOW severity issues
+ - APPROVE: All ACs implemented, all completed tasks verified, no significant issues
+
+
+ Prepare a structured review report with sections:
+ 1. **Summary**: Brief overview of review outcome and key concerns
+ 2. **Outcome**: Approve | Changes Requested | Blocked (with justification)
+ 3. **Key Findings** (by severity):
+ - HIGH severity issues first (especially falsely marked complete tasks)
+ - MEDIUM severity issues
+ - LOW severity issues
+ 4. **Acceptance Criteria Coverage**:
+ - Include complete AC validation checklist from Step 4A
+ - Show: AC# | Description | Status (IMPLEMENTED/PARTIAL/MISSING) | Evidence (file:line)
+ - Summary: "X of Y acceptance criteria fully implemented"
+ - List any missing or partial ACs with severity
+ 5. **Task Completion Validation**:
+ - Include complete task validation checklist from Step 4B
+ - Show: Task | Marked As | Verified As | Evidence (file:line)
+ - **CRITICAL**: Highlight any tasks marked complete but not done in RED/bold
+ - Summary: "X of Y completed tasks verified, Z questionable, W falsely marked complete"
+ 6. **Test Coverage and Gaps**:
+ - Which ACs have tests, which don't
+ - Test quality issues found
+ 7. **Architectural Alignment**:
+ - Tech-spec compliance
+ - Architecture violations if any
+ 8. **Security Notes**: Security findings if any
+ 9. **Best-Practices and References**: With links
+ 10. **Action Items**:
+ - CRITICAL: ALL action items requiring code changes MUST have checkboxes for tracking
+ - Format for actionable items: `- [ ] [Severity] Description (AC #X) [file: path:line]`
+ - Format for informational notes: `- Note: Description (no action required)`
+ - Imperative phrasing for action items
+ - Map to related ACs or files with specific line references
+ - Include suggested owners if clear
+ - Example format:
+ ```
+ ### Action Items
+
+ **Code Changes Required:**
+ - [ ] [High] Add input validation on login endpoint (AC #1) [file: src/routes/auth.js:23-45]
+ - [ ] [Med] Add unit test for invalid email format [file: tests/unit/auth.test.js]
+
+ **Advisory Notes:**
+ - Note: Consider adding rate limiting for production deployment
+ - Note: Document the JWT expiration policy in README
+ ```
+
+
+ The AC validation checklist and task validation checklist MUST be included in the review - this is the evidence trail
+
+
+
+
+ Generate review report as a standalone document
+ Save to {{output_folder}}/code-review-{{date}}.md
+ Include sections:
+ - Review Type: Ad-Hoc Code Review
+ - Reviewer: {{user_name}}
+ - Date: {{date}}
+ - Files Reviewed: {{review_files}}
+ - Review Focus: {{review_focus}}
+ - Outcome: (Approve | Changes Requested | Blocked)
+ - Summary
+ - Key Findings
+ - Test Coverage and Gaps
+ - Architectural Alignment
+ - Security Notes
+ - Best-Practices and References (with links)
+ - Action Items
+
+
+
+
+
+ Open {{story_path}} and append a new section at the end titled exactly: "Senior Developer Review (AI)".
+ Insert subsections:
+ - Reviewer: {{user_name}}
+ - Date: {{date}}
+ - Outcome: (Approve | Changes Requested | Blocked) with justification
+ - Summary
+ - Key Findings (by severity - HIGH/MEDIUM/LOW)
+ - **Acceptance Criteria Coverage**:
+ * Include complete AC validation checklist with table format
+ * AC# | Description | Status | Evidence
+ * Summary: X of Y ACs implemented
+ - **Task Completion Validation**:
+ * Include complete task validation checklist with table format
+ * Task | Marked As | Verified As | Evidence
+ * **Highlight falsely marked complete tasks prominently**
+ * Summary: X of Y tasks verified, Z questionable, W false completions
+ - Test Coverage and Gaps
+ - Architectural Alignment
+ - Security Notes
+ - Best-Practices and References (with links)
+ - Action Items:
+ * CRITICAL: Format with checkboxes for tracking resolution
+ * Code changes required: `- [ ] [Severity] Description [file: path:line]`
+ * Advisory notes: `- Note: Description (no action required)`
+ * Group by type: "Code Changes Required" and "Advisory Notes"
+
+ Add a Change Log entry with date, version bump if applicable, and description: "Senior Developer Review notes appended".
+ If {{update_status_on_result}} is true: update Status to {{status_on_approve}} when approved; to {{status_on_changes_requested}} when changes requested; otherwise leave unchanged.
+ Save the story file.
+
+ MUST include the complete validation checklists - this is the evidence that systematic review was performed
+
+
+
+
+
+ Skip sprint status update (no story context)
+
+
+
+
+ Determine target status based on review outcome:
+ - If {{outcome}} == "Approve" → target_status = "done"
+ - If {{outcome}} == "Changes Requested" → target_status = "in-progress"
+ - If {{outcome}} == "Blocked" → target_status = "review" (stay in review)
+
+
+ Load the FULL file: {{output_folder}}/sprint-status.yaml
+ Read all development_status entries to find {{story_key}}
+ Verify current status is "review" (expected previous state)
+ Update development_status[{{story_key}}] = {{target_status}}
+ Save file, preserving ALL comments and structure including STATUS DEFINITIONS
+
+
+
+
+
+
+
+
+
+
+
+
+
+ All action items are included in the standalone review report
+ Would you like me to create tracking items for these action items? (backlog/tasks)
+
+ If {{backlog_file}} does not exist, copy {installed_path}/backlog_template.md to {{backlog_file}} location.
+ Append a row per action item with Date={{date}}, Story="Ad-Hoc Review", Epic="N/A", Type, Severity, Owner (or "TBD"), Status="Open", Notes with file refs and context.
+
+
+
+
+ Normalize Action Items into a structured list: description, severity (High/Med/Low), type (Bug/TechDebt/Enhancement), suggested owner (if known), related AC/file references.
+ Add {{action_item_count}} follow-up items to story Tasks/Subtasks?
+
+ Append under the story's "Tasks / Subtasks" a new subsection titled "Review Follow-ups (AI)", adding each item as an unchecked checkbox in imperative form, prefixed with "[AI-Review]" and severity. Example: "- [ ] [AI-Review][High] Add input validation on server route /api/x (AC #2)".
+
+
+ If {{backlog_file}} does not exist, copy {installed_path}/backlog_template.md to {{backlog_file}} location.
+ Append a row per action item with Date={{date}}, Story={{epic_num}}.{{story_num}}, Epic={{epic_num}}, Type, Severity, Owner (or "TBD"), Status="Open", Notes with short context and file refs.
+
+
+ If an epic Tech Spec was found: open it and create (if missing) a section titled "{{epic_followups_section_title}}". Append a bullet list of action items scoped to this epic with references back to Story {{epic_num}}.{{story_num}}.
+
+ Save modified files.
+ Optionally invoke tests or linters to verify quick fixes if any were applied as part of review (requires user approval for any dependency changes).
+
+
+
+
+ Run validation checklist at {installed_path}/checklist.md using {project-root}/bmad/core/tasks/validate-workflow.xml
+ Report workflow completion.
+
+
+
+
+
+
+
+
+
+
+
+````
diff --git a/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml b/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml
new file mode 100644
index 00000000..75644b44
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml
@@ -0,0 +1,76 @@
+# Review Story Workflow
+name: code-review
+description: "Perform a Senior Developer code review on a completed story flagged Ready for Review, leveraging story-context, epic tech-spec, repo docs, MCP servers for latest best-practices, and web search as fallback. Appends structured review notes to the story."
+author: "BMad"
+
+# Critical variables from config
+config_source: "{project-root}/bmad/bmgd/config.yaml"
+output_folder: "{config_source}:output_folder"
+user_name: "{config_source}:user_name"
+communication_language: "{config_source}:communication_language"
+user_skill_level: "{config_source}:user_skill_level"
+document_output_language: "{config_source}:document_output_language"
+date: system-generated
+
+# Workflow components
+installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/code-review"
+instructions: "{installed_path}/instructions.md"
+validation: "{installed_path}/checklist.md"
+
+# This is an action workflow (no output template document)
+template: false
+
+# Variables (can be provided by caller)
+variables:
+ story_path: "" # Optional: Explicit path to story file. If not provided, finds first story with status "review"
+ story_dir: "{config_source}:dev_story_location" # Directory containing story files
+ tech_spec_search_dir: "{project-root}/docs"
+ tech_spec_glob_template: "tech-spec-epic-{{epic_num}}*.md"
+ arch_docs_search_dirs: |
+ - "{project-root}/docs"
+ - "{output_folder}"
+ arch_docs_file_names: |
+ - architecture.md
+ enable_mcp_doc_search: true # Prefer enabled MCP servers for doc/best-practice lookup
+ enable_web_fallback: true # Fallback to web search/read-url if MCP not available
+ # Persistence controls for review action items and notes
+ persist_action_items: true
+ # Valid targets: story_tasks, story_review_section, backlog_file, epic_followups
+ persist_targets: |
+ - story_review_section
+ - story_tasks
+ - backlog_file
+ - epic_followups
+ backlog_file: "{project-root}/docs/backlog.md"
+ update_epic_followups: true
+ epic_followups_section_title: "Post-Review Follow-ups"
+
+# Recommended inputs
+recommended_inputs:
+ - story: "Path to the story file (auto-discovered if omitted - finds first story with status 'review')"
+ - tech_spec: "Epic technical specification document (auto-discovered)"
+ - story_context_file: "Story context file (.context.xml) (auto-discovered)"
+
+# Smart input file references - handles both whole docs and sharded docs
+# Priority: Whole document first, then sharded version
+# Strategy: SELECTIVE LOAD - only load the specific epic needed for this story review
+input_file_patterns:
+ architecture:
+ whole: "{output_folder}/*architecture*.md"
+ sharded: "{output_folder}/*architecture*/index.md"
+
+ ux_design:
+ whole: "{output_folder}/*ux*.md"
+ sharded: "{output_folder}/*ux*/index.md"
+
+ epics:
+ whole: "{output_folder}/*epic*.md"
+ sharded_index: "{output_folder}/*epic*/index.md"
+ sharded_single: "{output_folder}/*epic*/epic-{{epic_num}}.md"
+
+ document_project:
+ sharded: "{output_folder}/docs/index.md"
+
+standalone: true
+
+web_bundle: false
diff --git a/src/modules/bmgd/workflows/4-production/correct-course/checklist.md b/src/modules/bmgd/workflows/4-production/correct-course/checklist.md
new file mode 100644
index 00000000..b42b2381
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/correct-course/checklist.md
@@ -0,0 +1,279 @@
+# Change Navigation Checklist
+
+This checklist is executed as part of: {project-root}/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml
+Work through each section systematically with the user, recording findings and impacts
+
+
+
+
+
+
+Identify the triggering story that revealed this issue
+Document story ID and brief description
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Define the core problem precisely
+Categorize issue type:
+ - Technical limitation discovered during implementation
+ - New requirement emerged from stakeholders
+ - Misunderstanding of original requirements
+ - Strategic pivot or market change
+ - Failed approach requiring different solution
+Write clear problem statement
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Assess initial impact and gather supporting evidence
+Collect concrete examples, error messages, stakeholder feedback, or technical constraints
+Document evidence for later reference
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+HALT: "Cannot proceed without understanding what caused the need for change"
+HALT: "Need concrete evidence or examples of the issue before analyzing impact"
+
+
+
+
+
+
+
+Evaluate current epic containing the trigger story
+Can this epic still be completed as originally planned?
+If no, what modifications are needed?
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Determine required epic-level changes
+Check each scenario:
+ - Modify existing epic scope or acceptance criteria
+ - Add new epic to address the issue
+ - Remove or defer epic that's no longer viable
+ - Completely redefine epic based on new understanding
+Document specific epic changes needed
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Review all remaining planned epics for required changes
+Check each future epic for impact
+Identify dependencies that may be affected
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Check if issue invalidates future epics or necessitates new ones
+Does this change make any planned epics obsolete?
+Are new epics needed to address gaps created by this change?
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Consider if epic order or priority should change
+Should epics be resequenced based on this issue?
+Do priorities need adjustment?
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+
+
+
+
+Check PRD for conflicts
+Does issue conflict with core PRD goals or objectives?
+Do requirements need modification, addition, or removal?
+Is the defined MVP still achievable or does scope need adjustment?
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Review Architecture document for conflicts
+Check each area for impact:
+ - System components and their interactions
+ - Architectural patterns and design decisions
+ - Technology stack choices
+ - Data models and schemas
+ - API designs and contracts
+ - Integration points
+Document specific architecture sections requiring updates
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Examine UI/UX specifications for conflicts
+Check for impact on:
+ - User interface components
+ - User flows and journeys
+ - Wireframes or mockups
+ - Interaction patterns
+ - Accessibility considerations
+Note specific UI/UX sections needing revision
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Consider impact on other artifacts
+Review additional artifacts for impact:
+ - Deployment scripts
+ - Infrastructure as Code (IaC)
+ - Monitoring and observability setup
+ - Testing strategies
+ - Documentation
+ - CI/CD pipelines
+Document any secondary artifacts requiring updates
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+
+
+
+
+Evaluate Option 1: Direct Adjustment
+Can the issue be addressed by modifying existing stories?
+Can new stories be added within the current epic structure?
+Would this approach maintain project timeline and scope?
+Effort estimate: [High/Medium/Low]
+Risk level: [High/Medium/Low]
+[ ] Viable / [ ] Not viable
+
+
+
+Evaluate Option 2: Potential Rollback
+Would reverting recently completed stories simplify addressing this issue?
+Which stories would need to be rolled back?
+Is the rollback effort justified by the simplification gained?
+Effort estimate: [High/Medium/Low]
+Risk level: [High/Medium/Low]
+[ ] Viable / [ ] Not viable
+
+
+
+Evaluate Option 3: PRD MVP Review
+Is the original PRD MVP still achievable with this issue?
+Does MVP scope need to be reduced or redefined?
+Do core goals need modification based on new constraints?
+What would be deferred to post-MVP if scope is reduced?
+Effort estimate: [High/Medium/Low]
+Risk level: [High/Medium/Low]
+[ ] Viable / [ ] Not viable
+
+
+
+Select recommended path forward
+Based on analysis of all options, choose the best path
+Provide clear rationale considering:
+ - Implementation effort and timeline impact
+ - Technical risk and complexity
+ - Impact on team morale and momentum
+ - Long-term sustainability and maintainability
+ - Stakeholder expectations and business value
+Selected approach: [Option 1 / Option 2 / Option 3 / Hybrid]
+Justification: [Document reasoning]
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+
+
+
+
+Create identified issue summary
+Write clear, concise problem statement
+Include context about discovery and impact
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Document epic impact and artifact adjustment needs
+Summarize findings from Epic Impact Assessment (Section 2)
+Summarize findings from Artifact Conflict Analysis (Section 3)
+Be specific about what changes are needed and why
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Present recommended path forward with rationale
+Include selected approach from Section 4
+Provide complete justification for recommendation
+Address trade-offs and alternatives considered
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Define PRD MVP impact and high-level action plan
+State clearly if MVP is affected
+Outline major action items needed for implementation
+Identify dependencies and sequencing
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Establish agent handoff plan
+Identify which roles/agents will execute the changes:
+ - Development team (for implementation)
+ - Product Owner / Scrum Master (for backlog changes)
+ - Product Manager / Architect (for strategic changes)
+Define responsibilities for each role
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+
+
+
+
+Review checklist completion
+Verify all applicable sections have been addressed
+Confirm all [Action-needed] items have been documented
+Ensure analysis is comprehensive and actionable
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Verify Sprint Change Proposal accuracy
+Review complete proposal for consistency and clarity
+Ensure all recommendations are well-supported by analysis
+Check that proposal is actionable and specific
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Obtain explicit user approval
+Present complete proposal to user
+Get clear yes/no approval for proceeding
+Document approval and any conditions
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+Confirm next steps and handoff plan
+Review handoff responsibilities with user
+Ensure all stakeholders understand their roles
+Confirm timeline and success criteria
+[ ] Done / [ ] N/A / [ ] Action-needed
+
+
+
+HALT: "Cannot proceed to proposal without complete impact analysis"
+HALT: "Must have explicit approval before implementing changes"
+HALT: "Must clearly define who will execute the proposed changes"
+
+
+
+
+
+
+
+This checklist is for SIGNIFICANT changes affecting project direction
+Work interactively with user - they make final decisions
+Be factual, not blame-oriented when analyzing issues
+Handle changes professionally as opportunities to improve the project
+Maintain conversation context throughout - this is collaborative work
+
diff --git a/src/modules/bmgd/workflows/4-production/correct-course/instructions.md b/src/modules/bmgd/workflows/4-production/correct-course/instructions.md
new file mode 100644
index 00000000..8c5f964c
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/correct-course/instructions.md
@@ -0,0 +1,201 @@
+# Correct Course - Sprint Change Management Instructions
+
+The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml
+You MUST have already loaded and processed: {project-root}/bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml
+Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
+Generate all documents in {document_output_language}
+
+DOCUMENT OUTPUT: Updated epics, stories, or PRD sections. Clear, actionable changes. User skill level ({user_skill_level}) affects conversation style ONLY, not document updates.
+
+
+
+
+ Confirm change trigger and gather user description of the issue
+ Ask: "What specific issue or change has been identified that requires navigation?"
+ Verify access to required project documents:
+ - PRD (Product Requirements Document)
+ - Current Epics and Stories
+ - Architecture documentation
+ - UI/UX specifications
+ Ask user for mode preference:
+ - **Incremental** (recommended): Refine each edit collaboratively
+ - **Batch**: Present all changes at once for review
+ Store mode selection for use throughout workflow
+
+HALT: "Cannot navigate change without clear understanding of the triggering issue. Please provide specific details about what needs to change and why."
+
+HALT: "Need access to project documents (PRD, Epics, Architecture, UI/UX) to assess change impact. Please ensure these documents are accessible."
+
+
+
+ Load and execute the systematic analysis from: {checklist}
+ Work through each checklist section interactively with the user
+ Record status for each checklist item:
+ - [x] Done - Item completed successfully
+ - [N/A] Skip - Item not applicable to this change
+ - [!] Action-needed - Item requires attention or follow-up
+ Maintain running notes of findings and impacts discovered
+ Present checklist progress after each major section
+
+Identify blocking issues and work with user to resolve before continuing
+
+
+
+Based on checklist findings, create explicit edit proposals for each identified artifact
+
+For Story changes:
+
+- Show old → new text format
+- Include story ID and section being modified
+- Provide rationale for each change
+- Example format:
+
+ ```
+ Story: [STORY-123] User Authentication
+ Section: Acceptance Criteria
+
+ OLD:
+ - User can log in with email/password
+
+ NEW:
+ - User can log in with email/password
+ - User can enable 2FA via authenticator app
+
+ Rationale: Security requirement identified during implementation
+ ```
+
+For PRD modifications:
+
+- Specify exact sections to update
+- Show current content and proposed changes
+- Explain impact on MVP scope and requirements
+
+For Architecture changes:
+
+- Identify affected components, patterns, or technology choices
+- Describe diagram updates needed
+- Note any ripple effects on other components
+
+For UI/UX specification updates:
+
+- Reference specific screens or components
+- Show wireframe or flow changes needed
+- Connect changes to user experience impact
+
+
+ Present each edit proposal individually
+ Review and refine this change? Options: Approve [a], Edit [e], Skip [s]
+ Iterate on each proposal based on user feedback
+
+
+Collect all edit proposals and present together at end of step
+
+
+
+
+Compile comprehensive Sprint Change Proposal document with following sections:
+
+Section 1: Issue Summary
+
+- Clear problem statement describing what triggered the change
+- Context about when/how the issue was discovered
+- Evidence or examples demonstrating the issue
+
+Section 2: Impact Analysis
+
+- Epic Impact: Which epics are affected and how
+- Story Impact: Current and future stories requiring changes
+- Artifact Conflicts: PRD, Architecture, UI/UX documents needing updates
+- Technical Impact: Code, infrastructure, or deployment implications
+
+Section 3: Recommended Approach
+
+- Present chosen path forward from checklist evaluation:
+ - Direct Adjustment: Modify/add stories within existing plan
+ - Potential Rollback: Revert completed work to simplify resolution
+ - MVP Review: Reduce scope or modify goals
+- Provide clear rationale for recommendation
+- Include effort estimate, risk assessment, and timeline impact
+
+Section 4: Detailed Change Proposals
+
+- Include all refined edit proposals from Step 3
+- Group by artifact type (Stories, PRD, Architecture, UI/UX)
+- Ensure each change includes before/after and justification
+
+Section 5: Implementation Handoff
+
+- Categorize change scope:
+ - Minor: Direct implementation by dev team
+ - Moderate: Backlog reorganization needed (PO/SM)
+ - Major: Fundamental replan required (PM/Architect)
+- Specify handoff recipients and their responsibilities
+- Define success criteria for implementation
+
+Present complete Sprint Change Proposal to user
+Write Sprint Change Proposal document to {default_output_file}
+Review complete proposal. Continue [c] or Edit [e]?
+
+
+
+Get explicit user approval for complete proposal
+Do you approve this Sprint Change Proposal for implementation? (yes/no/revise)
+
+
+ Gather specific feedback on what needs adjustment
+ Return to appropriate step to address concerns
+ If changes needed to edit proposals
+ If changes needed to overall proposal structure
+
+
+
+
+ Finalize Sprint Change Proposal document
+ Determine change scope classification:
+
+- **Minor**: Can be implemented directly by development team
+- **Moderate**: Requires backlog reorganization and PO/SM coordination
+- **Major**: Needs fundamental replan with PM/Architect involvement
+
+Provide appropriate handoff based on scope:
+
+
+
+
+ Route to: Development team for direct implementation
+ Deliverables: Finalized edit proposals and implementation tasks
+
+
+
+ Route to: Product Owner / Scrum Master agents
+ Deliverables: Sprint Change Proposal + backlog reorganization plan
+
+
+
+ Route to: Product Manager / Solution Architect
+ Deliverables: Complete Sprint Change Proposal + escalation notice
+
+Confirm handoff completion and next steps with user
+Document handoff in workflow execution log
+
+
+
+
+
+Summarize workflow execution:
+ - Issue addressed: {{change_trigger}}
+ - Change scope: {{scope_classification}}
+ - Artifacts modified: {{list_of_artifacts}}
+ - Routed to: {{handoff_recipients}}
+
+Confirm all deliverables produced:
+
+- Sprint Change Proposal document
+- Specific edit proposals with before/after
+- Implementation handoff plan
+
+Report workflow completion to user with personalized message: "✅ Correct Course workflow complete, {user_name}!"
+Remind user of success criteria and next steps for implementation team
+
+
+
diff --git a/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml b/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml
new file mode 100644
index 00000000..69b4e541
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml
@@ -0,0 +1,45 @@
+# Correct Course - Sprint Change Management Workflow
+name: "correct-course"
+description: "Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation"
+author: "BMad Method"
+
+config_source: "{project-root}/bmad/bmgd/config.yaml"
+output_folder: "{config_source}:output_folder"
+user_name: "{config_source}:user_name"
+communication_language: "{config_source}:communication_language"
+user_skill_level: "{config_source}:user_skill_level"
+document_output_language: "{config_source}:document_output_language"
+date: system-generated
+
+installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/correct-course"
+template: false
+instructions: "{installed_path}/instructions.md"
+validation: "{installed_path}/checklist.md"
+checklist: "{installed_path}/checklist.md"
+default_output_file: "{output_folder}/sprint-change-proposal-{date}.md"
+
+# Workflow execution mode (interactive: step-by-step with user, non-interactive: automated)
+mode: interactive
+
+required_inputs:
+ - change_trigger: "Description of the issue or change that triggered this workflow"
+ - project_documents: "Access to PRD, Epics/Stories, Architecture, UI/UX specs"
+
+output_artifacts:
+ - sprint_change_proposal: "Comprehensive proposal documenting issue, impact, and recommended changes"
+ - artifact_edits: "Specific before/after edits for affected documents"
+ - handoff_plan: "Clear routing for implementation based on change scope"
+
+halt_conditions:
+ - "Change trigger unclear or undefined"
+ - "Core project documents unavailable"
+ - "Impact analysis incomplete"
+ - "User approval not obtained"
+
+execution_modes:
+ - incremental: "Recommended - Refine each edit with user collaboration"
+ - batch: "Present all changes at once for review"
+
+standalone: true
+
+web_bundle: false
diff --git a/src/modules/bmgd/workflows/4-production/create-story/checklist.md b/src/modules/bmgd/workflows/4-production/create-story/checklist.md
new file mode 100644
index 00000000..6d9f1460
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/create-story/checklist.md
@@ -0,0 +1,240 @@
+# Create Story Quality Validation Checklist
+
+```xml
+This validation runs in a FRESH CONTEXT by an independent validator agent
+The validator audits story quality and offers to improve if issues are found
+Load only the story file and necessary source documents - do NOT load workflow instructions
+
+
+
+
+**What create-story workflow should have accomplished:**
+
+1. **Previous Story Continuity:** If a previous story exists (status: done/review/in-progress), current story should have "Learnings from Previous Story" subsection in Dev Notes that references: new files created, completion notes, architectural decisions, unresolved review items
+2. **Source Document Coverage:** Story should cite tech spec (if exists), epics, PRD, and relevant architecture docs (architecture.md, testing-strategy.md, coding-standards.md, unified-project-structure.md)
+3. **Requirements Traceability:** ACs sourced from tech spec (preferred) or epics, not invented
+4. **Dev Notes Quality:** Specific guidance with citations, not generic advice
+5. **Task-AC Mapping:** Every AC has tasks, every task references AC, testing subtasks present
+6. **Structure:** Status="drafted", proper story statement, Dev Agent Record sections initialized
+
+
+## Validation Steps
+
+### 1. Load Story and Extract Metadata
+- [ ] Load story file: {{story_file_path}}
+- [ ] Parse sections: Status, Story, ACs, Tasks, Dev Notes, Dev Agent Record, Change Log
+- [ ] Extract: epic_num, story_num, story_key, story_title
+- [ ] Initialize issue tracker (Critical/Major/Minor)
+
+### 2. Previous Story Continuity Check
+
+**Find previous story:**
+- [ ] Load {output_folder}/sprint-status.yaml
+- [ ] Find current {{story_key}} in development_status
+- [ ] Identify story entry immediately above (previous story)
+- [ ] Check previous story status
+
+**If previous story status is done/review/in-progress:**
+- [ ] Load previous story file: {story_dir}/{{previous_story_key}}.md
+- [ ] Extract: Dev Agent Record (Completion Notes, File List with NEW/MODIFIED)
+- [ ] Extract: Senior Developer Review section if present
+- [ ] Count unchecked [ ] items in Review Action Items
+- [ ] Count unchecked [ ] items in Review Follow-ups (AI)
+
+**Validate current story captured continuity:**
+- [ ] Check: "Learnings from Previous Story" subsection exists in Dev Notes
+ - If MISSING and previous story has content → **CRITICAL ISSUE**
+- [ ] If subsection exists, verify it includes:
+ - [ ] References to NEW files from previous story → If missing → **MAJOR ISSUE**
+ - [ ] Mentions completion notes/warnings → If missing → **MAJOR ISSUE**
+ - [ ] Calls out unresolved review items (if any exist) → If missing → **CRITICAL ISSUE**
+ - [ ] Cites previous story: [Source: stories/{{previous_story_key}}.md]
+
+**If previous story status is backlog/drafted:**
+- [ ] No continuity expected (note this)
+
+**If no previous story exists:**
+- [ ] First story in epic, no continuity expected
+
+### 3. Source Document Coverage Check
+
+**Build available docs list:**
+- [ ] Check exists: tech-spec-epic-{{epic_num}}*.md in {tech_spec_search_dir}
+- [ ] Check exists: {output_folder}/epics.md
+- [ ] Check exists: {output_folder}/PRD.md
+- [ ] Check exists in {output_folder}/ or {project-root}/docs/:
+ - architecture.md, testing-strategy.md, coding-standards.md
+ - unified-project-structure.md, tech-stack.md
+ - backend-architecture.md, frontend-architecture.md, data-models.md
+
+**Validate story references available docs:**
+- [ ] Extract all [Source: ...] citations from story Dev Notes
+- [ ] Tech spec exists but not cited → **CRITICAL ISSUE**
+- [ ] Epics exists but not cited → **CRITICAL ISSUE**
+- [ ] Architecture.md exists → Read for relevance → If relevant but not cited → **MAJOR ISSUE**
+- [ ] Testing-strategy.md exists → Check Dev Notes mentions testing standards → If not → **MAJOR ISSUE**
+- [ ] Testing-strategy.md exists → Check Tasks have testing subtasks → If not → **MAJOR ISSUE**
+- [ ] Coding-standards.md exists → Check Dev Notes references standards → If not → **MAJOR ISSUE**
+- [ ] Unified-project-structure.md exists → Check Dev Notes has "Project Structure Notes" subsection → If not → **MAJOR ISSUE**
+
+**Validate citation quality:**
+- [ ] Verify cited file paths are correct and files exist → Bad citations → **MAJOR ISSUE**
+- [ ] Check citations include section names, not just file paths → Vague citations → **MINOR ISSUE**
+
+### 4. Acceptance Criteria Quality Check
+
+- [ ] Extract Acceptance Criteria from story
+- [ ] Count ACs: {{ac_count}} (if 0 → **CRITICAL ISSUE** and halt)
+- [ ] Check story indicates AC source (tech spec, epics, PRD)
+
+**If tech spec exists:**
+- [ ] Load tech spec
+- [ ] Search for this story number
+- [ ] Extract tech spec ACs for this story
+- [ ] Compare story ACs vs tech spec ACs → If mismatch → **MAJOR ISSUE**
+
+**If no tech spec but epics.md exists:**
+- [ ] Load epics.md
+- [ ] Search for Epic {{epic_num}}, Story {{story_num}}
+- [ ] Story not found in epics → **CRITICAL ISSUE** (should have halted)
+- [ ] Extract epics ACs
+- [ ] Compare story ACs vs epics ACs → If mismatch without justification → **MAJOR ISSUE**
+
+**Validate AC quality:**
+- [ ] Each AC is testable (measurable outcome)
+- [ ] Each AC is specific (not vague)
+- [ ] Each AC is atomic (single concern)
+- [ ] Vague ACs found → **MINOR ISSUE**
+
+### 5. Task-AC Mapping Check
+
+- [ ] Extract Tasks/Subtasks from story
+- [ ] For each AC: Search tasks for "(AC: #{{ac_num}})" reference
+ - [ ] AC has no tasks → **MAJOR ISSUE**
+- [ ] For each task: Check if references an AC number
+ - [ ] Tasks without AC refs (and not testing/setup) → **MINOR ISSUE**
+- [ ] Count tasks with testing subtasks
+ - [ ] Testing subtasks < ac_count → **MAJOR ISSUE**
+
+### 6. Dev Notes Quality Check
+
+**Check required subsections exist:**
+- [ ] Architecture patterns and constraints
+- [ ] References (with citations)
+- [ ] Project Structure Notes (if unified-project-structure.md exists)
+- [ ] Learnings from Previous Story (if previous story has content)
+- [ ] Missing required subsections → **MAJOR ISSUE**
+
+**Validate content quality:**
+- [ ] Architecture guidance is specific (not generic "follow architecture docs") → If generic → **MAJOR ISSUE**
+- [ ] Count citations in References subsection
+ - [ ] No citations → **MAJOR ISSUE**
+ - [ ] < 3 citations and multiple arch docs exist → **MINOR ISSUE**
+- [ ] Scan for suspicious specifics without citations:
+ - API endpoints, schema details, business rules, tech choices
+ - [ ] Likely invented details found → **MAJOR ISSUE**
+
+### 7. Story Structure Check
+
+- [ ] Status = "drafted" → If not → **MAJOR ISSUE**
+- [ ] Story section has "As a / I want / so that" format → If malformed → **MAJOR ISSUE**
+- [ ] Dev Agent Record has required sections:
+ - Context Reference, Agent Model Used, Debug Log References, Completion Notes List, File List
+ - [ ] Missing sections → **MAJOR ISSUE**
+- [ ] Change Log initialized → If missing → **MINOR ISSUE**
+- [ ] File in correct location: {story_dir}/{{story_key}}.md → If not → **MAJOR ISSUE**
+
+### 8. Unresolved Review Items Alert
+
+**CRITICAL CHECK for incomplete review items from previous story:**
+
+- [ ] If previous story has "Senior Developer Review (AI)" section:
+ - [ ] Count unchecked [ ] items in "Action Items"
+ - [ ] Count unchecked [ ] items in "Review Follow-ups (AI)"
+ - [ ] If unchecked items > 0:
+ - [ ] Check current story "Learnings from Previous Story" mentions these
+ - [ ] If NOT mentioned → **CRITICAL ISSUE** with details:
+ - List all unchecked items with severity
+ - Note: "These may represent epic-wide concerns"
+ - Required: Add to Learnings section with note about pending items
+
+## Validation Report Generation
+
+**Calculate severity counts:**
+- Critical: {{critical_count}}
+- Major: {{major_count}}
+- Minor: {{minor_count}}
+
+**Determine outcome:**
+- Critical > 0 OR Major > 3 → **FAIL**
+- Major ≤ 3 and Critical = 0 → **PASS with issues**
+- All = 0 → **PASS**
+
+**Generate report:**
+```
+
+# Story Quality Validation Report
+
+Story: {{story_key}} - {{story_title}}
+Outcome: {{outcome}} (Critical: {{critical_count}}, Major: {{major_count}}, Minor: {{minor_count}})
+
+## Critical Issues (Blockers)
+
+{{list_each_with_description_and_evidence}}
+
+## Major Issues (Should Fix)
+
+{{list_each_with_description_and_evidence}}
+
+## Minor Issues (Nice to Have)
+
+{{list_each_with_description}}
+
+## Successes
+
+{{list_what_was_done_well}}
+
+```
+
+## User Alert and Remediation
+
+**If FAIL:**
+- Show issues summary and top 3 issues
+- Offer options: (1) Auto-improve story, (2) Show detailed findings, (3) Fix manually, (4) Accept as-is
+- If option 1: Re-load source docs, regenerate affected sections, re-run validation
+
+**If PASS with issues:**
+- Show issues list
+- Ask: "Improve story? (y/n)"
+- If yes: Enhance story with missing items
+
+**If PASS:**
+- Confirm: All quality standards met
+- List successes
+- Ready for story-context generation
+
+
+```
+
+## Quick Reference
+
+**Validation runs in fresh context and checks:**
+
+1. ✅ Previous story continuity captured (files, notes, **unresolved review items**)
+2. ✅ All relevant source docs discovered and cited
+3. ✅ ACs match tech spec/epics exactly
+4. ✅ Tasks cover all ACs with testing
+5. ✅ Dev Notes have specific guidance with citations (not generic)
+6. ✅ Structure and metadata complete
+
+**Severity Levels:**
+
+- **CRITICAL** = Missing previous story reference, missing tech spec cite, unresolved review items not called out, story not in epics
+- **MAJOR** = Missing arch docs, missing files from previous story, vague Dev Notes, ACs don't match source, no testing subtasks
+- **MINOR** = Vague citations, orphan tasks, missing Change Log
+
+**Outcome Triggers:**
+
+- **FAIL** = Any critical OR >3 major issues
+- **PASS with issues** = ≤3 major issues, no critical
+- **PASS** = All checks passed
diff --git a/src/modules/bmgd/workflows/4-production/create-story/instructions.md b/src/modules/bmgd/workflows/4-production/create-story/instructions.md
new file mode 100644
index 00000000..e5b8182a
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/create-story/instructions.md
@@ -0,0 +1,283 @@
+# Create Story - Workflow Instructions (Spec-compliant, non-interactive by default)
+
+````xml
+The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml
+You MUST have already loaded and processed: {installed_path}/workflow.yaml
+Generate all documents in {document_output_language}
+This workflow creates or updates the next user story from epics/PRD and architecture context, saving to the configured stories directory and optionally invoking Story Context.
+DOCUMENT OUTPUT: Concise, technical, actionable story specifications. Use tables/lists for acceptance criteria and tasks.
+
+## 📚 Document Discovery - Selective Epic Loading
+
+**Strategy**: This workflow needs only ONE specific epic and its stories, not all epics. This provides huge efficiency gains when epics are sharded.
+
+**Epic Discovery Process (SELECTIVE OPTIMIZATION):**
+
+1. **Determine which epic** you need (epic_num from story context - e.g., story "3-2-feature-name" needs Epic 3)
+2. **Check for sharded version**: Look for `epics/index.md`
+3. **If sharded version found**:
+ - Read `index.md` to understand structure
+ - **Load ONLY `epic-{epic_num}.md`** (e.g., `epics/epic-3.md` for Epic 3)
+ - DO NOT load all epic files - only the one needed!
+ - This is the key efficiency optimization for large multi-epic projects
+4. **If whole document found**: Load the complete `epics.md` file and extract the relevant epic
+
+**Other Documents (prd, architecture, ux-design) - Full Load:**
+
+1. **Search for whole document first** - Use fuzzy file matching
+2. **Check for sharded version** - If whole document not found, look for `{doc-name}/index.md`
+3. **If sharded version found**:
+ - Read `index.md` to understand structure
+ - Read ALL section files listed in the index
+ - Treat combined content as single document
+4. **Brownfield projects**: The `document-project` workflow creates `{output_folder}/docs/index.md`
+
+**Priority**: If both whole and sharded versions exist, use the whole document.
+
+**UX-Heavy Projects**: Always check for ux-design documentation as it provides critical context for UI-focused stories.
+
+
+
+
+ Resolve variables from config_source: story_dir (dev_story_location), output_folder, user_name, communication_language. If story_dir missing and {{non_interactive}} == false → ASK user to provide a stories directory and update variable. If {{non_interactive}} == true and missing, HALT with a clear message.
+ Create {{story_dir}} if it does not exist
+ Resolve installed component paths from workflow.yaml: template, instructions, validation
+ Resolve recommended inputs if present: epics_file, prd_file, architecture_file
+
+
+
+ PREVIOUS STORY CONTINUITY: Essential for maintaining context and learning from prior development
+
+ Find the previous completed story to extract dev agent learnings and review findings:
+ 1. Load {{output_folder}}/sprint-status.yaml COMPLETELY
+ 2. Find current {{story_key}} in development_status section
+ 3. Identify the story entry IMMEDIATELY ABOVE current story (previous row in file order)
+ 4. If previous story exists:
+ - Extract {{previous_story_key}}
+ - Check previous story status (done, in-progress, review, etc.)
+ - If status is "done", "review", or "in-progress" (has some completion):
+ * Construct path: {{story_dir}}/{{previous_story_key}}.md
+ * Load the COMPLETE previous story file
+ * Parse ALL sections comprehensively:
+
+ A) Dev Agent Record → Completion Notes List:
+ - New patterns/services created (to reuse, not recreate)
+ - Architectural deviations or decisions made
+ - Technical debt deferred to future stories
+ - Warnings or recommendations for next story
+ - Interfaces/methods created for reuse
+
+ B) Dev Agent Record → Debug Log References:
+ - Issues encountered and solutions
+ - Gotchas or unexpected challenges
+ - Workarounds applied
+
+ C) Dev Agent Record → File List:
+ - Files created (NEW) - understand new capabilities
+ - Files modified (MODIFIED) - track evolving components
+ - Files deleted (DELETED) - removed functionality
+
+ D) Dev Notes:
+ - Any "future story" notes or TODOs
+ - Patterns established
+ - Constraints discovered
+
+ E) Senior Developer Review (AI) section (if present):
+ - Review outcome (Approve/Changes Requested/Blocked)
+ - Unresolved action items (unchecked [ ] items)
+ - Key findings that might affect this story
+ - Architectural concerns raised
+
+ F) Senior Developer Review → Action Items (if present):
+ - Check for unchecked [ ] items still pending
+ - Note any systemic issues that apply to multiple stories
+
+ G) Review Follow-ups (AI) tasks (if present):
+ - Check for unchecked [ ] review tasks still pending
+ - Determine if they're epic-wide concerns
+
+ H) Story Status:
+ - If "review" or "in-progress" - incomplete, note what's pending
+ - If "done" - confirmed complete
+ * Store ALL findings as {{previous_story_learnings}} with structure:
+ - new_files: [list]
+ - modified_files: [list]
+ - new_services: [list with descriptions]
+ - architectural_decisions: [list]
+ - technical_debt: [list]
+ - warnings_for_next: [list]
+ - review_findings: [list if review exists]
+ - pending_items: [list of unchecked action items]
+ - If status is "backlog" or "drafted":
+ * Set {{previous_story_learnings}} = "Previous story not yet implemented"
+ 5. If no previous story exists (first story in epic):
+ - Set {{previous_story_learnings}} = "First story in epic - no predecessor context"
+
+
+ If {{tech_spec_file}} empty: derive from {{tech_spec_glob_template}} with {{epic_num}} and search {{tech_spec_search_dir}} recursively. If multiple, pick most recent by modified time.
+ Build a prioritized document set for this epic:
+ 1) tech_spec_file (epic-scoped)
+ 2) epics_file (acceptance criteria and breakdown)
+ 3) prd_file (business requirements and constraints)
+ 4) architecture_file (architecture constraints)
+ 5) Architecture docs under docs/ and output_folder/: tech-stack.md, unified-project-structure.md, coding-standards.md, testing-strategy.md, backend-architecture.md, frontend-architecture.md, data-models.md, database-schema.md, rest-api-spec.md, external-apis.md (include if present)
+
+ READ COMPLETE FILES for all items found in the prioritized set. Store content and paths for citation.
+
+
+
+ MUST read COMPLETE sprint-status.yaml file from start to end to preserve order
+ Load the FULL file: {{output_folder}}/sprint-status.yaml
+ Read ALL lines from beginning to end - do not skip any content
+ Parse the development_status section completely to understand story order
+
+ Find the FIRST story (by reading in order from top to bottom) where:
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
+ - Status value equals "backlog"
+
+
+
+
+ HALT
+
+
+ Extract from found story key (e.g., "1-2-user-authentication"):
+ - epic_num: first number before dash (e.g., "1")
+ - story_num: second number after first dash (e.g., "2")
+ - story_title: remainder after second dash (e.g., "user-authentication")
+
+ Set {{story_id}} = "{{epic_num}}.{{story_num}}"
+ Store story_key for later use (e.g., "1-2-user-authentication")
+
+ Verify story is enumerated in {{epics_file}}. If not found, HALT with message:
+ "Story {{story_key}} not found in epics.md. Please load PM agent and run correct-course to sync epics, then rerun create-story."
+
+ Check if story file already exists at expected path in {{story_dir}}
+
+
+ Set update_mode = true
+
+
+
+
+ From tech_spec_file (preferred) or epics_file: extract epic {{epic_num}} title/summary, acceptance criteria for the next story, and any component references. If not present, fall back to PRD sections mapping to this epic/story.
+ From architecture and architecture docs: extract constraints, patterns, component boundaries, and testing guidance relevant to the extracted ACs. ONLY capture information that directly informs implementation of this story.
+ Derive a clear user story statement (role, action, benefit) grounded strictly in the above sources. If ambiguous and {{non_interactive}} == false → ASK user to clarify. If {{non_interactive}} == true → generate the best grounded statement WITHOUT inventing domain facts.
+ requirements_context_summary
+
+
+
+ Review {{previous_story_learnings}} and extract actionable intelligence:
+ - New patterns/services created → Note for reuse (DO NOT recreate)
+ - Architectural deviations → Understand and maintain consistency
+ - Technical debt items → Assess if this story should address them
+ - Files modified → Understand current state of evolving components
+ - Warnings/recommendations → Apply to this story's approach
+ - Review findings → Learn from issues found in previous story
+ - Pending action items → Determine if epic-wide concerns affect this story
+
+
+ If unified-project-structure.md present: align expected file paths, module names, and component locations; note any potential conflicts.
+
+ Cross-reference {{previous_story_learnings}}.new_files with project structure to understand where new capabilities are located.
+
+ structure_alignment_summary
+
+
+
+ Assemble acceptance criteria list from tech_spec or epics. If gaps exist, derive minimal, testable criteria from PRD verbatim phrasing (NO invention).
+ Create tasks/subtasks directly mapped to ACs. Include explicit testing subtasks per testing-strategy and existing tests framework. Cite architecture/source documents for any technical mandates.
+ acceptance_criteria
+ tasks_subtasks
+
+
+
+ Resolve output path: {default_output_file} using current {{epic_num}} and {{story_num}}. If targeting an existing story for update, use its path.
+ Initialize from template.md if creating a new file; otherwise load existing file for edit.
+ Compute a concise story_title from epic/story context; if missing, synthesize from PRD feature name and epic number.
+ story_header
+ story_body
+ dev_notes_with_citations
+
+ If {{previous_story_learnings}} contains actionable items (not "First story" or "not yet implemented"):
+ - Add "Learnings from Previous Story" subsection to Dev Notes
+ - Include relevant completion notes, new files/patterns, deviations
+ - Cite previous story file as reference [Source: stories/{{previous_story_key}}.md]
+ - Highlight interfaces/services to REUSE (not recreate)
+ - Note any technical debt to address in this story
+ - List pending review items that affect this story (if any)
+ - Reference specific files created: "Use {{file_path}} for {{purpose}}"
+ - Format example:
+ ```
+ ### Learnings from Previous Story
+
+ **From Story {{previous_story_key}} (Status: {{previous_status}})**
+
+ - **New Service Created**: `AuthService` base class available at `src/services/AuthService.js` - use `AuthService.register()` method
+ - **Architectural Change**: Switched from session-based to JWT authentication
+ - **Schema Changes**: User model now includes `passwordHash` field, migration applied
+ - **Technical Debt**: Email verification skipped, should be included in this or subsequent story
+ - **Testing Setup**: Auth test suite initialized at `tests/integration/auth.test.js` - follow patterns established there
+ - **Pending Review Items**: Rate limiting mentioned in review - consider for this story
+
+ [Source: stories/{{previous_story_key}}.md#Dev-Agent-Record]
+ ```
+
+
+ change_log
+
+
+
+ Validate against checklist at {installed_path}/checklist.md using bmad/core/tasks/validate-workflow.xml
+ Save document unconditionally (non-interactive default). In interactive mode, allow user confirmation.
+
+
+ Update {{output_folder}}/sprint-status.yaml
+ Load the FULL file and read all development_status entries
+ Find development_status key matching {{story_key}}
+ Verify current status is "backlog" (expected previous state)
+ Update development_status[{{story_key}}] = "drafted"
+ Save file, preserving ALL comments and structure including STATUS DEFINITIONS
+
+
+
+
+
+ Report created/updated story path
+
+
+
+
+````
diff --git a/src/modules/bmgd/workflows/4-production/create-story/template.md b/src/modules/bmgd/workflows/4-production/create-story/template.md
new file mode 100644
index 00000000..6aa80bad
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/create-story/template.md
@@ -0,0 +1,51 @@
+# Story {{epic_num}}.{{story_num}}: {{story_title}}
+
+Status: drafted
+
+## Story
+
+As a {{role}},
+I want {{action}},
+so that {{benefit}}.
+
+## Acceptance Criteria
+
+1. [Add acceptance criteria from epics/PRD]
+
+## Tasks / Subtasks
+
+- [ ] Task 1 (AC: #)
+ - [ ] Subtask 1.1
+- [ ] Task 2 (AC: #)
+ - [ ] Subtask 2.1
+
+## Dev Notes
+
+- Relevant architecture patterns and constraints
+- Source tree components to touch
+- Testing standards summary
+
+### Project Structure Notes
+
+- Alignment with unified project structure (paths, modules, naming)
+- Detected conflicts or variances (with rationale)
+
+### References
+
+- Cite all technical details with source paths and sections, e.g. [Source: docs/.md#Section]
+
+## Dev Agent Record
+
+### Context Reference
+
+
+
+### Agent Model Used
+
+{{agent_model_name_version}}
+
+### Debug Log References
+
+### Completion Notes List
+
+### File List
diff --git a/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml b/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml
new file mode 100644
index 00000000..179a5173
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml
@@ -0,0 +1,76 @@
+name: create-story
+description: "Create the next user story markdown from epics/PRD and architecture, using a standard template and saving to the stories folder"
+author: "BMad"
+
+# Critical variables from config
+config_source: "{project-root}/bmad/bmgd/config.yaml"
+output_folder: "{config_source}:output_folder"
+user_name: "{config_source}:user_name"
+communication_language: "{config_source}:communication_language"
+date: system-generated
+
+# Workflow components
+installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/create-story"
+template: "{installed_path}/template.md"
+instructions: "{installed_path}/instructions.md"
+validation: "{installed_path}/checklist.md"
+
+# Variables and inputs
+variables:
+ story_dir: "{config_source}:dev_story_location" # Directory where stories are stored
+ epics_file: "{output_folder}/epics.md" # Preferred source for epic/story breakdown
+ prd_file: "{output_folder}/PRD.md" # Fallback for requirements
+ architecture_file: "{output_folder}/architecture.md" # Optional architecture context
+ tech_spec_file: "" # Will be auto-discovered from docs as tech-spec-epic-{{epic_num}}-*.md
+ tech_spec_search_dir: "{project-root}/docs"
+ tech_spec_glob_template: "tech-spec-epic-{{epic_num}}*.md"
+ arch_docs_search_dirs: |
+ - "{project-root}/docs"
+ - "{output_folder}"
+ arch_docs_file_names: |
+ - architecture.md
+ - infrastructure-architecture.md
+ story_title: "" # Will be elicited if not derivable
+ epic_num: 1
+ story_num: 1
+ non_interactive: true # Generate without elicitation; avoid interactive prompts
+
+# Output configuration
+# Uses story_key from sprint-status.yaml (e.g., "1-2-user-authentication")
+default_output_file: "{story_dir}/{{story_key}}.md"
+
+recommended_inputs:
+ - epics: "Epic breakdown (epics.md)"
+ - prd: "PRD document"
+ - architecture: "Architecture (optional)"
+
+# Smart input file references - handles both whole docs and sharded docs
+# Priority: Whole document first, then sharded version
+# Strategy: SELECTIVE LOAD - only load the specific epic needed for this story
+input_file_patterns:
+ prd:
+ whole: "{output_folder}/*prd*.md"
+ sharded: "{output_folder}/*prd*/index.md"
+
+ tech_spec:
+ whole: "{output_folder}/tech-spec.md"
+
+ architecture:
+ whole: "{output_folder}/*architecture*.md"
+ sharded: "{output_folder}/*architecture*/index.md"
+
+ ux_design:
+ whole: "{output_folder}/*ux*.md"
+ sharded: "{output_folder}/*ux*/index.md"
+
+ epics:
+ whole: "{output_folder}/*epic*.md"
+ sharded_index: "{output_folder}/*epic*/index.md"
+ sharded_single: "{output_folder}/*epic*/epic-{{epic_num}}.md"
+
+ document_project:
+ sharded: "{output_folder}/docs/index.md"
+
+standalone: true
+
+web_bundle: false
diff --git a/src/modules/bmgd/workflows/4-production/dev-story/AUDIT-REPORT.md b/src/modules/bmgd/workflows/4-production/dev-story/AUDIT-REPORT.md
new file mode 100644
index 00000000..528e03eb
--- /dev/null
+++ b/src/modules/bmgd/workflows/4-production/dev-story/AUDIT-REPORT.md
@@ -0,0 +1,367 @@
+# Workflow Audit Report
+
+**Workflow:** dev-story
+**Audit Date:** 2025-10-25
+**Auditor:** Audit Workflow (BMAD v6)
+**Workflow Type:** Action Workflow
+**Module:** BMM (BMad Method)
+
+---
+
+## Executive Summary
+
+**Overall Status:** GOOD - Minor issues to address
+
+- Critical Issues: 0
+- Important Issues: 3
+- Cleanup Recommendations: 2
+
+The dev-story workflow is well-structured and follows most BMAD v6 standards. The workflow correctly sets `web_bundle: false` as expected for implementation workflows. However, there are several config variable usage issues and some variables referenced in instructions that are not defined in the YAML.
+
+---
+
+## 1. Standard Config Block Validation
+
+**Status:** PASS ✓
+
+The workflow.yaml contains all required standard config variables:
+
+- ✓ `config_source: "{project-root}/bmad/bmm/config.yaml"` - Correctly defined
+- ✓ `output_folder: "{config_source}:output_folder"` - Pulls from config_source
+- ✓ `user_name: "{config_source}:user_name"` - Pulls from config_source
+- ✓ `communication_language: "{config_source}:communication_language"` - Pulls from config_source
+- ✓ `date: system-generated` - Correctly set
+
+All standard config variables are present and properly formatted using {project-root} variable syntax.
+
+---
+
+## 2. YAML/Instruction/Template Alignment
+
+**Variables Analyzed:** 9 (excluding standard config)
+**Used in Instructions:** 6
+**Unused (Bloat):** 3
+
+### YAML Variables Defined
+
+1. `story_dir` - USED in instructions (file paths)
+2. `context_path` - UNUSED (appears to duplicate story_dir)
+3. `story_file` - USED in instructions
+4. `context_file` - USED in instructions
+5. `installed_path` - USED in instructions (workflow.xml reference)
+6. `instructions` - USED in instructions (self-reference in critical tag)
+7. `validation` - USED in instructions (checklist reference)
+8. `web_bundle` - CONFIGURATION (correctly set to false)
+9. `date` - USED in instructions (config variable)
+
+### Variables Used in Instructions But NOT Defined in YAML
+
+**IMPORTANT ISSUE:** The following variables are referenced in instructions.md but are NOT defined in workflow.yaml:
+
+1. `{user_skill_level}` - Used 4 times (lines 6, 13, 173, 182)
+2. `{document_output_language}` - Used 1 time (line 7)
+3. `{run_until_complete}` - Used 1 time (line 108)
+4. `{run_tests_command}` - Used 1 time (line 120)
+
+These variables appear to be pulling from config.yaml but are not explicitly defined in the workflow.yaml file. While the config_source mechanism may provide these, workflow.yaml should document all variables used in the workflow for clarity.
+
+### Unused Variables (Bloat)
+
+1. **context_path** - Defined as `"{config_source}:dev_story_location"` but never used. This duplicates `story_dir` functionality.
+
+---
+
+## 3. Config Variable Usage
+
+**Communication Language:** PASS ✓
+**User Name:** PASS ✓
+**Output Folder:** PASS ✓
+**Date:** PASS ✓
+
+### Detailed Analysis
+
+**Communication Language:**
+
+- ✓ Used in line 6: "Communicate all responses in {communication_language}"
+- ✓ Properly used as agent instruction variable (not in template)
+
+**User Name:**
+
+- ✓ Used in line 169: "Communicate to {user_name} that story implementation is complete"
+- ✓ Appropriately used for personalization
+
+**Output Folder:**
+
+- ✓ Used multiple times for sprint-status.yaml file paths
+- ✓ All file operations target {output_folder} correctly
+- ✓ No hardcoded paths detected
+
+**Date:**
+
+- ✓ Available for agent use (system-generated)
+- ✓ Used appropriately in context of workflow execution
+
+### Additional Config Variables
+
+**IMPORTANT ISSUE:** The workflow uses additional variables that appear to come from config but are not explicitly documented:
+
+1. `{user_skill_level}` - Used to tailor communication style
+2. `{document_output_language}` - Used for document generation
+3. `{run_until_complete}` - Used for execution control
+4. `{run_tests_command}` - Used for test execution
+
+These should either be:
+
+- Added to workflow.yaml with proper config_source references, OR
+- Documented as optional config variables with defaults
+
+---
+
+## 4. Web Bundle Validation
+
+**Web Bundle Present:** No (Intentional)
+**Status:** EXPECTED ✓
+
+The workflow correctly sets `web_bundle: false`. This is the expected configuration for implementation workflows that:
+
+- Run locally in the development environment
+- Don't need to be bundled for web deployment
+- Are IDE-integrated workflows
+
+**No issues found** - This is the correct configuration for dev-story.
+
+---
+
+## 5. Bloat Detection
+
+**Bloat Percentage:** 11% (1 unused field / 9 total fields)
+**Cleanup Potential:** Low
+
+### Unused YAML Fields
+
+1. **context_path** (line 11 in workflow.yaml)
+ - Defined as: `"{config_source}:dev_story_location"`
+ - Never referenced in instructions.md
+ - Duplicates functionality of `story_dir` variable
+ - **Recommendation:** Remove this variable as `story_dir` serves the same purpose
+
+### Hardcoded Values
+
+No significant hardcoded values that should be variables were detected. The workflow properly uses variables for:
+
+- File paths ({output_folder}, {story_dir})
+- User personalization ({user_name})
+- Communication style ({communication_language}, {user_skill_level})
+
+### Calculation
+
+- Total yaml fields: 9 (excluding standard config and metadata)
+- Used fields: 8
+- Unused fields: 1 (context_path)
+- Bloat percentage: 11%
+
+**Status:** Acceptable (under 15% threshold)
+
+---
+
+## 6. Template Variable Mapping
+
+**Not Applicable** - This is an action workflow, not a document workflow.
+
+No template.md file exists, which is correct for action-type workflows.
+
+---
+
+## 7. Instructions Quality Analysis
+
+### Structure
+
+- ✓ Steps numbered sequentially (1, 1.5, 2-7)
+- ✓ Each step has clear goal attributes
+- ✓ Proper use of XML tags (, , , ,