bmad-method 4.42.1 → 4.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CONTRIBUTING.md +2 -9
  2. package/README.md +0 -98
  3. package/bmad-core/agents/bmad-master.md +6 -6
  4. package/bmad-core/data/bmad-kb.md +1 -0
  5. package/bmad-core/tasks/validate-next-story.md +1 -1
  6. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +5 -5
  7. package/dist/agents/analyst.txt +1 -0
  8. package/dist/agents/architect.txt +5 -5
  9. package/dist/agents/bmad-master.txt +12 -11
  10. package/dist/agents/bmad-orchestrator.txt +1 -0
  11. package/dist/agents/dev.txt +1 -1
  12. package/dist/agents/po.txt +1 -1
  13. package/dist/expansion-packs/bmad-2d-unity-game-dev/agents/game-developer.txt +1 -1
  14. package/dist/expansion-packs/bmad-2d-unity-game-dev/teams/unity-2d-game-team.txt +1 -1
  15. package/dist/expansion-packs/bmad-godot-game-dev/agents/bmad-orchestrator.txt +1513 -0
  16. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-analyst.txt +3190 -0
  17. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-architect.txt +4499 -0
  18. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-designer.txt +3925 -0
  19. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-developer.txt +666 -0
  20. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-pm.txt +2381 -0
  21. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-po.txt +1612 -0
  22. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-qa.txt +1745 -0
  23. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-sm.txt +1208 -0
  24. package/dist/expansion-packs/bmad-godot-game-dev/agents/game-ux-expert.txt +958 -0
  25. package/dist/expansion-packs/bmad-godot-game-dev/teams/godot-game-team.txt +27721 -0
  26. package/dist/teams/team-all.txt +7 -6
  27. package/dist/teams/team-fullstack.txt +7 -6
  28. package/dist/teams/team-ide-minimal.txt +2 -1
  29. package/dist/teams/team-no-ui.txt +7 -6
  30. package/docs/GUIDING-PRINCIPLES.md +3 -3
  31. package/docs/expansion-packs.md +3 -83
  32. package/docs/flattener.md +91 -0
  33. package/docs/versions.md +1 -1
  34. package/docs/working-in-the-brownfield.md +15 -6
  35. package/expansion-packs/bmad-godot-game-dev/README.md +244 -0
  36. package/expansion-packs/bmad-godot-game-dev/agent-teams/godot-game-team.yaml +18 -0
  37. package/expansion-packs/bmad-godot-game-dev/agents/bmad-orchestrator.md +147 -0
  38. package/expansion-packs/bmad-godot-game-dev/agents/game-analyst.md +84 -0
  39. package/expansion-packs/bmad-godot-game-dev/agents/game-architect.md +146 -0
  40. package/expansion-packs/bmad-godot-game-dev/agents/game-designer.md +78 -0
  41. package/expansion-packs/bmad-godot-game-dev/agents/game-developer.md +124 -0
  42. package/expansion-packs/bmad-godot-game-dev/agents/game-pm.md +82 -0
  43. package/expansion-packs/bmad-godot-game-dev/agents/game-po.md +115 -0
  44. package/expansion-packs/bmad-godot-game-dev/agents/game-qa.md +160 -0
  45. package/expansion-packs/bmad-godot-game-dev/agents/game-sm.md +66 -0
  46. package/expansion-packs/bmad-godot-game-dev/agents/game-ux-expert.md +75 -0
  47. package/expansion-packs/bmad-godot-game-dev/checklists/game-architect-checklist.md +377 -0
  48. package/expansion-packs/bmad-godot-game-dev/checklists/game-change-checklist.md +250 -0
  49. package/expansion-packs/bmad-godot-game-dev/checklists/game-design-checklist.md +225 -0
  50. package/expansion-packs/bmad-godot-game-dev/checklists/game-po-checklist.md +448 -0
  51. package/expansion-packs/bmad-godot-game-dev/checklists/game-story-dod-checklist.md +202 -0
  52. package/expansion-packs/bmad-godot-game-dev/config.yaml +30 -0
  53. package/expansion-packs/bmad-godot-game-dev/data/bmad-kb.md +811 -0
  54. package/expansion-packs/bmad-godot-game-dev/data/brainstorming-techniques.md +36 -0
  55. package/expansion-packs/bmad-godot-game-dev/data/development-guidelines.md +893 -0
  56. package/expansion-packs/bmad-godot-game-dev/data/elicitation-methods.md +156 -0
  57. package/expansion-packs/bmad-godot-game-dev/data/technical-preferences.md +3 -0
  58. package/expansion-packs/bmad-godot-game-dev/tasks/advanced-elicitation.md +110 -0
  59. package/expansion-packs/bmad-godot-game-dev/tasks/apply-qa-fixes.md +224 -0
  60. package/expansion-packs/bmad-godot-game-dev/tasks/brownfield-create-epic.md +162 -0
  61. package/expansion-packs/bmad-godot-game-dev/tasks/brownfield-create-story.md +149 -0
  62. package/expansion-packs/bmad-godot-game-dev/tasks/correct-course-game.md +159 -0
  63. package/expansion-packs/bmad-godot-game-dev/tasks/create-deep-research-prompt.md +278 -0
  64. package/expansion-packs/bmad-godot-game-dev/tasks/create-doc.md +103 -0
  65. package/expansion-packs/bmad-godot-game-dev/tasks/create-game-story.md +202 -0
  66. package/expansion-packs/bmad-godot-game-dev/tasks/document-project.md +343 -0
  67. package/expansion-packs/bmad-godot-game-dev/tasks/execute-checklist.md +88 -0
  68. package/expansion-packs/bmad-godot-game-dev/tasks/facilitate-brainstorming-session.md +136 -0
  69. package/expansion-packs/bmad-godot-game-dev/tasks/game-brownfield-create-epic.md +160 -0
  70. package/expansion-packs/bmad-godot-game-dev/tasks/game-brownfield-create-story.md +147 -0
  71. package/expansion-packs/bmad-godot-game-dev/tasks/game-design-brainstorming.md +290 -0
  72. package/expansion-packs/bmad-godot-game-dev/tasks/game-risk-profile.md +368 -0
  73. package/expansion-packs/bmad-godot-game-dev/tasks/game-test-design.md +219 -0
  74. package/expansion-packs/bmad-godot-game-dev/tasks/generate-ai-frontend-prompt.md +51 -0
  75. package/expansion-packs/bmad-godot-game-dev/tasks/kb-mode-interaction.md +77 -0
  76. package/expansion-packs/bmad-godot-game-dev/tasks/review-game-story.md +364 -0
  77. package/expansion-packs/bmad-godot-game-dev/tasks/shard-doc.md +187 -0
  78. package/expansion-packs/bmad-godot-game-dev/tasks/validate-game-story.md +208 -0
  79. package/expansion-packs/bmad-godot-game-dev/templates/brainstorming-output-tmpl.yaml +156 -0
  80. package/expansion-packs/bmad-godot-game-dev/templates/brownfield-prd-tmpl.yaml +281 -0
  81. package/expansion-packs/bmad-godot-game-dev/templates/competitor-analysis-tmpl.yaml +306 -0
  82. package/expansion-packs/bmad-godot-game-dev/templates/game-architecture-tmpl.yaml +1111 -0
  83. package/expansion-packs/bmad-godot-game-dev/templates/game-brief-tmpl.yaml +356 -0
  84. package/expansion-packs/bmad-godot-game-dev/templates/game-design-doc-tmpl.yaml +724 -0
  85. package/expansion-packs/bmad-godot-game-dev/templates/game-prd-tmpl.yaml +209 -0
  86. package/expansion-packs/bmad-godot-game-dev/templates/game-qa-gate-tmpl.yaml +186 -0
  87. package/expansion-packs/bmad-godot-game-dev/templates/game-story-tmpl.yaml +406 -0
  88. package/expansion-packs/bmad-godot-game-dev/templates/game-ui-spec-tmpl.yaml +601 -0
  89. package/expansion-packs/bmad-godot-game-dev/templates/level-design-doc-tmpl.yaml +620 -0
  90. package/expansion-packs/bmad-godot-game-dev/templates/market-research-tmpl.yaml +418 -0
  91. package/expansion-packs/bmad-godot-game-dev/utils/bmad-doc-template.md +327 -0
  92. package/expansion-packs/bmad-godot-game-dev/utils/workflow-management.md +71 -0
  93. package/expansion-packs/bmad-godot-game-dev/workflows/game-dev-greenfield.yaml +245 -0
  94. package/expansion-packs/bmad-godot-game-dev/workflows/game-prototype.yaml +213 -0
  95. package/package.json +1 -1
  96. package/release_notes.md +19 -2
  97. package/tools/flattener/ignoreRules.js +2 -0
  98. package/tools/installer/bin/bmad.js +37 -1
  99. package/tools/installer/config/install.config.yaml +35 -7
  100. package/tools/installer/lib/ide-setup.js +285 -80
  101. package/tools/installer/lib/installer.js +6 -1
  102. package/tools/installer/package.json +1 -1
  103. package/tools/upgraders/v3-to-v4-upgrader.js +1 -0
  104. package/test.md +0 -1
  105. /package/{implement-fork-friendly-ci.sh → tools/implement-fork-friendly-ci.sh} +0 -0
