bmad-method 4.26.0 → 4.27.0

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 (55) hide show
  1. package/.vscode/settings.json +2 -0
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +29 -282
  4. package/bmad-core/agents/analyst.md +3 -1
  5. package/bmad-core/agents/bmad-master.md +5 -1
  6. package/bmad-core/agents/bmad-orchestrator.md +1 -1
  7. package/bmad-core/core-config.yaml +1 -1
  8. package/bmad-core/data/bmad-kb.md +74 -15
  9. package/bmad-core/data/brainstorming-techniques.md +36 -0
  10. package/bmad-core/data/elicitation-methods.md +134 -0
  11. package/bmad-core/tasks/advanced-elicitation.md +82 -57
  12. package/bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
  13. package/bmad-core/templates/architecture-tmpl.md +23 -23
  14. package/bmad-core/templates/brainstorming-output-tmpl.md +149 -0
  15. package/bmad-core/templates/prd-tmpl.md +6 -6
  16. package/bmad-core/templates/prd-tmpl2.yaml +202 -0
  17. package/bmad-core/utils/plan-management.md +9 -13
  18. package/bmad-core/workflows/greenfield-service.yaml +1 -1
  19. package/common/tasks/create-doc.md +4 -4
  20. package/common/tasks/create-doc2.md +65 -0
  21. package/common/utils/bmad-doc-template.md +296 -0
  22. package/dist/agents/analyst.txt +481 -305
  23. package/dist/agents/architect.txt +60 -59
  24. package/dist/agents/bmad-master.txt +694 -399
  25. package/dist/agents/bmad-orchestrator.txt +197 -116
  26. package/dist/agents/dev.txt +18 -17
  27. package/dist/agents/pm.txt +47 -46
  28. package/dist/agents/po.txt +31 -30
  29. package/dist/agents/qa.txt +15 -14
  30. package/dist/agents/sm.txt +23 -22
  31. package/dist/agents/ux-expert.txt +29 -28
  32. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +33 -32
  33. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +19 -18
  34. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +21 -20
  35. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +385 -297
  36. package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +103 -77
  37. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +29 -28
  38. package/dist/teams/team-all.txt +610 -438
  39. package/dist/teams/team-fullstack.txt +597 -425
  40. package/dist/teams/team-ide-minimal.txt +238 -157
  41. package/dist/teams/team-no-ui.txt +583 -411
  42. package/docs/agentic-tools/github-copilot-guide.md +29 -9
  43. package/docs/bmad-workflow-guide.md +2 -2
  44. package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
  45. package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +2 -2
  46. package/expansion-packs/bmad-creator-tools/config.yaml +1 -1
  47. package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
  48. package/package.json +1 -1
  49. package/tools/builders/web-builder.js +117 -22
  50. package/tools/installer/config/install.config.yaml +2 -2
  51. package/tools/installer/lib/ide-setup.js +2 -2
  52. package/tools/installer/package.json +1 -1
  53. package/tools/lib/dependency-resolver.js +3 -3
  54. package/tools/md-assets/web-agent-startup-instructions.md +10 -10
  55. package/bmad-core/tasks/brainstorming-techniques.md +0 -238
