bmad-method 4.27.0 → 4.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bmad-core/agent-teams/team-all.yaml +6 -6
  3. package/bmad-core/agent-teams/team-fullstack.yaml +6 -6
  4. package/bmad-core/agent-teams/team-no-ui.yaml +2 -2
  5. package/bmad-core/agents/analyst.md +17 -20
  6. package/bmad-core/agents/architect.md +15 -18
  7. package/bmad-core/agents/bmad-master.md +55 -56
  8. package/bmad-core/agents/bmad-orchestrator.md +24 -23
  9. package/bmad-core/agents/dev.md +10 -10
  10. package/bmad-core/agents/pm.md +17 -20
  11. package/bmad-core/agents/po.md +12 -15
  12. package/bmad-core/agents/qa.md +7 -8
  13. package/bmad-core/agents/sm.md +8 -13
  14. package/bmad-core/agents/ux-expert.md +7 -11
  15. package/bmad-core/core-config.yaml +1 -1
  16. package/bmad-core/templates/architecture-tmpl.yaml +650 -0
  17. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  18. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  19. package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  20. package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
  21. package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
  22. package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  23. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +805 -0
  24. package/bmad-core/templates/market-research-tmpl.yaml +252 -0
  25. package/bmad-core/templates/{prd-tmpl2.yaml → prd-tmpl.yaml} +3 -3
  26. package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
  27. package/bmad-core/templates/story-tmpl.yaml +137 -0
  28. package/common/tasks/create-doc.md +55 -67
  29. package/common/utils/bmad-doc-template.md +29 -0
  30. package/dist/agents/analyst.txt +1004 -1061
  31. package/dist/agents/architect.txt +2460 -2872
  32. package/dist/agents/bmad-master.txt +3842 -4354
  33. package/dist/agents/bmad-orchestrator.txt +211 -87
  34. package/dist/agents/dev.txt +4 -8
  35. package/dist/agents/pm.txt +557 -587
  36. package/dist/agents/po.txt +149 -102
  37. package/dist/agents/qa.txt +145 -35
  38. package/dist/agents/sm.txt +145 -100
  39. package/dist/agents/ux-expert.txt +413 -522
  40. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +1258 -1236
  41. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +623 -573
  42. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +263 -248
  43. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +9135 -4942
  44. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +288 -251
  45. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +1123 -1145
  46. package/dist/teams/team-all.txt +4583 -4837
  47. package/dist/teams/team-fullstack.txt +5276 -5520
  48. package/dist/teams/team-ide-minimal.txt +375 -185
  49. package/dist/teams/team-no-ui.txt +4875 -5051
  50. package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +2 -2
  51. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +17 -15
  52. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +13 -11
  53. package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +13 -11
  54. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
  55. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +613 -0
  56. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +356 -0
  57. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +343 -0
  58. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +253 -0
  59. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
  60. package/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.md +14 -12
  61. package/expansion-packs/bmad-creator-tools/config.yaml +1 -1
  62. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.yaml +178 -0
  63. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.yaml +154 -0
  64. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.yaml +120 -0
  65. package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +14 -14
  66. package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
  67. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +424 -0
  68. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +629 -0
  69. package/package.json +1 -1
  70. package/tools/builders/web-builder.js +65 -85
  71. package/tools/installer/package.json +1 -1
  72. package/tools/lib/dependency-resolver.js +8 -19
  73. package/zoo/docs/architecture.md +812 -0
  74. package/zoo/docs/brief.md +253 -0
  75. package/zoo/docs/prd.md +500 -0
  76. package/zoo/docs/stories/1.1.story.md +278 -0
  77. package/bmad-core/templates/architecture-tmpl.md +0 -776
  78. package/bmad-core/templates/brainstorming-output-tmpl.md +0 -149
  79. package/bmad-core/templates/brownfield-architecture-tmpl.md +0 -544
  80. package/bmad-core/templates/brownfield-prd-tmpl.md +0 -266
  81. package/bmad-core/templates/competitor-analysis-tmpl.md +0 -291
  82. package/bmad-core/templates/front-end-architecture-tmpl.md +0 -175
  83. package/bmad-core/templates/front-end-spec-tmpl.md +0 -413
  84. package/bmad-core/templates/fullstack-architecture-tmpl.md +0 -1018
  85. package/bmad-core/templates/market-research-tmpl.md +0 -263
  86. package/bmad-core/templates/prd-tmpl.md +0 -202
  87. package/bmad-core/templates/project-brief-tmpl.md +0 -232
  88. package/bmad-core/templates/story-tmpl.md +0 -58
  89. package/common/tasks/create-doc2.md +0 -65
  90. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md +0 -560
  91. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.md +0 -345
  92. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.md +0 -331
  93. package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.md +0 -235
  94. package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.md +0 -470
  95. package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.md +0 -154
  96. package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.md +0 -143
  97. package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.md +0 -91
  98. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md +0 -415
  99. package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
@@ -50,6 +50,7 @@ activation-instructions:
50
50
  - Only read the files/tasks listed here when user selects them for execution to minimize context usage
51
51
  - The customization field ALWAYS takes precedence over any conflicting instructions
52
52
  - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
53
+ - Greet the user with your name and role, and inform of the *help command.
53
54
  agent:
54
55
  name: John
55
56
  id: pm
@@ -71,128 +72,112 @@ persona:
71
72
  - Collaborative & iterative approach
72
73
  - Proactive risk identification
73
74
  - Strategic thinking & outcome-oriented
74
- startup:
75
- - Greet the user with your name and role, and inform of the *help command.
76
75
  commands:
77
76
  - help: Show numbered list of the following commands to allow selection
78
- - create-doc {template}: execute task create-doc (no template = ONLY show available templates listed under dependencies/templates below)
79
- - yolo: Toggle Yolo Mode off on - on will skip doc section confirmations
77
+ - create-doc {template}: execute task create-doc for template provided, if no template then ONLY list dependencies.templates
78
+ - yolo: Toggle Yolo Mode
80
79
  - doc-out: Output full document to current destination file
81
80
  - exit: Exit (confirm)
82
81
  dependencies:
83
82
  tasks:
84
- - create-doc
85
- - correct-course
86
- - create-deep-research-prompt
87
- - brownfield-create-epic
88
- - brownfield-create-story
89
- - execute-checklist
90
- - shard-doc
83
+ - create-doc.md
84
+ - correct-course.md
85
+ - create-deep-research-prompt.md
86
+ - brownfield-create-epic.md
87
+ - brownfield-create-story.md
88
+ - execute-checklist.md
89
+ - shard-doc.md
91
90
  templates:
92
- - prd-tmpl
93
- - brownfield-prd-tmpl
91
+ - prd-tmpl.yaml
92
+ - brownfield-prd-tmpl.yaml
94
93
  checklists:
95
- - pm-checklist
96
- - change-checklist
94
+ - pm-checklist.md
95
+ - change-checklist.md
97
96
  data:
98
- - technical-preferences
99
- utils:
100
- - template-format
97
+ - technical-preferences.md
101
98
  ```
102
99
  ==================== END: .bmad-core/agents/pm.md ====================
103
100
 
104
101
  ==================== START: .bmad-core/tasks/create-doc.md ====================
105
- # Create Document from Template Task
106
-
107
- ## Purpose
108
-
109
- Generate documents from templates by EXECUTING (not just reading) embedded instructions from the perspective of the selected agent persona.
102
+ # Create Document from Template (YAML Driven)
110
103
 
111
- ## CRITICAL RULES
104
+ ## CRITICAL: Mandatory Elicitation Format
112
105
 
113
- 1. **Templates are PROGRAMS** - Execute every [[LLM:]] instruction exactly as written
114
- 2. **NEVER show markup** - Hide all [[LLM:]], {{placeholders}}, @{examples}, and template syntax
115
- 3. **STOP and EXECUTE** - When you see "apply tasks#" or "execute tasks#", STOP and run that task immediately
116
- 4. **WAIT for user input** - At review points and after elicitation tasks
106
+ **When `elicit: true`, ALWAYS use this exact format:**
117
107
 
118
- ## Execution Flow
108
+ 1. Present section content
109
+ 2. Provide detailed rationale (explain trade-offs, assumptions, decisions made)
110
+ 3. Present numbered options 1-9:
111
+ - **Option 1:** Always "Proceed to next section"
112
+ - **Options 2-9:** Select 8 methods from data/elicitation-methods
113
+ - End with: "Select 1-9 or just type your question/feedback:"
119
114
 
120
- ### 0. Check Workflow Plan (if configured)
115
+ **NEVER ask yes/no questions or use any other format.**
121
116
 
122
- [[LLM: Check if plan tracking is enabled in core-config.yaml]]
117
+ ## Processing Flow
123
118
 
124
- - If `workflow.trackProgress: true`, check for active plan using .bmad-core/utils/plan-management.md
125
- - If plan exists and this document creation is part of the plan:
126
- - Verify this is the expected next step
127
- - If out of sequence and `enforceSequence: true`, warn user and halt without user override
128
- - If out of sequence and `enforceSequence: false`, ask for confirmation
129
- - Continue with normal execution after plan check
119
+ 1. **Parse YAML template** - Load template metadata and sections
120
+ 2. **Set preferences** - Show current mode (Interactive), confirm output file
121
+ 3. **Process each section:**
122
+ - Skip if condition unmet
123
+ - Check agent permissions (owner/editors) - note if section is restricted to specific agents
124
+ - Draft content using section instruction
125
+ - Present content + detailed rationale
126
+ - **IF elicit: true** → MANDATORY 1-9 options format
127
+ - Save to file if possible
128
+ 4. **Continue until complete**
130
129
 
131
- ### 1. Identify Template
130
+ ## Detailed Rationale Requirements
132
131
 
133
- - Load from `.bmad-core/templates/*.md` or `.bmad-core/templates directory`
134
- - Agent-specific templates are listed in agent's dependencies
135
- - If agent has `templates: [prd-tmpl, architecture-tmpl]` for example, then offer to create "PRD" and "Architecture" documents
132
+ When presenting section content, ALWAYS include rationale that explains:
136
133
 
137
- ### 2. Ask Interaction Mode
134
+ - Trade-offs and choices made (what was chosen over alternatives and why)
135
+ - Key assumptions made during drafting
136
+ - Interesting or questionable decisions that need user attention
137
+ - Areas that might need validation
138
138
 
139
- > 1. **Incremental** - Section by section with reviews
140
- > 2. **YOLO Mode** - Complete draft then review (user can type `/yolo` anytime to switch)
139
+ ## Elicitation Results Flow
141
140
 
142
- ### 3. Execute Template
141
+ After user selects elicitation method (2-9):
143
142
 
144
- - Replace {{placeholders}} with real content
145
- - Execute [[LLM:]] instructions as you encounter them
146
- - Process <<REPEAT>> loops and ^^CONDITIONS^^
147
- - Use @{examples} for guidance but never output them
143
+ 1. Execute method from data/elicitation-methods
144
+ 2. Present results with insights
145
+ 3. Offer options:
146
+ - **1. Apply changes and update section**
147
+ - **2. Return to elicitation menu**
148
+ - **3. Ask any questions or engage further with this elicitation**
148
149
 
149
- ### 4. Key Execution Patterns
150
+ ## Agent Permissions
150
151
 
151
- **When you see:** `[[LLM: Draft X and immediately execute .bmad-core/tasks/advanced-elicitation.md]]`
152
+ When processing sections with agent permission fields:
152
153
 
153
- - Draft the content
154
- - Present it to user
155
- - IMMEDIATELY execute the task
156
- - Wait for completion before continuing
154
+ - **owner**: Note which agent role initially creates/populates the section
155
+ - **editors**: List agent roles allowed to modify the section
156
+ - **readonly**: Mark sections that cannot be modified after creation
157
157
 
158
- **When you see:** `[[LLM: After section completion, apply .bmad-core/tasks/Y.md]]`
158
+ **For sections with restricted access:**
159
159
 
160
- - Finish the section
161
- - STOP and execute the task
162
- - Wait for user input
160
+ - Include a note in the generated document indicating the responsible agent
161
+ - Example: "_(This section is owned by dev-agent and can only be modified by dev-agent)_"
163
162
 
164
- ### 5. Validation & Final Presentation
163
+ ## YOLO Mode
165
164
 
166
- - Run any specified checklists
167
- - Present clean, formatted content only
168
- - No truncation or summarization
169
- - Begin directly with content (no preamble)
170
- - Include any handoff prompts from template
165
+ User can type `#yolo` to toggle to YOLO mode (process all sections at once).
171
166
 
172
- ### 6. Update Workflow Plan (if applicable)
167
+ ## CRITICAL REMINDERS
173
168
 
174
- [[LLM: After successful document creation]]
169
+ **❌ NEVER:**
175
170
 
176
- - If plan tracking is enabled and document was part of plan:
177
- - Call update-workflow-plan task to mark step complete
178
- - Parameters: task: create-doc, step_id: {from plan}, status: complete
179
- - Show next recommended step from plan
171
+ - Ask yes/no questions for elicitation
172
+ - Use any format other than 1-9 numbered options
173
+ - Create new elicitation methods
180
174
 
181
- ## Common Mistakes to Avoid
175
+ **✅ ALWAYS:**
182
176
 
183
- Skipping elicitation tasks
184
- Showing template markup to users
185
- Continuing past STOP signals
186
- Combining multiple review points
187
-
188
- ✅ Execute ALL instructions in sequence
189
- ✅ Present only clean, formatted content
190
- ✅ Stop at every elicitation point
191
- ✅ Wait for user confirmation when instructed
192
-
193
- ## Remember
194
-
195
- Templates contain precise instructions for a reason. Follow them exactly to ensure document quality and completeness.
177
+ - Use exact 1-9 format when elicit: true
178
+ - Select options 2-9 from data/elicitation-methods only
179
+ - Provide detailed rationale explaining decisions
180
+ - End with "Select 1-9 or just type your question/feedback:"
196
181
  ==================== END: .bmad-core/tasks/create-doc.md ====================
197
182
 
198
183
  ==================== START: .bmad-core/tasks/correct-course.md ====================
@@ -1178,479 +1163,493 @@ Document sharded successfully:
1178
1163
  - Ensure the sharding is reversible (could reconstruct the original from shards)
1179
1164
  ==================== END: .bmad-core/tasks/shard-doc.md ====================
1180
1165
 
1181
- ==================== START: .bmad-core/templates/prd-tmpl.md ====================
1182
- # {{Project Name}} Product Requirements Document (PRD)
1183
-
1184
- [[LLM: The default path and filename unless specified is docs/prd.md]]
1185
-
1186
- [[LLM: If available, review any provided document or ask if any are optionally available: Project Brief]]
1187
-
1188
- ## Goals and Background Context
1189
-
1190
- [[LLM: Populate the 2 child sections based on what we have received from user description or the provided brief. Allow user to review the 2 sections and offer changes before proceeding]]
1191
-
1192
- ### Goals
1193
-
1194
- [[LLM: Bullet list of 1 line desired outcomes the PRD will deliver if successful - user and project desires]]
1195
-
1196
- ### Background Context
1197
-
1198
- [[LLM: 1-2 short paragraphs summarizing the background context, such as what we learned in the brief without being redundant with the goals, what and why this solves a problem, what the current landscape or need is etc...]]
1199
-
1200
- ### Change Log
1201
-
1202
- [[LLM: Track document versions and changes]]
1203
-
1204
- | Date | Version | Description | Author |
1205
- | :--- | :------ | :---------- | :----- |
1206
-
1207
- ## Requirements
1208
-
1209
- [[LLM: Draft the list of functional and non functional requirements under the two child sections, and immediately execute .bmad-core/tasks/advanced-elicitation.md display]]
1210
-
1211
- ### Functional
1212
-
1213
- [[LLM: Each Requirement will be a bullet markdown and an identifier sequence starting with FR`.]]
1214
- @{example: - FR6: The Todo List uses AI to detect and warn against adding potentially duplicate todo items that are worded differently.}
1215
-
1216
- ### Non Functional
1217
-
1218
- [[LLM: Each Requirement will be a bullet markdown and an identifier sequence starting with NFR`.]]
1219
- @{example: - NFR1: AWS service usage **must** aim to stay within free-tier limits where feasible.}
1220
-
1221
- ^^CONDITION: has_ui^^
1222
-
1223
- ## User Interface Design Goals
1224
-
1225
- [[LLM: Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
1226
-
1227
- 1. Pre-fill all subsections with educated guesses based on project context
1228
- 2. Present the complete rendered section to user
1229
- 3. Clearly let the user know where assumptions were made
1230
- 4. Ask targeted questions for unclear/missing elements or areas needing more specification
1231
- 5. This is NOT detailed UI spec - focus on product vision and user goals
1232
- 6. After section completion, immediately apply `.bmad-core/tasks/advanced-elicitation.md` protocol]]
1233
-
1234
- ### Overall UX Vision
1235
-
1236
- ### Key Interaction Paradigms
1237
-
1238
- ### Core Screens and Views
1239
-
1240
- [[LLM: From a product perspective, what are the most critical screens or views necessary to deliver the the PRD values and goals? This is meant to be Conceptual High Level to Drive Rough Epic or User Stories]]
1241
-
1242
- @{example}
1243
-
1244
- - Login Screen
1245
- - Main Dashboard
1246
- - Item Detail Page
1247
- - Settings Page
1248
- @{/example}
1249
-
1250
- ### Accessibility: { None, WCAG, etc }
1251
-
1252
- ### Branding
1253
-
1254
- [[LLM: Any known branding elements or style guides that must be incorporated?]]
1255
-
1256
- @{example}
1257
-
1258
- - Replicate the look and feel of early 1900s black and white cinema, including animated effects replicating film damage or projector glitches during page or state transitions.
1259
- - Attached is the full color pallet and tokens for our corporate branding.
1260
- @{/example}
1261
-
1262
- ### Target Device and Platforms
1263
-
1264
- @{example}
1265
- "Web Responsive, and all mobile platforms", "IPhone Only", "ASCII Windows Desktop"
1266
- @{/example}
1267
-
1268
- ^^/CONDITION: has_ui^^
1269
-
1270
- ## Technical Assumptions
1271
-
1272
- [[LLM: Gather technical decisions that will guide the Architect. Steps:
1273
-
1274
- 1. Check if `.bmad-core/data/technical-preferences.yaml` or an attached `technical-preferences` file exists - use it to pre-populate choices
1275
- 2. Ask user about: languages, frameworks, starter templates, libraries, APIs, deployment targets
1276
- 3. For unknowns, offer guidance based on project goals and MVP scope
1277
- 4. Document ALL technical choices with rationale (why this choice fits the project)
1278
- 5. These become constraints for the Architect - be specific and complete
1279
- 6. After section completion, apply `.bmad-core/tasks/advanced-elicitation.md` protocol.]]
1280
-
1281
- ### Repository Structure: { Monorepo, Polyrepo, etc...}
1282
-
1283
- ### Service Architecture
1284
-
1285
- [[LLM: CRITICAL DECISION - Document the high-level service architecture (e.g., Monolith, Microservices, Serverless functions within a Monorepo).]]
1286
-
1287
- ### Testing requirements
1288
-
1289
- [[LLM: CRITICAL DECISION - Document the testing requirements, unit only, integration, e2e, manual, need for manual testing convenience methods).]]
1290
-
1291
- ### Additional Technical Assumptions and Requests
1292
-
1293
- [[LLM: Throughout the entire process of drafting this document, if any other technical assumptions are raised or discovered appropriate for the architect, add them here as additional bulleted items]]
1294
-
1295
- ## Epics
1296
-
1297
- [[LLM: First, present a high-level list of all epics for user approval, the epic_list and immediately execute .bmad-core/tasks/advanced-elicitation.md display. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
1298
-
1299
- CRITICAL: Epics MUST be logically sequential following agile best practices:
1300
-
1301
- - Each epic should deliver a significant, end-to-end, fully deployable increment of testable functionality
1302
- - Epic 1 must establish foundational project infrastructure (app setup, Git, CI/CD, core services) unless we are adding new functionality to an existing app, while also delivering an initial piece of functionality, even as simple as a health-check route or display of a simple canary page - remember this when we produce the stories for the first epic!
1303
- - Each subsequent epic builds upon previous epics' functionality delivering major blocks of functionality that provide tangible value to users or business when deployed
1304
- - Not every project needs multiple epics, an epic needs to deliver value. For example, an API completed can deliver value even if a UI is not complete and planned for a separate epic.
1305
- - Err on the side of less epics, but let the user know your rationale and offer options for splitting them if it seems some are too large or focused on disparate things.
1306
- - Cross Cutting Concerns should flow through epics and stories and not be final stories. For example, adding a logging framework as a last story of an epic, or at the end of a project as a final epic or story would be terrible as we would not have logging from the beginning.]]
1307
-
1308
- <<REPEAT: epic_list>>
1309
-
1310
- - Epic{{epic_number}} {{epic_title}}: {{short_goal}}
1311
-
1312
- <</REPEAT>>
1313
-
1314
- @{example: epic_list}
1315
-
1316
- 1. Foundation & Core Infrastructure: Establish project setup, authentication, and basic user management
1317
- 2. Core Business Entities: Create and manage primary domain objects with CRUD operations
1318
- 3. User Workflows & Interactions: Enable key user journeys and business processes
1319
- 4. Reporting & Analytics: Provide insights and data visualization for users
1320
-
1321
- @{/example}
1322
-
1323
- [[LLM: After the epic list is approved, present each `epic_details` with all its stories and acceptance criteria as a complete review unit and immediately execute .bmad-core/tasks/advanced-elicitation.md display, before moving on to the next epic.]]
1324
-
1325
- <<REPEAT: epic_details>>
1326
-
1327
- ## Epic {{epic_number}} {{epic_title}}
1328
-
1329
- {{epic_goal}} [[LLM: Expanded goal - 2-3 sentences describing the objective and value all the stories will achieve]]
1330
-
1331
- [[LLM: CRITICAL STORY SEQUENCING REQUIREMENTS:
1332
-
1333
- - Stories within each epic MUST be logically sequential
1334
- - Each story should be a "vertical slice" delivering complete functionality aside from early enabler stories for project foundation
1335
- - No story should depend on work from a later story or epic
1336
- - Identify and note any direct prerequisite stories
1337
- - Focus on "what" and "why" not "how" (leave technical implementation to Architect) yet be precise enough to support a logical sequential order of operations from story to story.
1338
- - Ensure each story delivers clear user or business value, try to avoid enablers and build them into stories that deliver value.
1339
- - Size stories for AI agent execution: Each story must be completable by a single AI agent in one focused session without context overflow
1340
- - Think "junior developer working for 2-4 hours" - stories must be small, focused, and self-contained
1341
- - If a story seems complex, break it down further as long as it can deliver a vertical slice
1342
- - Each story should result in working, testable code before the agent's context window fills]]
1343
-
1344
- <<REPEAT: story>>
1345
-
1346
- ### Story {{epic_number}}.{{story_number}} {{story_title}}
1347
-
1348
- As a {{user_type}},
1349
- I want {{action}},
1350
- so that {{benefit}}.
1351
-
1352
- #### Acceptance Criteria
1353
-
1354
- [[LLM: Define clear, comprehensive, and testable acceptance criteria that:
1355
-
1356
- - Precisely define what "done" means from a functional perspective
1357
- - Are unambiguous and serve as basis for verification
1358
- - Include any critical non-functional requirements from the PRD
1359
- - Consider local testability for backend/data components
1360
- - Specify UI/UX requirements and framework adherence where applicable
1361
- - Avoid cross-cutting concerns that should be in other stories or PRD sections]]
1362
-
1363
- <<REPEAT: criteria>>
1364
-
1365
- - {{criterion number}}: {{criteria}}
1366
-
1367
- <</REPEAT>>
1368
- <</REPEAT>>
1369
- <</REPEAT>>
1370
-
1371
- ## Checklist Results Report
1372
-
1373
- [[LLM: Before running the checklist and drafting the prompts, offer to output the full updated PRD. If outputting it, confirm with the user that you will be proceeding to run the checklist and produce the report. Once the user confirms, execute the `pm-checklist` and populate the results in this section.]]
1374
-
1375
- ## Next Steps
1376
-
1377
- ### Design Architect Prompt
1378
-
1379
- [[LLM: This section will contain the prompt for the Design Architect, keep it short and to the point to initiate create architecture mode using this document as input.]]
1380
-
1381
- ### Architect Prompt
1382
-
1383
- [[LLM: This section will contain the prompt for the Architect, keep it short and to the point to initiate create architecture mode using this document as input.]]
1384
- ==================== END: .bmad-core/templates/prd-tmpl.md ====================
1385
-
1386
- ==================== START: .bmad-core/templates/brownfield-prd-tmpl.md ====================
1387
- # {{Project Name}} Brownfield Enhancement PRD
1388
-
1389
- [[LLM: The default path and filename unless specified is docs/prd.md]]
1390
-
1391
- [[LLM: IMPORTANT - SCOPE ASSESSMENT REQUIRED:
1392
-
1393
- This PRD is for SIGNIFICANT enhancements to existing projects that require comprehensive planning and multiple stories. Before proceeding:
1394
-
1395
- 1. **Assess Enhancement Complexity**: If this is a simple feature addition or bug fix that could be completed in 1-2 focused development sessions, STOP and recommend: "For simpler changes, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead. This full PRD process is designed for substantial enhancements that require architectural planning and multiple coordinated stories."
1396
-
1397
- 2. **Project Context**: Determine if we're working in an IDE with the project already loaded or if the user needs to provide project information. If project files are available, analyze existing documentation in the docs folder. If insufficient documentation exists, recommend running the document-project task first.
1398
-
1399
- 3. **Deep Assessment Requirement**: You MUST thoroughly analyze the existing project structure, patterns, and constraints before making ANY suggestions. Every recommendation must be grounded in actual project analysis, not assumptions.]]
1400
-
1401
- ## Intro Project Analysis and Context
1402
-
1403
- [[LLM: Gather comprehensive information about the existing project. This section must be completed before proceeding with requirements.
1404
-
1405
- CRITICAL: Throughout this analysis, explicitly confirm your understanding with the user. For every assumption you make about the existing project, ask: "Based on my analysis, I understand that [assumption]. Is this correct?"
1406
-
1407
- Do not proceed with any recommendations until the user has validated your understanding of the existing system.]]
1408
-
1409
- ### Existing Project Overview
1410
-
1411
- [[LLM: Check if document-project analysis was already performed. If yes, reference that output instead of re-analyzing.]]
1412
-
1413
- **Analysis Source**: [[LLM: Indicate one of the following:
1414
- - Document-project output available at: {{path}}
1415
- - IDE-based fresh analysis
1416
- - User-provided information
1417
- ]]
1418
-
1419
- **Current Project State**: [[LLM:
1420
- - If document-project output exists: Extract summary from "High Level Architecture" and "Technical Summary" sections
1421
- - Otherwise: Brief description of what the project currently does and its primary purpose
1422
- ]]
1423
-
1424
- ### Available Documentation Analysis
1425
-
1426
- [[LLM:
1427
- If document-project was run:
1428
- - Note: "Document-project analysis available - using existing technical documentation"
1429
- - List key documents created by document-project
1430
- - Skip the missing documentation check below
1431
-
1432
- Otherwise, check for existing documentation:
1433
- ]]
1434
-
1435
- **Available Documentation**:
1436
-
1437
- - [ ] Tech Stack Documentation [[LLM: If from document-project, check ✓]]
1438
- - [ ] Source Tree/Architecture [[LLM: If from document-project, check ✓]]
1439
- - [ ] Coding Standards [[LLM: If from document-project, may be partial]]
1440
- - [ ] API Documentation [[LLM: If from document-project, check ✓]]
1441
- - [ ] External API Documentation [[LLM: If from document-project, check ✓]]
1442
- - [ ] UX/UI Guidelines [[LLM: May not be in document-project]]
1443
- - [ ] Technical Debt Documentation [[LLM: If from document-project, check ✓]]
1444
- - [ ] Other: \***\*\_\_\_\*\***
1445
-
1446
- [[LLM:
1447
- - If document-project was already run: "Using existing project analysis from document-project output."
1448
- - If critical documentation is missing and no document-project: "I recommend running the document-project task first..."
1449
- ]]
1450
-
1451
- ### Enhancement Scope Definition
1452
-
1453
- [[LLM: Work with user to clearly define what type of enhancement this is. This is critical for scoping and approach.]]
1454
-
1455
- **Enhancement Type**: [[LLM: Determine with user which applies]]
1456
-
1457
- - [ ] New Feature Addition
1458
- - [ ] Major Feature Modification
1459
- - [ ] Integration with New Systems
1460
- - [ ] Performance/Scalability Improvements
1461
- - [ ] UI/UX Overhaul
1462
- - [ ] Technology Stack Upgrade
1463
- - [ ] Bug Fix and Stability Improvements
1464
- - [ ] Other: \***\*\_\_\_\*\***
1465
-
1466
- **Enhancement Description**: [[LLM: 2-3 sentences describing what the user wants to add or change]]
1467
-
1468
- **Impact Assessment**: [[LLM: Assess the scope of impact on existing codebase]]
1469
-
1470
- - [ ] Minimal Impact (isolated additions)
1471
- - [ ] Moderate Impact (some existing code changes)
1472
- - [ ] Significant Impact (substantial existing code changes)
1473
- - [ ] Major Impact (architectural changes required)
1474
-
1475
- ### Goals and Background Context
1476
-
1477
- #### Goals
1478
-
1479
- [[LLM: Bullet list of 1-line desired outcomes this enhancement will deliver if successful]]
1480
-
1481
- #### Background Context
1482
-
1483
- [[LLM: 1-2 short paragraphs explaining why this enhancement is needed, what problem it solves, and how it fits with the existing project]]
1484
-
1485
- ### Change Log
1486
-
1487
- | Change | Date | Version | Description | Author |
1488
- | ------ | ---- | ------- | ----------- | ------ |
1489
-
1490
- ## Requirements
1491
-
1492
- [[LLM: Draft functional and non-functional requirements based on your validated understanding of the existing project. Before presenting requirements, confirm: "These requirements are based on my understanding of your existing system. Please review carefully and confirm they align with your project's reality." Then immediately execute tasks#advanced-elicitation display]]
1493
-
1494
- ### Functional
1495
-
1496
- [[LLM: Each Requirement will be a bullet markdown with identifier starting with FR]]
1497
- @{example: - FR1: The existing Todo List will integrate with the new AI duplicate detection service without breaking current functionality.}
1498
-
1499
- ### Non Functional
1500
-
1501
- [[LLM: Each Requirement will be a bullet markdown with identifier starting with NFR. Include constraints from existing system]]
1502
- @{example: - NFR1: Enhancement must maintain existing performance characteristics and not exceed current memory usage by more than 20%.}
1503
-
1504
- ### Compatibility Requirements
1505
-
1506
- [[LLM: Critical for brownfield - what must remain compatible]]
1507
-
1508
- - CR1: [[LLM: Existing API compatibility requirements]]
1509
- - CR2: [[LLM: Database schema compatibility requirements]]
1510
- - CR3: [[LLM: UI/UX consistency requirements]]
1511
- - CR4: [[LLM: Integration compatibility requirements]]
1512
-
1513
- ^^CONDITION: has_ui^^
1514
-
1515
- ## User Interface Enhancement Goals
1516
-
1517
- [[LLM: For UI changes, capture how they will integrate with existing UI patterns and design systems]]
1518
-
1519
- ### Integration with Existing UI
1520
-
1521
- [[LLM: Describe how new UI elements will fit with existing design patterns, style guides, and component libraries]]
1522
-
1523
- ### Modified/New Screens and Views
1524
-
1525
- [[LLM: List only the screens/views that will be modified or added]]
1526
-
1527
- ### UI Consistency Requirements
1528
-
1529
- [[LLM: Specific requirements for maintaining visual and interaction consistency with existing application]]
1530
-
1531
- ^^/CONDITION: has_ui^^
1532
-
1533
- ## Technical Constraints and Integration Requirements
1534
-
1535
- [[LLM: This section replaces separate architecture documentation. Gather detailed technical constraints from existing project analysis.]]
1536
-
1537
- ### Existing Technology Stack
1538
-
1539
- [[LLM:
1540
- If document-project output available:
1541
- - Extract from "Actual Tech Stack" table in High Level Architecture section
1542
- - Include version numbers and any noted constraints
1543
-
1544
- Otherwise, document the current technology stack:
1545
- ]]
1546
-
1547
- **Languages**: [[LLM: From document-project or fresh analysis]]
1548
- **Frameworks**: [[LLM: From document-project or fresh analysis]]
1549
- **Database**: [[LLM: From document-project or fresh analysis]]
1550
- **Infrastructure**: [[LLM: From document-project or fresh analysis]]
1551
- **External Dependencies**: [[LLM: From document-project "External Services" section or fresh analysis]]
1552
-
1553
- ### Integration Approach
1554
-
1555
- [[LLM: Define how the enhancement will integrate with existing architecture]]
1556
-
1557
- **Database Integration Strategy**: [[LLM: How new features will interact with existing database]]
1558
- **API Integration Strategy**: [[LLM: How new APIs will integrate with existing API structure]]
1559
- **Frontend Integration Strategy**: [[LLM: How new UI components will integrate with existing frontend]]
1560
- **Testing Integration Strategy**: [[LLM: How new tests will integrate with existing test suite]]
1561
-
1562
- ### Code Organization and Standards
1563
-
1564
- [[LLM: Based on existing project analysis, define how new code will fit existing patterns]]
1565
-
1566
- **File Structure Approach**: [[LLM: How new files will fit existing project structure]]
1567
- **Naming Conventions**: [[LLM: Existing naming conventions that must be followed]]
1568
- **Coding Standards**: [[LLM: Existing coding standards and linting rules]]
1569
- **Documentation Standards**: [[LLM: How new code documentation will match existing patterns]]
1570
-
1571
- ### Deployment and Operations
1572
-
1573
- [[LLM: How the enhancement fits existing deployment pipeline]]
1574
-
1575
- **Build Process Integration**: [[LLM: How enhancement builds with existing process]]
1576
- **Deployment Strategy**: [[LLM: How enhancement will be deployed alongside existing features]]
1577
- **Monitoring and Logging**: [[LLM: How enhancement will integrate with existing monitoring]]
1578
- **Configuration Management**: [[LLM: How new configuration will integrate with existing config]]
1579
-
1580
- ### Risk Assessment and Mitigation
1581
-
1582
- [[LLM:
1583
- If document-project output available:
1584
- - Reference "Technical Debt and Known Issues" section
1585
- - Include "Workarounds and Gotchas" that might impact enhancement
1586
- - Note any identified constraints from "Critical Technical Debt"
1587
-
1588
- Build risk assessment incorporating existing known issues:
1589
- ]]
1590
-
1591
- **Technical Risks**: [[LLM: Include risks from document-project + new enhancement risks]]
1592
- **Integration Risks**: [[LLM: Reference integration constraints from document-project]]
1593
- **Deployment Risks**: [[LLM: Include deployment gotchas from document-project]]
1594
- **Mitigation Strategies**: [[LLM: Address both existing and new risks]]
1595
-
1596
- ## Epic and Story Structure
1597
-
1598
- [[LLM: For brownfield projects, favor a single comprehensive epic unless the user is clearly requesting multiple unrelated enhancements. Before presenting the epic structure, confirm: "Based on my analysis of your existing project, I believe this enhancement should be structured as [single epic/multiple epics] because [rationale based on actual project analysis]. Does this align with your understanding of the work required?" Then present the epic structure and immediately execute tasks#advanced-elicitation display.]]
1599
-
1600
- ### Epic Approach
1601
-
1602
- [[LLM: Explain the rationale for epic structure - typically single epic for brownfield unless multiple unrelated features]]
1603
-
1604
- **Epic Structure Decision**: [[LLM: Single Epic or Multiple Epics with rationale]]
1605
-
1606
- ## Epic 1: {{enhancement_title}}
1607
-
1608
- [[LLM: Comprehensive epic that delivers the brownfield enhancement while maintaining existing functionality]]
1609
-
1610
- **Epic Goal**: [[LLM: 2-3 sentences describing the complete enhancement objective and value]]
1611
-
1612
- **Integration Requirements**: [[LLM: Key integration points with existing system]]
1613
-
1614
- [[LLM: CRITICAL STORY SEQUENCING FOR BROWNFIELD:
1615
-
1616
- - Stories must ensure existing functionality remains intact
1617
- - Each story should include verification that existing features still work
1618
- - Stories should be sequenced to minimize risk to existing system
1619
- - Include rollback considerations for each story
1620
- - Focus on incremental integration rather than big-bang changes
1621
- - Size stories for AI agent execution in existing codebase context
1622
- - MANDATORY: Present the complete story sequence and ask: "This story sequence is designed to minimize risk to your existing system. Does this order make sense given your project's architecture and constraints?"
1623
- - Stories must be logically sequential with clear dependencies identified
1624
- - Each story must deliver value while maintaining system integrity]]
1625
-
1626
- <<REPEAT: story>>
1627
-
1628
- ### Story 1.{{story_number}} {{story_title}}
1629
-
1630
- As a {{user_type}},
1631
- I want {{action}},
1632
- so that {{benefit}}.
1633
-
1634
- #### Acceptance Criteria
1635
-
1636
- [[LLM: Define criteria that include both new functionality and existing system integrity]]
1637
-
1638
- <<REPEAT: criteria>>
1639
-
1640
- - {{criterion number}}: {{criteria}}
1641
-
1642
- <</REPEAT>>
1643
-
1644
- #### Integration Verification
1645
-
1646
- [[LLM: Specific verification steps to ensure existing functionality remains intact]]
1647
-
1648
- - IV1: [[LLM: Existing functionality verification requirement]]
1649
- - IV2: [[LLM: Integration point verification requirement]]
1650
- - IV3: [[LLM: Performance impact verification requirement]]
1651
-
1652
- <</REPEAT>>
1653
- ==================== END: .bmad-core/templates/brownfield-prd-tmpl.md ====================
1166
+ ==================== START: .bmad-core/templates/prd-tmpl.yaml ====================
1167
+ template:
1168
+ id: prd-template-v2
1169
+ name: Product Requirements Document
1170
+ version: 2.0
1171
+ output:
1172
+ format: markdown
1173
+ filename: docs/prd.md
1174
+ title: "{{project_name}} Product Requirements Document (PRD)"
1175
+
1176
+ workflow:
1177
+ mode: interactive
1178
+ elicitation: advanced-elicitation
1179
+
1180
+ sections:
1181
+ - id: goals-context
1182
+ title: Goals and Background Context
1183
+ instruction: |
1184
+ Ask if Project Brief document is available. If NO Project Brief exists, STRONGLY recommend creating one first using project-brief-tmpl (it provides essential foundation: problem statement, target users, success metrics, MVP scope, constraints). If user insists on PRD without brief, gather this information during Goals section. If Project Brief exists, review and use it to populate Goals (bullet list of desired outcomes) and Background Context (1-2 paragraphs on what this solves and why) so we can determine what is and is not in scope for PRD mvp. Either way this is critical to determine the requirements. Include Change Log table.
1185
+ sections:
1186
+ - id: goals
1187
+ title: Goals
1188
+ type: bullet-list
1189
+ instruction: Bullet list of 1 line desired outcomes the PRD will deliver if successful - user and project desires
1190
+ - id: background
1191
+ title: Background Context
1192
+ type: paragraphs
1193
+ instruction: 1-2 short paragraphs summarizing the background context, such as what we learned in the brief without being redundant with the goals, what and why this solves a problem, what the current landscape or need is
1194
+ - id: changelog
1195
+ title: Change Log
1196
+ type: table
1197
+ columns: [Date, Version, Description, Author]
1198
+ instruction: Track document versions and changes
1199
+
1200
+ - id: requirements
1201
+ title: Requirements
1202
+ instruction: Draft the list of functional and non functional requirements under the two child sections
1203
+ elicit: true
1204
+ sections:
1205
+ - id: functional
1206
+ title: Functional
1207
+ type: numbered-list
1208
+ prefix: FR
1209
+ instruction: Each Requirement will be a bullet markdown and an identifier sequence starting with FR
1210
+ examples:
1211
+ - "FR6: The Todo List uses AI to detect and warn against potentially duplicate todo items that are worded differently."
1212
+ - id: non-functional
1213
+ title: Non Functional
1214
+ type: numbered-list
1215
+ prefix: NFR
1216
+ instruction: Each Requirement will be a bullet markdown and an identifier sequence starting with NFR
1217
+ examples:
1218
+ - "NFR1: AWS service usage must aim to stay within free-tier limits where feasible."
1219
+
1220
+ - id: ui-goals
1221
+ title: User Interface Design Goals
1222
+ condition: PRD has UX/UI requirements
1223
+ instruction: |
1224
+ Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
1225
+
1226
+ 1. Pre-fill all subsections with educated guesses based on project context
1227
+ 2. Present the complete rendered section to user
1228
+ 3. Clearly let the user know where assumptions were made
1229
+ 4. Ask targeted questions for unclear/missing elements or areas needing more specification
1230
+ 5. This is NOT detailed UI spec - focus on product vision and user goals
1231
+ elicit: true
1232
+ choices:
1233
+ accessibility: [None, WCAG AA, WCAG AAA]
1234
+ platforms: [Web Responsive, Mobile Only, Desktop Only, Cross-Platform]
1235
+ sections:
1236
+ - id: ux-vision
1237
+ title: Overall UX Vision
1238
+ - id: interaction-paradigms
1239
+ title: Key Interaction Paradigms
1240
+ - id: core-screens
1241
+ title: Core Screens and Views
1242
+ instruction: From a product perspective, what are the most critical screens or views necessary to deliver the the PRD values and goals? This is meant to be Conceptual High Level to Drive Rough Epic or User Stories
1243
+ examples:
1244
+ - "Login Screen"
1245
+ - "Main Dashboard"
1246
+ - "Item Detail Page"
1247
+ - "Settings Page"
1248
+ - id: accessibility
1249
+ title: "Accessibility: {None|WCAG AA|WCAG AAA|Custom Requirements}"
1250
+ - id: branding
1251
+ title: Branding
1252
+ instruction: Any known branding elements or style guides that must be incorporated?
1253
+ examples:
1254
+ - "Replicate the look and feel of early 1900s black and white cinema, including animated effects replicating film damage or projector glitches during page or state transitions."
1255
+ - "Attached is the full color pallet and tokens for our corporate branding."
1256
+ - id: target-platforms
1257
+ title: "Target Device and Platforms: {Web Responsive|Mobile Only|Desktop Only|Cross-Platform}"
1258
+ examples:
1259
+ - "Web Responsive, and all mobile platforms"
1260
+ - "iPhone Only"
1261
+ - "ASCII Windows Desktop"
1262
+
1263
+ - id: technical-assumptions
1264
+ title: Technical Assumptions
1265
+ instruction: |
1266
+ Gather technical decisions that will guide the Architect. Steps:
1267
+
1268
+ 1. Check if .bmad-core/data/technical-preferences.yaml or an attached technical-preferences file exists - use it to pre-populate choices
1269
+ 2. Ask user about: languages, frameworks, starter templates, libraries, APIs, deployment targets
1270
+ 3. For unknowns, offer guidance based on project goals and MVP scope
1271
+ 4. Document ALL technical choices with rationale (why this choice fits the project)
1272
+ 5. These become constraints for the Architect - be specific and complete
1273
+ elicit: true
1274
+ choices:
1275
+ repository: [Monorepo, Polyrepo]
1276
+ architecture: [Monolith, Microservices, Serverless]
1277
+ testing: [Unit Only, Unit + Integration, Full Testing Pyramid]
1278
+ sections:
1279
+ - id: repository-structure
1280
+ title: "Repository Structure: {Monorepo|Polyrepo|Multi-repo}"
1281
+ - id: service-architecture
1282
+ title: Service Architecture
1283
+ instruction: "CRITICAL DECISION - Document the high-level service architecture (e.g., Monolith, Microservices, Serverless functions within a Monorepo)."
1284
+ - id: testing-requirements
1285
+ title: Testing Requirements
1286
+ instruction: "CRITICAL DECISION - Document the testing requirements, unit only, integration, e2e, manual, need for manual testing convenience methods)."
1287
+ - id: additional-assumptions
1288
+ title: Additional Technical Assumptions and Requests
1289
+ instruction: Throughout the entire process of drafting this document, if any other technical assumptions are raised or discovered appropriate for the architect, add them here as additional bulleted items
1290
+
1291
+ - id: epic-list
1292
+ title: Epic List
1293
+ instruction: |
1294
+ Present a high-level list of all epics for user approval. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
1295
+
1296
+ CRITICAL: Epics MUST be logically sequential following agile best practices:
1297
+
1298
+ - Each epic should deliver a significant, end-to-end, fully deployable increment of testable functionality
1299
+ - Epic 1 must establish foundational project infrastructure (app setup, Git, CI/CD, core services) unless we are adding new functionality to an existing app, while also delivering an initial piece of functionality, even as simple as a health-check route or display of a simple canary page - remember this when we produce the stories for the first epic!
1300
+ - Each subsequent epic builds upon previous epics' functionality delivering major blocks of functionality that provide tangible value to users or business when deployed
1301
+ - Not every project needs multiple epics, an epic needs to deliver value. For example, an API completed can deliver value even if a UI is not complete and planned for a separate epic.
1302
+ - Err on the side of less epics, but let the user know your rationale and offer options for splitting them if it seems some are too large or focused on disparate things.
1303
+ - Cross Cutting Concerns should flow through epics and stories and not be final stories. For example, adding a logging framework as a last story of an epic, or at the end of a project as a final epic or story would be terrible as we would not have logging from the beginning.
1304
+ elicit: true
1305
+ examples:
1306
+ - "Epic 1: Foundation & Core Infrastructure: Establish project setup, authentication, and basic user management"
1307
+ - "Epic 2: Core Business Entities: Create and manage primary domain objects with CRUD operations"
1308
+ - "Epic 3: User Workflows & Interactions: Enable key user journeys and business processes"
1309
+ - "Epic 4: Reporting & Analytics: Provide insights and data visualization for users"
1310
+
1311
+ - id: epic-details
1312
+ title: Epic {{epic_number}} {{epic_title}}
1313
+ repeatable: true
1314
+ instruction: |
1315
+ After the epic list is approved, present each epic with all its stories and acceptance criteria as a complete review unit.
1316
+
1317
+ For each epic provide expanded goal (2-3 sentences describing the objective and value all the stories will achieve).
1318
+
1319
+ CRITICAL STORY SEQUENCING REQUIREMENTS:
1320
+
1321
+ - Stories within each epic MUST be logically sequential
1322
+ - Each story should be a "vertical slice" delivering complete functionality aside from early enabler stories for project foundation
1323
+ - No story should depend on work from a later story or epic
1324
+ - Identify and note any direct prerequisite stories
1325
+ - Focus on "what" and "why" not "how" (leave technical implementation to Architect) yet be precise enough to support a logical sequential order of operations from story to story.
1326
+ - Ensure each story delivers clear user or business value, try to avoid enablers and build them into stories that deliver value.
1327
+ - Size stories for AI agent execution: Each story must be completable by a single AI agent in one focused session without context overflow
1328
+ - Think "junior developer working for 2-4 hours" - stories must be small, focused, and self-contained
1329
+ - If a story seems complex, break it down further as long as it can deliver a vertical slice
1330
+ elicit: true
1331
+ template: "{{epic_goal}}"
1332
+ sections:
1333
+ - id: story
1334
+ title: Story {{epic_number}}.{{story_number}} {{story_title}}
1335
+ repeatable: true
1336
+ template: |
1337
+ As a {{user_type}},
1338
+ I want {{action}},
1339
+ so that {{benefit}}.
1340
+ sections:
1341
+ - id: acceptance-criteria
1342
+ title: Acceptance Criteria
1343
+ type: numbered-list
1344
+ item_template: "{{criterion_number}}: {{criteria}}"
1345
+ repeatable: true
1346
+ instruction: |
1347
+ Define clear, comprehensive, and testable acceptance criteria that:
1348
+
1349
+ - Precisely define what "done" means from a functional perspective
1350
+ - Are unambiguous and serve as basis for verification
1351
+ - Include any critical non-functional requirements from the PRD
1352
+ - Consider local testability for backend/data components
1353
+ - Specify UI/UX requirements and framework adherence where applicable
1354
+ - Avoid cross-cutting concerns that should be in other stories or PRD sections
1355
+
1356
+ - id: checklist-results
1357
+ title: Checklist Results Report
1358
+ instruction: Before running the checklist and drafting the prompts, offer to output the full updated PRD. If outputting it, confirm with the user that you will be proceeding to run the checklist and produce the report. Once the user confirms, execute the pm-checklist and populate the results in this section.
1359
+
1360
+ - id: next-steps
1361
+ title: Next Steps
1362
+ sections:
1363
+ - id: design-architect-prompt
1364
+ title: Design Architect Prompt
1365
+ instruction: This section will contain the prompt for the Design Architect, keep it short and to the point to initiate create architecture mode using this document as input.
1366
+ - id: architect-prompt
1367
+ title: Architect Prompt
1368
+ instruction: This section will contain the prompt for the Architect, keep it short and to the point to initiate create architecture mode using this document as input.
1369
+ ==================== END: .bmad-core/templates/prd-tmpl.yaml ====================
1370
+
1371
+ ==================== START: .bmad-core/templates/brownfield-prd-tmpl.yaml ====================
1372
+ template:
1373
+ id: brownfield-prd-template-v2
1374
+ name: Brownfield Enhancement PRD
1375
+ version: 2.0
1376
+ output:
1377
+ format: markdown
1378
+ filename: docs/prd.md
1379
+ title: "{{project_name}} Brownfield Enhancement PRD"
1380
+
1381
+ workflow:
1382
+ mode: interactive
1383
+ elicitation: advanced-elicitation
1384
+
1385
+ sections:
1386
+ - id: intro-analysis
1387
+ title: Intro Project Analysis and Context
1388
+ instruction: |
1389
+ IMPORTANT - SCOPE ASSESSMENT REQUIRED:
1390
+
1391
+ This PRD is for SIGNIFICANT enhancements to existing projects that require comprehensive planning and multiple stories. Before proceeding:
1392
+
1393
+ 1. **Assess Enhancement Complexity**: If this is a simple feature addition or bug fix that could be completed in 1-2 focused development sessions, STOP and recommend: "For simpler changes, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead. This full PRD process is designed for substantial enhancements that require architectural planning and multiple coordinated stories."
1394
+
1395
+ 2. **Project Context**: Determine if we're working in an IDE with the project already loaded or if the user needs to provide project information. If project files are available, analyze existing documentation in the docs folder. If insufficient documentation exists, recommend running the document-project task first.
1396
+
1397
+ 3. **Deep Assessment Requirement**: You MUST thoroughly analyze the existing project structure, patterns, and constraints before making ANY suggestions. Every recommendation must be grounded in actual project analysis, not assumptions.
1398
+
1399
+ Gather comprehensive information about the existing project. This section must be completed before proceeding with requirements.
1400
+
1401
+ CRITICAL: Throughout this analysis, explicitly confirm your understanding with the user. For every assumption you make about the existing project, ask: "Based on my analysis, I understand that [assumption]. Is this correct?"
1402
+
1403
+ Do not proceed with any recommendations until the user has validated your understanding of the existing system.
1404
+ sections:
1405
+ - id: existing-project-overview
1406
+ title: Existing Project Overview
1407
+ instruction: Check if document-project analysis was already performed. If yes, reference that output instead of re-analyzing.
1408
+ sections:
1409
+ - id: analysis-source
1410
+ title: Analysis Source
1411
+ instruction: |
1412
+ Indicate one of the following:
1413
+ - Document-project output available at: {{path}}
1414
+ - IDE-based fresh analysis
1415
+ - User-provided information
1416
+ - id: current-state
1417
+ title: Current Project State
1418
+ instruction: |
1419
+ - If document-project output exists: Extract summary from "High Level Architecture" and "Technical Summary" sections
1420
+ - Otherwise: Brief description of what the project currently does and its primary purpose
1421
+ - id: documentation-analysis
1422
+ title: Available Documentation Analysis
1423
+ instruction: |
1424
+ If document-project was run:
1425
+ - Note: "Document-project analysis available - using existing technical documentation"
1426
+ - List key documents created by document-project
1427
+ - Skip the missing documentation check below
1428
+
1429
+ Otherwise, check for existing documentation:
1430
+ sections:
1431
+ - id: available-docs
1432
+ title: Available Documentation
1433
+ type: checklist
1434
+ items:
1435
+ - Tech Stack Documentation [[LLM: If from document-project, check ✓]]
1436
+ - Source Tree/Architecture [[LLM: If from document-project, check ✓]]
1437
+ - Coding Standards [[LLM: If from document-project, may be partial]]
1438
+ - API Documentation [[LLM: If from document-project, check ]]
1439
+ - External API Documentation [[LLM: If from document-project, check ✓]]
1440
+ - UX/UI Guidelines [[LLM: May not be in document-project]]
1441
+ - Technical Debt Documentation [[LLM: If from document-project, check ✓]]
1442
+ - "Other: {{other_docs}}"
1443
+ instruction: |
1444
+ - If document-project was already run: "Using existing project analysis from document-project output."
1445
+ - If critical documentation is missing and no document-project: "I recommend running the document-project task first..."
1446
+ - id: enhancement-scope
1447
+ title: Enhancement Scope Definition
1448
+ instruction: Work with user to clearly define what type of enhancement this is. This is critical for scoping and approach.
1449
+ sections:
1450
+ - id: enhancement-type
1451
+ title: Enhancement Type
1452
+ type: checklist
1453
+ instruction: Determine with user which applies
1454
+ items:
1455
+ - New Feature Addition
1456
+ - Major Feature Modification
1457
+ - Integration with New Systems
1458
+ - Performance/Scalability Improvements
1459
+ - UI/UX Overhaul
1460
+ - Technology Stack Upgrade
1461
+ - Bug Fix and Stability Improvements
1462
+ - "Other: {{other_type}}"
1463
+ - id: enhancement-description
1464
+ title: Enhancement Description
1465
+ instruction: 2-3 sentences describing what the user wants to add or change
1466
+ - id: impact-assessment
1467
+ title: Impact Assessment
1468
+ type: checklist
1469
+ instruction: Assess the scope of impact on existing codebase
1470
+ items:
1471
+ - Minimal Impact (isolated additions)
1472
+ - Moderate Impact (some existing code changes)
1473
+ - Significant Impact (substantial existing code changes)
1474
+ - Major Impact (architectural changes required)
1475
+ - id: goals-context
1476
+ title: Goals and Background Context
1477
+ sections:
1478
+ - id: goals
1479
+ title: Goals
1480
+ type: bullet-list
1481
+ instruction: Bullet list of 1-line desired outcomes this enhancement will deliver if successful
1482
+ - id: background
1483
+ title: Background Context
1484
+ type: paragraphs
1485
+ instruction: 1-2 short paragraphs explaining why this enhancement is needed, what problem it solves, and how it fits with the existing project
1486
+ - id: changelog
1487
+ title: Change Log
1488
+ type: table
1489
+ columns: [Change, Date, Version, Description, Author]
1490
+
1491
+ - id: requirements
1492
+ title: Requirements
1493
+ instruction: |
1494
+ Draft functional and non-functional requirements based on your validated understanding of the existing project. Before presenting requirements, confirm: "These requirements are based on my understanding of your existing system. Please review carefully and confirm they align with your project's reality."
1495
+ elicit: true
1496
+ sections:
1497
+ - id: functional
1498
+ title: Functional
1499
+ type: numbered-list
1500
+ prefix: FR
1501
+ instruction: Each Requirement will be a bullet markdown with identifier starting with FR
1502
+ examples:
1503
+ - "FR1: The existing Todo List will integrate with the new AI duplicate detection service without breaking current functionality."
1504
+ - id: non-functional
1505
+ title: Non Functional
1506
+ type: numbered-list
1507
+ prefix: NFR
1508
+ instruction: Each Requirement will be a bullet markdown with identifier starting with NFR. Include constraints from existing system
1509
+ examples:
1510
+ - "NFR1: Enhancement must maintain existing performance characteristics and not exceed current memory usage by more than 20%."
1511
+ - id: compatibility
1512
+ title: Compatibility Requirements
1513
+ instruction: Critical for brownfield - what must remain compatible
1514
+ type: numbered-list
1515
+ prefix: CR
1516
+ template: "{{requirement}}: {{description}}"
1517
+ items:
1518
+ - id: cr1
1519
+ template: "CR1: {{existing_api_compatibility}}"
1520
+ - id: cr2
1521
+ template: "CR2: {{database_schema_compatibility}}"
1522
+ - id: cr3
1523
+ template: "CR3: {{ui_ux_consistency}}"
1524
+ - id: cr4
1525
+ template: "CR4: {{integration_compatibility}}"
1526
+
1527
+ - id: ui-enhancement-goals
1528
+ title: User Interface Enhancement Goals
1529
+ condition: Enhancement includes UI changes
1530
+ instruction: For UI changes, capture how they will integrate with existing UI patterns and design systems
1531
+ sections:
1532
+ - id: existing-ui-integration
1533
+ title: Integration with Existing UI
1534
+ instruction: Describe how new UI elements will fit with existing design patterns, style guides, and component libraries
1535
+ - id: modified-screens
1536
+ title: Modified/New Screens and Views
1537
+ instruction: List only the screens/views that will be modified or added
1538
+ - id: ui-consistency
1539
+ title: UI Consistency Requirements
1540
+ instruction: Specific requirements for maintaining visual and interaction consistency with existing application
1541
+
1542
+ - id: technical-constraints
1543
+ title: Technical Constraints and Integration Requirements
1544
+ instruction: This section replaces separate architecture documentation. Gather detailed technical constraints from existing project analysis.
1545
+ sections:
1546
+ - id: existing-tech-stack
1547
+ title: Existing Technology Stack
1548
+ instruction: |
1549
+ If document-project output available:
1550
+ - Extract from "Actual Tech Stack" table in High Level Architecture section
1551
+ - Include version numbers and any noted constraints
1552
+
1553
+ Otherwise, document the current technology stack:
1554
+ template: |
1555
+ **Languages**: {{languages}}
1556
+ **Frameworks**: {{frameworks}}
1557
+ **Database**: {{database}}
1558
+ **Infrastructure**: {{infrastructure}}
1559
+ **External Dependencies**: {{external_dependencies}}
1560
+ - id: integration-approach
1561
+ title: Integration Approach
1562
+ instruction: Define how the enhancement will integrate with existing architecture
1563
+ template: |
1564
+ **Database Integration Strategy**: {{database_integration}}
1565
+ **API Integration Strategy**: {{api_integration}}
1566
+ **Frontend Integration Strategy**: {{frontend_integration}}
1567
+ **Testing Integration Strategy**: {{testing_integration}}
1568
+ - id: code-organization
1569
+ title: Code Organization and Standards
1570
+ instruction: Based on existing project analysis, define how new code will fit existing patterns
1571
+ template: |
1572
+ **File Structure Approach**: {{file_structure}}
1573
+ **Naming Conventions**: {{naming_conventions}}
1574
+ **Coding Standards**: {{coding_standards}}
1575
+ **Documentation Standards**: {{documentation_standards}}
1576
+ - id: deployment-operations
1577
+ title: Deployment and Operations
1578
+ instruction: How the enhancement fits existing deployment pipeline
1579
+ template: |
1580
+ **Build Process Integration**: {{build_integration}}
1581
+ **Deployment Strategy**: {{deployment_strategy}}
1582
+ **Monitoring and Logging**: {{monitoring_logging}}
1583
+ **Configuration Management**: {{config_management}}
1584
+ - id: risk-assessment
1585
+ title: Risk Assessment and Mitigation
1586
+ instruction: |
1587
+ If document-project output available:
1588
+ - Reference "Technical Debt and Known Issues" section
1589
+ - Include "Workarounds and Gotchas" that might impact enhancement
1590
+ - Note any identified constraints from "Critical Technical Debt"
1591
+
1592
+ Build risk assessment incorporating existing known issues:
1593
+ template: |
1594
+ **Technical Risks**: {{technical_risks}}
1595
+ **Integration Risks**: {{integration_risks}}
1596
+ **Deployment Risks**: {{deployment_risks}}
1597
+ **Mitigation Strategies**: {{mitigation_strategies}}
1598
+
1599
+ - id: epic-structure
1600
+ title: Epic and Story Structure
1601
+ instruction: |
1602
+ For brownfield projects, favor a single comprehensive epic unless the user is clearly requesting multiple unrelated enhancements. Before presenting the epic structure, confirm: "Based on my analysis of your existing project, I believe this enhancement should be structured as [single epic/multiple epics] because [rationale based on actual project analysis]. Does this align with your understanding of the work required?"
1603
+ elicit: true
1604
+ sections:
1605
+ - id: epic-approach
1606
+ title: Epic Approach
1607
+ instruction: Explain the rationale for epic structure - typically single epic for brownfield unless multiple unrelated features
1608
+ template: "**Epic Structure Decision**: {{epic_decision}} with rationale"
1609
+
1610
+ - id: epic-details
1611
+ title: "Epic 1: {{enhancement_title}}"
1612
+ instruction: |
1613
+ Comprehensive epic that delivers the brownfield enhancement while maintaining existing functionality
1614
+
1615
+ CRITICAL STORY SEQUENCING FOR BROWNFIELD:
1616
+ - Stories must ensure existing functionality remains intact
1617
+ - Each story should include verification that existing features still work
1618
+ - Stories should be sequenced to minimize risk to existing system
1619
+ - Include rollback considerations for each story
1620
+ - Focus on incremental integration rather than big-bang changes
1621
+ - Size stories for AI agent execution in existing codebase context
1622
+ - MANDATORY: Present the complete story sequence and ask: "This story sequence is designed to minimize risk to your existing system. Does this order make sense given your project's architecture and constraints?"
1623
+ - Stories must be logically sequential with clear dependencies identified
1624
+ - Each story must deliver value while maintaining system integrity
1625
+ template: |
1626
+ **Epic Goal**: {{epic_goal}}
1627
+
1628
+ **Integration Requirements**: {{integration_requirements}}
1629
+ sections:
1630
+ - id: story
1631
+ title: "Story 1.{{story_number}} {{story_title}}"
1632
+ repeatable: true
1633
+ template: |
1634
+ As a {{user_type}},
1635
+ I want {{action}},
1636
+ so that {{benefit}}.
1637
+ sections:
1638
+ - id: acceptance-criteria
1639
+ title: Acceptance Criteria
1640
+ type: numbered-list
1641
+ instruction: Define criteria that include both new functionality and existing system integrity
1642
+ item_template: "{{criterion_number}}: {{criteria}}"
1643
+ - id: integration-verification
1644
+ title: Integration Verification
1645
+ instruction: Specific verification steps to ensure existing functionality remains intact
1646
+ type: numbered-list
1647
+ prefix: IV
1648
+ items:
1649
+ - template: "IV1: {{existing_functionality_verification}}"
1650
+ - template: "IV2: {{integration_point_verification}}"
1651
+ - template: "IV3: {{performance_impact_verification}}"
1652
+ ==================== END: .bmad-core/templates/brownfield-prd-tmpl.yaml ====================
1654
1653
 
1655
1654
  ==================== START: .bmad-core/checklists/pm-checklist.md ====================
1656
1655
  # Product Manager (PM) Requirements Checklist
@@ -2220,32 +2219,3 @@ Keep it action-oriented and forward-looking.]]
2220
2219
 
2221
2220
  None Listed
2222
2221
  ==================== END: .bmad-core/data/technical-preferences.md ====================
2223
-
2224
- ==================== START: .bmad-core/utils/template-format.md ====================
2225
- # Template Format Conventions
2226
-
2227
- Templates in the BMad method use standardized markup for AI processing. These conventions ensure consistent document generation.
2228
-
2229
- ## Template Markup Elements
2230
-
2231
- - **{{placeholders}}**: Variables to be replaced with actual content
2232
- - **[[LLM: instructions]]**: Internal processing instructions for AI agents (never shown to users)
2233
- - **REPEAT** sections: Content blocks that may be repeated as needed
2234
- - **^^CONDITION^^** blocks: Conditional content included only if criteria are met
2235
- - **@{examples}**: Example content for guidance (never output to users)
2236
-
2237
- ## Processing Rules
2238
-
2239
- - Replace all {{placeholders}} with project-specific content
2240
- - Execute all [[LLM: instructions]] internally without showing users
2241
- - Process conditional and repeat blocks as specified
2242
- - Use examples for guidance but never include them in final output
2243
- - Present only clean, formatted content to users
2244
-
2245
- ## Critical Guidelines
2246
-
2247
- - **NEVER display template markup, LLM instructions, or examples to users**
2248
- - Template elements are for AI processing only
2249
- - Focus on faithful template execution and clean output
2250
- - All template-specific instructions are embedded within templates
2251
- ==================== END: .bmad-core/utils/template-format.md ====================