@@ -0,0 +1,202 @@
1
+ # Create Game Story Task
2
+
3
+ ## Purpose
4
+
5
+ To identify the next logical game story based on project progress and epic definitions, and then to prepare a comprehensive, self-contained, and actionable story file using the `Game Story Template`. This task ensures the story is enriched with all necessary technical context, Godot-specific requirements (node architecture, GDScript/C# language selection, 60+ FPS performance targets), TDD test requirements, and acceptance criteria, making it ready for efficient implementation by a Game Developer Agent with minimal need for additional research or finding its own context.
6
+
7
+ ## SEQUENTIAL Task Execution (Do not proceed until current Task is complete)
8
+
9
+ ### 0. Load Core Configuration and Check Workflow
10
+
11
+ - Load `.bmad-godot-game-dev/config.yaml` from the project root
12
+ - If the file does not exist, HALT and inform the user: "core-config.yaml not found. This file is required for story creation. You can either: 1) Copy core-config.yaml from GITHUB bmad-core/ and configure it for your game project OR 2) Run the BMad installer against your project to upgrade and add the file automatically. Please add and configure before proceeding."
13
+ - Extract key configurations: `devStoryLocation`, `prd.*`, `architecture.*`, `workflow.*`
14
+
15
+ ### 1. Identify Next Story for Preparation
16
+
17
+ #### 1.1 Locate Epic Files and Review Existing Stories
18
+
19
+ - Based on `prdSharded` from config, locate epic files (sharded location/pattern or monolithic PRD sections)
20
+ - If `devStoryLocation` has story files, load the highest `{epicNum}.{storyNum}.story.md` file
21
+ - **If highest story exists:**
22
+ - Verify status is 'Done'. If not, alert user: "ALERT: Found incomplete story! File: {lastEpicNum}.{lastStoryNum}.story.md Status: [current status] Check if TDD tests are passing (GUT/GoDotTest). You should fix this story first, but would you like to accept risk & override to create the next story in draft?"
23
+ - If proceeding, select next sequential story in the current epic
24
+ - If epic is complete, prompt user: "Epic {epicNum} Complete: All stories in Epic {epicNum} have been completed. Would you like to: 1) Begin Epic {epicNum + 1} with story 1 2) Select a specific story to work on 3) Cancel story creation"
25
+ - **CRITICAL**: NEVER automatically skip to another epic. User MUST explicitly instruct which story to create.
26
+ - **If no story files exist:** The next story is ALWAYS 1.1 (first story of first epic)
27
+ - Announce the identified story to the user: "Identified next story for preparation: {epicNum}.{storyNum} - {Story Title}"
28
+
29
+ ### 2. Gather Story Requirements and Previous Story Context
30
+
31
+ - Extract story requirements from the identified epic file or PRD section
32
+ - If previous story exists, review Dev Agent Record sections for:
33
+ - Completion Notes and Debug Log References
34
+ - Implementation deviations and technical decisions
35
+ - Godot-specific challenges (node structure, signal connections, 60+ FPS violations)
36
+ - Language decisions (GDScript vs C# choices and rationale)
37
+ - Resource loading and object pooling implementations
38
+ - TDD test coverage and any failing tests
39
+ - Extract relevant insights that inform the current story's preparation
40
+
41
+ ### 3. Gather Architecture Context
42
+
43
+ #### 3.1 Determine Architecture Reading Strategy
44
+
45
+ - **If `architectureVersion: >= v3` and `architectureSharded: true`**: Read `{architectureShardedLocation}/index.md` then follow structured reading order below
46
+ - **Else**: Use monolithic `architectureFile` for similar sections
47
+
48
+ #### 3.2 Read Architecture Documents Based on Story Type
49
+
50
+ **For ALL Game Stories:** tech-stack.md, godot-project-structure.md, coding-standards.md, test-strategy and standards.md, language-strategy.md
51
+
52
+ **For Gameplay/Mechanics Stories, additionally:** gameplay-systems-architecture.md, node-architecture-details.md, physics-configuration.md, input-system-architecture.md, state-machine-architecture.md, resource-architecture.md
53
+
54
+ **For UI/UX Stories, additionally:** node-architecture-details.md, ui-architecture.md, ui-component-system.md, ui-state-management.md, scene-management-architecture.md
55
+
56
+ **For Backend/Services Stories, additionally:** resource-architecture.md, data-persistence-architecture.md, save-system-implementation.md, analytics-integration.md, multiplayer-architecture.md
57
+
58
+ **For Graphics/Rendering Stories, additionally:** rendering-settings.md, shader-guidelines.md, sprite-management.md, particle-systems.md
59
+
60
+ **For Audio Stories, additionally:** audio-architecture.md, audio-mixing-configuration.md, sound-bank-management.md
61
+
62
+ #### 3.3 Extract Story-Specific Technical Details
63
+
64
+ Extract ONLY information directly relevant to implementing the current story. Do NOT invent new patterns, systems, or standards not in the source documents.
65
+
66
+ Extract:
67
+
68
+ - Specific Godot nodes and their inheritance hierarchy
69
+ - Language selection rationale (GDScript vs C# for each component)
70
+ - Node composition patterns and signal connections
71
+ - Scene (.tscn) and resource (.tres) organization requirements
72
+ - InputMap actions and device handling configurations
73
+ - Physics2D/3D settings and collision layers
74
+ - Control node anchoring and theme specifications
75
+ - Resource naming conventions and folder structures
76
+ - Performance budgets (60+ FPS minimum, frame time <16.67ms, draw calls)
77
+ - Platform export settings (desktop, mobile, web)
78
+ - TDD requirements with GUT (GDScript) and GoDotTest (C#)
79
+
80
+ ALWAYS cite source documents: `[Source: architecture/{filename}.md#{section}]`
81
+
82
+ ### 4. Godot-Specific Technical Analysis
83
+
84
+ #### 4.1 Language Strategy Analysis
85
+
86
+ - Determine GDScript vs C# selection for each system based on:
87
+ - Performance requirements (C# for compute-heavy operations)
88
+ - Iteration speed needs (GDScript for rapid prototyping)
89
+ - Existing codebase patterns
90
+ - Document static typing enforcement in GDScript (10-20% performance gain)
91
+ - Identify interop boundaries between GDScript and C#
92
+ - Note any GDExtension or plugin requirements
93
+ - Specify object pooling needs for spawned entities
94
+
95
+ #### 4.2 Scene and Node Planning
96
+
97
+ - Identify which scenes (.tscn) will be modified or created
98
+ - List scene inheritance and composition patterns
99
+ - Document node tree structure with parent-child relationships
100
+ - Specify scene instancing and pooling requirements
101
+ - Plan signal connections between nodes
102
+ - Define Autoload/singleton needs
103
+
104
+ #### 4.3 Node Architecture
105
+
106
+ - Define custom node classes needed (extending Node2D, Control, etc.)
107
+ - Specify Resource classes for data management
108
+ - Document signal emission and connection patterns
109
+ - Identify process vs physics_process usage
110
+ - Note Control node UI components and theme requirements
111
+ - Plan export variables for inspector configuration
112
+
113
+ #### 4.4 Resource Requirements
114
+
115
+ - List texture requirements with import settings
116
+ - Define AnimationPlayer and AnimationTree needs
117
+ - Specify AudioStream resources and bus routing
118
+ - Document shader and material requirements
119
+ - Note font resources and theme variations
120
+ - Plan resource preloading vs lazy loading strategy
121
+
122
+ ### 5. Populate Story Template with Full Context
123
+
124
+ - Create new story file: `{devStoryLocation}/{epicNum}.{storyNum}.story.md` using Game Story Template
125
+ - Fill in basic story information: Title, Status (Draft), Story statement, Acceptance Criteria from Epic/PRD
126
+ - **`Dev Notes` section (CRITICAL):**
127
+ - CRITICAL: This section MUST contain ONLY information extracted from architecture documents and PRD. NEVER invent or assume technical details.
128
+ - Include ALL relevant technical details from Steps 2-4, organized by category:
129
+ - **Previous Story Insights**: Key learnings from previous story implementation
130
+ - **Language Strategy**: GDScript vs C# decisions for each component [with source references]
131
+ - **Node Architecture**: Specific nodes, inheritance, signal patterns [with source references]
132
+ - **Scene Specifications**: Scene modifications, node trees, instancing [with source references]
133
+ - **Input Configuration**: InputMap actions, device handling [with source references]
134
+ - **UI Implementation**: Control nodes, anchoring, themes [with source references]
135
+ - **Resource Pipeline**: Resource requirements, import settings, pooling strategy
136
+ - **Performance Targets**: 60+ FPS requirement, frame time budget, profiler metrics
137
+ - **Platform Considerations**: Export template differences, platform-specific code
138
+ - **TDD Requirements**: GUT tests for GDScript, GoDotTest for C#, test-first development
139
+ - Every technical detail MUST include its source reference: `[Source: architecture/{filename}.md#{section}]`
140
+ - If information for a category is not found in the architecture docs, explicitly state: "No specific guidance found in architecture docs"
141
+ - **`Tasks / Subtasks` section:**
142
+ - Generate detailed, sequential list of technical tasks based ONLY on: Epic/PRD Requirements, Story AC, Reviewed Architecture Information
143
+ - Include Godot-specific tasks:
144
+ - Write failing tests FIRST (TDD Red phase)
145
+ - Scene setup and node hierarchy creation
146
+ - Node implementation with proper \_ready/\_process methods
147
+ - Signal connection and event handling
148
+ - InputMap integration
149
+ - Physics2D/3D configuration
150
+ - Control node UI with responsive anchoring
151
+ - Performance profiling (maintain 60+ FPS)
152
+ - Make tests pass (TDD Green phase)
153
+ - Refactor while keeping tests green (TDD Refactor phase)
154
+ - Each task must reference relevant architecture documentation
155
+ - Include GUT/GoDotTest testing as explicit subtasks
156
+ - Link tasks to ACs where applicable (e.g., `Task 1 (AC: 1, 3)`)
157
+ - Add notes on Godot project structure alignment or discrepancies found in Step 4
158
+
159
+ ### 6. Story Draft Completion and Review
160
+
161
+ - Review all sections for completeness and accuracy
162
+ - Verify all source references are included for technical details
163
+ - Ensure Godot-specific requirements are comprehensive:
164
+ - All scenes and node trees documented
165
+ - Language strategy (GDScript/C#) justified
166
+ - Signal connections clear
167
+ - Resource requirements specified
168
+ - 60+ FPS performance targets defined
169
+ - TDD test requirements explicit
170
+ - Update status to "Draft" and save the story file
171
+ - Execute `.bmad-godot-game-dev/tasks/execute-checklist` `.bmad-godot-game-dev/checklists/game-story-dod-checklist`
172
+ - Provide summary to user including:
173
+ - Story created: `{devStoryLocation}/{epicNum}.{storyNum}.story.md`
174
+ - Status: Draft
175
+ - Language strategy decisions (GDScript vs C# components)
176
+ - Key Godot nodes and systems included
177
+ - Scene/node modifications required
178
+ - Resource requirements identified
179
+ - TDD test coverage planned
180
+ - Performance impact assessment (60+ FPS maintained?)
181
+ - Any deviations or conflicts noted between PRD and architecture
182
+ - Checklist Results
183
+ - Next steps: For complex Godot features, suggest the user review the story draft and optionally test critical assumptions in Godot Editor
184
+
185
+ ### 7. Godot-Specific Validation
186
+
187
+ Before finalizing, ensure:
188
+
189
+ - [ ] Language strategy defined (GDScript vs C# for each component)
190
+ - [ ] TDD approach specified (tests to write first)
191
+ - [ ] All node inheritance and composition patterns documented
192
+ - [ ] Signal connections and event flow mapped
193
+ - [ ] Scene instancing and pooling strategy defined
194
+ - [ ] InputMap actions configured
195
+ - [ ] Control node UI follows Godot anchoring best practices
196
+ - [ ] Performance profiling points identified (60+ FPS validation)
197
+ - [ ] Resource import settings documented
198
+ - [ ] Platform export settings noted
199
+ - [ ] Object pooling implemented for spawned entities
200
+ - [ ] Static typing enforced in all GDScript
201
+
202
+ This task ensures game development stories are immediately actionable and enable efficient AI-driven development of Godot game features with mandatory TDD practices and 60+ FPS performance targets.
@@ -0,0 +1,343 @@
1
+ # Document an Existing Project
2
+
3
+ ## Purpose
4
+
5
+ Generate comprehensive documentation for existing projects optimized for AI development agents. This task creates structured reference materials that enable AI agents to understand project context, conventions, and patterns for effective contribution to any codebase.
6
+
7
+ ## Task Instructions
8
+
9
+ ### 1. Initial Project Analysis
10
+
11
+ **CRITICAL:** First, check if a PRD or requirements document exists in context. If yes, use it to focus your documentation efforts on relevant areas only.
12
+
13
+ **IF PRD EXISTS**:
14
+
15
+ - Review the PRD to understand what enhancement/feature is planned
16
+ - Identify which modules, services, or areas will be affected
17
+ - Focus documentation ONLY on these relevant areas
18
+ - Skip unrelated parts of the codebase to keep docs lean
19
+
20
+ **IF NO PRD EXISTS**:
21
+ Ask the user:
22
+
23
+ "I notice you haven't provided a PRD or requirements document. To create more focused and useful documentation, I recommend one of these options:
24
+
25
+ 1. **Create a PRD first** - Would you like me to help create a brownfield PRD before documenting? This helps focus documentation on relevant areas.
26
+
27
+ 2. **Provide existing requirements** - Do you have a requirements document, epic, or feature description you can share?
28
+
29
+ 3. **Describe the focus** - Can you briefly describe what enhancement or feature you're planning? For example:
30
+ - 'Adding payment processing to the user service'
31
+ - 'Refactoring the authentication module'
32
+ - 'Integrating with a new third-party API'
33
+
34
+ 4. **Document everything** - Or should I proceed with comprehensive documentation of the entire codebase? (Note: This may create excessive documentation for large projects)
35
+
36
+ Please let me know your preference, or I can proceed with full documentation if you prefer."
37
+
38
+ Based on their response:
39
+
40
+ - If they choose option 1-3: Use that context to focus documentation
41
+ - If they choose option 4 or decline: Proceed with comprehensive analysis below
42
+
43
+ Begin by conducting analysis of the existing project. Use available tools to:
44
+
45
+ 1. **Project Structure Discovery**: Examine the root directory structure, identify main folders, and understand the overall organization
46
+ 2. **Technology Stack Identification**: Look for package.json, requirements.txt, Cargo.toml, pom.xml, etc. to identify languages, frameworks, and dependencies
47
+ 3. **Build System Analysis**: Find build scripts, CI/CD configurations, and development commands
48
+ 4. **Existing Documentation Review**: Check for README files, docs folders, and any existing documentation
49
+ 5. **Code Pattern Analysis**: Sample key files to understand coding patterns, naming conventions, and architectural approaches
50
+
51
+ Ask the user these elicitation questions to better understand their needs:
52
+
53
+ - What is the primary purpose of this project?
54
+ - Are there any specific areas of the codebase that are particularly complex or important for agents to understand?
55
+ - What types of tasks do you expect AI agents to perform on this project? (e.g., bug fixes, feature additions, refactoring, testing)
56
+ - Are there any existing documentation standards or formats you prefer?
57
+ - What level of technical detail should the documentation target? (junior developers, senior developers, mixed team)
58
+ - Is there a specific feature or enhancement you're planning? (This helps focus documentation)
59
+
60
+ ### 2. Deep Codebase Analysis
61
+
62
+ CRITICAL: Before generating documentation, conduct extensive analysis of the existing codebase:
63
+
64
+ 1. **Explore Key Areas**:
65
+ - Entry points (main files, index files, app initializers)
66
+ - Configuration files and environment setup
67
+ - Package dependencies and versions
68
+ - Build and deployment configurations
69
+ - Test suites and coverage
70
+
71
+ 2. **Ask Clarifying Questions**:
72
+ - "I see you're using [technology X]. Are there any custom patterns or conventions I should document?"
73
+ - "What are the most critical/complex parts of this system that developers struggle with?"
74
+ - "Are there any undocumented 'tribal knowledge' areas I should capture?"
75
+ - "What technical debt or known issues should I document?"
76
+ - "Which parts of the codebase change most frequently?"
77
+
78
+ 3. **Map the Reality**:
79
+ - Identify ACTUAL patterns used (not theoretical best practices)
80
+ - Find where key business logic lives
81
+ - Locate integration points and external dependencies
82
+ - Document workarounds and technical debt
83
+ - Note areas that differ from standard patterns
84
+
85
+ **IF PRD PROVIDED**: Also analyze what would need to change for the enhancement
86
+
87
+ ### 3. Core Documentation Generation
88
+
89
+ [[LLM: Generate a comprehensive BROWNFIELD architecture document that reflects the ACTUAL state of the codebase.
90
+
91
+ **CRITICAL**: This is NOT an aspirational architecture document. Document what EXISTS, including:
92
+
93
+ - Technical debt and workarounds
94
+ - Inconsistent patterns between different parts
95
+ - Legacy code that can't be changed
96
+ - Integration constraints
97
+ - Performance bottlenecks
98
+
99
+ **Document Structure**:
100
+
101
+ # [Project Name] Brownfield Architecture Document
102
+
103
+ ## Introduction
104
+
105
+ This document captures the CURRENT STATE of the [Project Name] codebase, including technical debt, workarounds, and real-world patterns. It serves as a reference for AI agents working on enhancements.
106
+
107
+ ### Document Scope
108
+
109
+ [If PRD provided: "Focused on areas relevant to: {enhancement description}"]
110
+ [If no PRD: "Comprehensive documentation of entire system"]
111
+
112
+ ### Change Log
113
+
114
+ | Date | Version | Description | Author |
115
+ | ------ | ------- | --------------------------- | --------- |
116
+ | [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
117
+
118
+ ## Quick Reference - Key Files and Entry Points
119
+
120
+ ### Critical Files for Understanding the System
121
+
122
+ - **Main Entry**: `src/index.js` (or actual entry point)
123
+ - **Configuration**: `config/app.config.js`, `.env.example`
124
+ - **Core Business Logic**: `src/services/`, `src/domain/`
125
+ - **API Definitions**: `src/routes/` or link to OpenAPI spec
126
+ - **Database Models**: `src/models/` or link to schema files
127
+ - **Key Algorithms**: [List specific files with complex logic]
128
+
129
+ ### If PRD Provided - Enhancement Impact Areas
130
+
131
+ [Highlight which files/modules will be affected by the planned enhancement]
132
+
133
+ ## High Level Architecture
134
+
135
+ ### Technical Summary
136
+
137
+ ### Actual Tech Stack (from package.json/requirements.txt)
138
+
139
+ | Category | Technology | Version | Notes |
140
+ | --------- | ---------- | ------- | -------------------------- |
141
+ | Runtime | Node.js | 16.x | [Any constraints] |
142
+ | Framework | Express | 4.18.2 | [Custom middleware?] |
143
+ | Database | PostgreSQL | 13 | [Connection pooling setup] |
144
+
145
+ etc...
146
+
147
+ ### Repository Structure Reality Check
148
+
149
+ - Type: [Monorepo/Polyrepo/Hybrid]
150
+ - Package Manager: [npm/yarn/pnpm]
151
+ - Notable: [Any unusual structure decisions]
152
+
153
+ ## Source Tree and Module Organization
154
+
155
+ ### Project Structure (Actual)
156
+
157
+ ```text
158
+ project-root/
159
+ ├── src/
160
+ │ ├── controllers/ # HTTP request handlers
161
+ │ ├── services/ # Business logic (NOTE: inconsistent patterns between user and payment services)
162
+ │ ├── models/ # Database models (Sequelize)
163
+ │ ├── utils/ # Mixed bag - needs refactoring
164
+ │ └── legacy/ # DO NOT MODIFY - old payment system still in use
165
+ ├── tests/ # Jest tests (60% coverage)
166
+ ├── scripts/ # Build and deployment scripts
167
+ └── config/ # Environment configs
168
+ ```
169
+
170
+ ### Key Modules and Their Purpose
171
+
172
+ - **User Management**: `src/services/userService.js` - Handles all user operations
173
+ - **Authentication**: `src/middleware/auth.js` - JWT-based, custom implementation
174
+ - **Payment Processing**: `src/legacy/payment.js` - CRITICAL: Do not refactor, tightly coupled
175
+ - **[List other key modules with their actual files]**
176
+
177
+ ## Data Models and APIs
178
+
179
+ ### Data Models
180
+
181
+ Instead of duplicating, reference actual model files:
182
+
183
+ - **User Model**: See `src/models/User.js`
184
+ - **Order Model**: See `src/models/Order.js`
185
+ - **Related Types**: TypeScript definitions in `src/types/`
186
+
187
+ ### API Specifications
188
+
189
+ - **OpenAPI Spec**: `docs/api/openapi.yaml` (if exists)
190
+ - **Postman Collection**: `docs/api/postman-collection.json`
191
+ - **Manual Endpoints**: [List any undocumented endpoints discovered]
192
+
193
+ ## Technical Debt and Known Issues
194
+
195
+ ### Critical Technical Debt
196
+
197
+ 1. **Payment Service**: Legacy code in `src/legacy/payment.js` - tightly coupled, no tests
198
+ 2. **User Service**: Different pattern than other services, uses callbacks instead of promises
199
+ 3. **Database Migrations**: Manually tracked, no proper migration tool
200
+ 4. **[Other significant debt]**
201
+
202
+ ### Workarounds and Gotchas
203
+
204
+ - **Environment Variables**: Must set `NODE_ENV=production` even for staging (historical reason)
205
+ - **Database Connections**: Connection pool hardcoded to 10, changing breaks payment service
206
+ - **[Other workarounds developers need to know]**
207
+
208
+ ## Integration Points and External Dependencies
209
+
210
+ ### External Services
211
+
212
+ | Service | Purpose | Integration Type | Key Files |
213
+ | -------- | -------- | ---------------- | ------------------------------ |
214
+ | Stripe | Payments | REST API | `src/integrations/stripe/` |
215
+ | SendGrid | Emails | SDK | `src/services/emailService.js` |
216
+
217
+ etc...
218
+
219
+ ### Internal Integration Points
220
+
221
+ - **Frontend Communication**: REST API on port 3000, expects specific headers
222
+ - **Background Jobs**: Redis queue, see `src/workers/`
223
+ - **[Other integrations]**
224
+
225
+ ## Development and Deployment
226
+
227
+ ### Local Development Setup
228
+
229
+ 1. Actual steps that work (not ideal steps)
230
+ 2. Known issues with setup
231
+ 3. Required environment variables (see `.env.example`)
232
+
233
+ ### Build and Deployment Process
234
+
235
+ - **Build Command**: `npm run build` (webpack config in `webpack.config.js`)
236
+ - **Deployment**: Manual deployment via `scripts/deploy.sh`
237
+ - **Environments**: Dev, Staging, Prod (see `config/environments/`)
238
+
239
+ ## Testing Reality
240
+
241
+ ### Current Test Coverage
242
+
243
+ - Unit Tests: 60% coverage (Jest)
244
+ - Integration Tests: Minimal, in `tests/integration/`
245
+ - E2E Tests: None
246
+ - Manual Testing: Primary QA method
247
+
248
+ ### Running Tests
249
+
250
+ ```bash
251
+ npm test # Runs unit tests
252
+ npm run test:integration # Runs integration tests (requires local DB)
253
+ ```
254
+
255
+ ## If Enhancement PRD Provided - Impact Analysis
256
+
257
+ ### Files That Will Need Modification
258
+
259
+ Based on the enhancement requirements, these files will be affected:
260
+
261
+ - `src/services/userService.js` - Add new user fields
262
+ - `src/models/User.js` - Update schema
263
+ - `src/routes/userRoutes.js` - New endpoints
264
+ - [etc...]
265
+
266
+ ### New Files/Modules Needed
267
+
268
+ - `src/services/newFeatureService.js` - New business logic
269
+ - `src/models/NewFeature.js` - New data model
270
+ - [etc...]
271
+
272
+ ### Integration Considerations
273
+
274
+ - Will need to integrate with existing auth middleware
275
+ - Must follow existing response format in `src/utils/responseFormatter.js`
276
+ - [Other integration points]
277
+
278
+ ## Appendix - Useful Commands and Scripts
279
+
280
+ ### Frequently Used Commands
281
+
282
+ ```bash
283
+ npm run dev # Start development server
284
+ npm run build # Production build
285
+ npm run migrate # Run database migrations
286
+ npm run seed # Seed test data
287
+ ```
288
+
289
+ ### Debugging and Troubleshooting
290
+
291
+ - **Logs**: Check `logs/app.log` for application logs
292
+ - **Debug Mode**: Set `DEBUG=app:*` for verbose logging
293
+ - **Common Issues**: See `docs/troubleshooting.md`]]
294
+
295
+ ### 4. Document Delivery
296
+
297
+ 1. **In Web UI (Gemini, ChatGPT, Claude)**:
298
+ - Present the entire document in one response (or multiple if too long)
299
+ - Tell user to copy and save as `docs/brownfield-architecture.md` or `docs/project-architecture.md`
300
+ - Mention it can be sharded later in IDE if needed
301
+
302
+ 2. **In IDE Environment**:
303
+ - Create the document as `docs/brownfield-architecture.md`
304
+ - Inform user this single document contains all architectural information
305
+ - Can be sharded later using PO agent if desired
306
+
307
+ The document should be comprehensive enough that future agents can understand:
308
+
309
+ - The actual state of the system (not idealized)
310
+ - Where to find key files and logic
311
+ - What technical debt exists
312
+ - What constraints must be respected
313
+ - If PRD provided: What needs to change for the enhancement]]
314
+
315
+ ### 5. Quality Assurance
316
+
317
+ CRITICAL: Before finalizing the document:
318
+
319
+ 1. **Accuracy Check**: Verify all technical details match the actual codebase
320
+ 2. **Completeness Review**: Ensure all major system components are documented
321
+ 3. **Focus Validation**: If user provided scope, verify relevant areas are emphasized
322
+ 4. **Clarity Assessment**: Check that explanations are clear for AI agents
323
+ 5. **Navigation**: Ensure document has clear section structure for easy reference
324
+
325
+ Apply the advanced elicitation task after major sections to refine based on user feedback.
326
+
327
+ ## Success Criteria
328
+
329
+ - Single comprehensive brownfield architecture document created
330
+ - Document reflects REALITY including technical debt and workarounds
331
+ - Key files and modules are referenced with actual paths
332
+ - Models/APIs reference source files rather than duplicating content
333
+ - If PRD provided: Clear impact analysis showing what needs to change
334
+ - Document enables AI agents to navigate and understand the actual codebase
335
+ - Technical constraints and "gotchas" are clearly documented
336
+
337
+ ## Notes
338
+
339
+ - This task creates ONE document that captures the TRUE state of the system
340
+ - References actual files rather than duplicating content when possible
341
+ - Documents technical debt, workarounds, and constraints honestly
342
+ - For brownfield projects with PRD: Provides clear enhancement impact analysis
343
+ - The goal is PRACTICAL documentation for AI agents doing real work
@@ -0,0 +1,88 @@
1
+ <!-- Powered by BMAD™ Core -->
2
+
3
+ # Checklist Validation Task
4
+
5
+ This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
6
+
7
+ ## Available Checklists
8
+
9
+ If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the .bmad-godot-game-dev/checklists folder to select the appropriate one to run.
10
+
11
+ ## Instructions
12
+
13
+ 1. **Initial Assessment**
14
+ - If user or the task being run provides a checklist name:
15
+ - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
16
+ - If multiple matches found, ask user to clarify
17
+ - Load the appropriate checklist from .bmad-godot-game-dev/checklists/
18
+ - If no checklist specified:
19
+ - Ask the user which checklist they want to use
20
+ - Present the available options from the files in the checklists folder
21
+ - Confirm if they want to work through the checklist:
22
+ - Section by section (interactive mode - very time consuming)
23
+ - All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
24
+
25
+ 2. **Document and Artifact Gathering**
26
+ - Each checklist will specify its required documents/artifacts at the beginning
27
+ - Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
28
+
29
+ 3. **Checklist Processing**
30
+
31
+ If in interactive mode:
32
+ - Work through each section of the checklist one at a time
33
+ - For each section:
34
+ - Review all items in the section following instructions for that section embedded in the checklist
35
+ - Check each item against the relevant documentation or artifacts as appropriate
36
+ - Present summary of findings for that section, highlighting warnings, errors and non applicable items (rationale for non-applicability).
37
+ - Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
38
+
39
+ If in YOLO mode:
40
+ - Process all sections at once
41
+ - Create a comprehensive report of all findings
42
+ - Present the complete analysis to the user
43
+
44
+ 4. **Validation Approach**
45
+
46
+ For each checklist item:
47
+ - Read and understand the requirement
48
+ - Look for evidence in the documentation that satisfies the requirement
49
+ - Consider both explicit mentions and implicit coverage
50
+ - Aside from this, follow all checklist llm instructions
51
+ - Mark items as:
52
+ - ✅ PASS: Requirement clearly met
53
+ - ❌ FAIL: Requirement not met or insufficient coverage
54
+ - ⚠️ PARTIAL: Some aspects covered but needs improvement
55
+ - N/A: Not applicable to this case
56
+
57
+ 5. **Section Analysis**
58
+
59
+ For each section:
60
+ - think step by step to calculate pass rate
61
+ - Identify common themes in failed items
62
+ - Provide specific recommendations for improvement
63
+ - In interactive mode, discuss findings with user
64
+ - Document any user decisions or explanations
65
+
66
+ 6. **Final Report**
67
+
68
+ Prepare a summary that includes:
69
+ - Overall checklist completion status
70
+ - Pass rates by section
71
+ - List of failed items with context
72
+ - Specific recommendations for improvement
73
+ - Any sections or items marked as N/A with justification
74
+
75
+ ## Checklist Execution Methodology
76
+
77
+ Each checklist now contains embedded LLM prompts and instructions that will:
78
+
79
+ 1. **Guide thorough thinking** - Prompts ensure deep analysis of each section
80
+ 2. **Request specific artifacts** - Clear instructions on what documents/access is needed
81
+ 3. **Provide contextual guidance** - Section-specific prompts for better validation
82
+ 4. **Generate comprehensive reports** - Final summary with detailed findings
83
+
84
+ The LLM will:
85
+
86
+ - Execute the complete checklist validation
87
+ - Present a final report with pass/fail rates and key findings
88
+ - Offer to provide detailed analysis of any section, especially those with warnings or failures