@@ -0,0 +1,296 @@
1
+ # BMad Document Template Specification
2
+
3
+ ## Overview
4
+
5
+ BMad document templates are defined in YAML format to drive interactive document generation and agent interaction. Templates separate structure definition from content generation, making them both human and LLM-agent-friendly.
6
+
7
+ ## Template Structure
8
+
9
+ ```yaml
10
+ template:
11
+ id: template-identifier
12
+ name: Human Readable Template Name
13
+ version: 1.0
14
+ output:
15
+ format: markdown
16
+ filename: default-path/to/{{filename}}.md
17
+ title: "{{variable}} Document Title"
18
+
19
+ workflow:
20
+ mode: interactive
21
+ elicitation: advanced-elicitation
22
+
23
+ sections:
24
+ - id: section-id
25
+ title: Section Title
26
+ instruction: |
27
+ Detailed instructions for the LLM on how to handle this section
28
+ # ... additional section properties
29
+ ```
30
+
31
+ ## Core Fields
32
+
33
+ ### Template Metadata
34
+
35
+ - **id**: Unique identifier for the template
36
+ - **name**: Human-readable name displayed in UI
37
+ - **version**: Template version for tracking changes
38
+ - **output.format**: Default "markdown" for document templates
39
+ - **output.filename**: Default output file path (can include variables)
40
+ - **output.title**: Document title (becomes H1 in markdown)
41
+
42
+ ### Workflow Configuration
43
+
44
+ - **workflow.mode**: Default interaction mode ("interactive" or "yolo")
45
+ - **workflow.elicitation**: Elicitation task to use ("advanced-elicitation")
46
+
47
+ ## Section Properties
48
+
49
+ ### Required Fields
50
+
51
+ - **id**: Unique section identifier
52
+ - **title**: Section heading text
53
+ - **instruction**: Detailed guidance for LLM on handling this section
54
+
55
+ ### Optional Fields
56
+
57
+ #### Content Control
58
+
59
+ - **type**: Content type hint for structured sections
60
+ - **template**: Fixed template text for section content
61
+ - **item_template**: Template for repeatable items within section
62
+ - **prefix**: Prefix for numbered items (e.g., "FR", "NFR")
63
+
64
+ #### Behavior Flags
65
+
66
+ - **elicit**: Boolean - Apply elicitation after section rendered
67
+ - **repeatable**: Boolean - Section can be repeated multiple times
68
+ - **condition**: String - Condition for including section (e.g., "has ui requirements")
69
+
70
+ #### Content Guidance
71
+
72
+ - **examples**: Array of example content (not included in output)
73
+ - **choices**: Object with choice options for common decisions
74
+ - **placeholder**: Default placeholder text
75
+
76
+ #### Structure
77
+
78
+ - **sections**: Array of nested child sections
79
+
80
+ ## Supported Types
81
+
82
+ ### Content Types
83
+
84
+ - **bullet-list**: Unordered list items
85
+ - **numbered-list**: Ordered list with optional prefix
86
+ - **paragraphs**: Free-form paragraph text
87
+ - **table**: Structured table data
88
+ - **code-block**: Code or configuration blocks
89
+ - **template-text**: Fixed template with variable substitution
90
+ - **mermaid**: Mermaid diagram with specified type and details
91
+
92
+ ### Special Types
93
+
94
+ - **repeatable-container**: Container for multiple instances
95
+ - **conditional-block**: Content shown based on conditions
96
+ - **choice-selector**: Present choices to user
97
+
98
+ ## Advanced Features
99
+
100
+ ### Variable Substitution
101
+
102
+ Use `{{variable_name}}` in titles, templates, and content:
103
+
104
+ ```yaml
105
+ title: "Epic {{epic_number}} {{epic_title}}"
106
+ template: "As a {{user_type}}, I want {{action}}, so that {{benefit}}."
107
+ ```
108
+
109
+ ### Conditional Sections
110
+
111
+ ```yaml
112
+ - id: ui-section
113
+ title: User Interface Design
114
+ condition: Project has UX/UI Requirements
115
+ instruction: Only include if project has UI components
116
+ ```
117
+
118
+ ### Choice Integration
119
+
120
+ ```yaml
121
+ choices:
122
+ architecture: [Monolith, Microservices, Serverless]
123
+ testing: [Unit Only, Unit + Integration, Full Pyramid]
124
+ ```
125
+
126
+ ### Mermaid Diagrams
127
+
128
+ ```yaml
129
+ - id: system-architecture
130
+ title: System Architecture Diagram
131
+ type: mermaid
132
+ instruction: Create a system architecture diagram showing key components and data flow
133
+ mermaid_type: flowchart
134
+ details: |
135
+ Show the following components:
136
+ - User interface layer
137
+ - API gateway
138
+ - Core services
139
+ - Database layer
140
+ - External integrations
141
+ ```
142
+
143
+ **Supported mermaid_type values:**
144
+
145
+ **Core Diagram Types:**
146
+
147
+ - `flowchart` - Flow charts and process diagrams
148
+ - `sequenceDiagram` - Sequence diagrams for interactions
149
+ - `classDiagram` - Class relationship diagrams (UML)
150
+ - `stateDiagram` - State transition diagrams
151
+ - `erDiagram` - Entity relationship diagrams
152
+ - `gantt` - Gantt charts for timelines
153
+ - `pie` - Pie charts for data visualization
154
+
155
+ **Advanced Diagram Types:**
156
+
157
+ - `journey` - User journey maps
158
+ - `mindmap` - Mindmaps for brainstorming
159
+ - `timeline` - Timeline diagrams for chronological events
160
+ - `quadrantChart` - Quadrant charts for data categorization
161
+ - `xyChart` - XY charts (bar charts, line charts)
162
+ - `sankey` - Sankey diagrams for flow visualization
163
+
164
+ **Specialized Types:**
165
+
166
+ - `c4Context` - C4 context diagrams (experimental)
167
+ - `requirement` - Requirement diagrams
168
+ - `packet` - Network packet diagrams
169
+ - `block` - Block diagrams
170
+ - `kanban` - Kanban boards
171
+
172
+ ### Repeatable Sections
173
+
174
+ ```yaml
175
+ - id: epic-details
176
+ title: Epic {{epic_number}} {{epic_title}}
177
+ repeatable: true
178
+ sections:
179
+ - id: story
180
+ title: Story {{epic_number}}.{{story_number}} {{story_title}}
181
+ repeatable: true
182
+ sections:
183
+ - id: criteria
184
+ title: Acceptance Criteria
185
+ type: numbered-list
186
+ item_template: "{{criterion_number}}: {{criteria}}"
187
+ repeatable: true
188
+ ```
189
+
190
+ ### Examples with Code Blocks
191
+
192
+ ````yaml
193
+ examples:
194
+ - "FR6: The system must authenticate users within 2 seconds"
195
+ - |
196
+ ```mermaid
197
+ sequenceDiagram
198
+ participant User
199
+ participant API
200
+ participant DB
201
+ User->>API: POST /login
202
+ API->>DB: Validate credentials
203
+ DB-->>API: User data
204
+ API-->>User: JWT token
205
+ ```
206
+ - |
207
+ **Architecture Decision Record**
208
+
209
+ **Decision**: Use PostgreSQL for primary database
210
+ **Rationale**: ACID compliance and JSON support needed
211
+ **Consequences**: Requires database management expertise
212
+ ````
213
+
214
+ ## Section Hierarchy
215
+
216
+ Templates define the complete document structure starting with the first H2 - each level in is the next H#:
217
+
218
+ ```yaml
219
+ sections:
220
+ - id: overview
221
+ title: Project Overview
222
+ sections:
223
+ - id: goals
224
+ title: Goals
225
+ - id: scope
226
+ title: Scope
227
+ sections:
228
+ - id: in-scope
229
+ title: In Scope
230
+ - id: out-scope
231
+ title: Out of Scope
232
+ ```
233
+
234
+ ## Processing Flow
235
+
236
+ 1. **Parse Template**: Load and validate YAML structure
237
+ 2. **Initialize Workflow**: Set interaction mode and elicitation
238
+ 3. **Process Sections**: Handle each section in order:
239
+ - Check conditions
240
+ - Apply instructions
241
+ - Generate content
242
+ - Handle choices and variables
243
+ - Apply elicitation if specified
244
+ - Process nested sections
245
+ 4. **Generate Output**: Create clean markdown document
246
+
247
+ ## Best Practices
248
+
249
+ ### Template Design
250
+
251
+ - Keep instructions clear and specific
252
+ - Use examples for complex content
253
+ - Structure sections logically
254
+ - Include all necessary guidance for LLM
255
+
256
+ ### Content Instructions
257
+
258
+ - Be explicit about expected format
259
+ - Include reasoning for decisions
260
+ - Specify interaction patterns
261
+ - Reference other documents when needed
262
+
263
+ ### Variable Naming
264
+
265
+ - Use descriptive variable names
266
+ - Follow consistent naming conventions
267
+ - Document expected variable values
268
+
269
+ ### Examples Usage
270
+
271
+ - Provide concrete examples for complex sections
272
+ - Include both simple and complex cases
273
+ - Use realistic project scenarios
274
+ - Include code blocks and diagrams when helpful
275
+
276
+ ## Validation
277
+
278
+ Templates should be validated for:
279
+
280
+ - Valid YAML syntax
281
+ - Required fields present
282
+ - Consistent section IDs
283
+ - Proper nesting structure
284
+ - Valid variable references
285
+
286
+ ## Migration from Legacy
287
+
288
+ When converting from markdown+frontmatter templates:
289
+
290
+ 1. Extract embedded `[[LLM:]]` instructions to `instruction` fields
291
+ 2. Convert `<<REPEAT>>` blocks to `repeatable: true` sections
292
+ 3. Extract `^^CONDITIONS^^` to `condition` fields
293
+ 4. Move `@{examples}` to `examples` arrays
294
+ 5. Convert `{{placeholders}}` to proper variable syntax
295
+
296
+ This specification ensures templates are both human-readable and machine-processable while maintaining the flexibility needed for complex document generation.