bmad-method 6.0.0-alpha.10 → 6.0.0-alpha.11

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 (107) hide show
  1. package/CHANGELOG.md +215 -1109
  2. package/README.md +129 -359
  3. package/docs/custom-agent-installation.md +169 -0
  4. package/{v6-open-items.md → docs/v6-open-items.md} +1 -1
  5. package/package.json +2 -1
  6. package/src/core/resources/excalidraw/README.md +160 -0
  7. package/src/core/resources/excalidraw/library-loader.md +50 -0
  8. package/src/modules/bmb/docs/agent-compilation.md +340 -0
  9. package/src/modules/bmb/docs/agent-menu-patterns.md +524 -0
  10. package/src/modules/bmb/docs/expert-agent-architecture.md +364 -0
  11. package/src/modules/bmb/docs/index.md +55 -0
  12. package/src/modules/bmb/docs/module-agent-architecture.md +367 -0
  13. package/src/modules/bmb/docs/simple-agent-architecture.md +288 -0
  14. package/src/modules/bmb/docs/understanding-agent-types.md +184 -0
  15. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +242 -0
  16. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
  17. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
  18. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
  19. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
  20. package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
  21. package/src/modules/bmb/reference/agents/module-examples/README.md +50 -0
  22. package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
  23. package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
  24. package/src/modules/bmb/reference/agents/simple-examples/README.md +223 -0
  25. package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
  26. package/src/modules/bmb/reference/readme.md +3 -0
  27. package/src/modules/bmb/workflows/create-agent/agent-validation-checklist.md +174 -0
  28. package/src/modules/bmb/workflows/create-agent/brainstorm-context.md +99 -120
  29. package/src/modules/bmb/workflows/create-agent/communication-presets.csv +61 -0
  30. package/src/modules/bmb/workflows/create-agent/instructions.md +126 -65
  31. package/src/modules/bmb/workflows/create-agent/workflow.yaml +19 -12
  32. package/src/modules/bmb/workflows/edit-agent/README.md +174 -47
  33. package/src/modules/bmb/workflows/edit-agent/instructions.md +397 -33
  34. package/src/modules/bmb/workflows/edit-agent/workflow.yaml +24 -8
  35. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +1 -1
  36. package/src/modules/bmm/agents/analyst.agent.yaml +2 -2
  37. package/src/modules/bmm/agents/architect.agent.yaml +10 -2
  38. package/src/modules/bmm/agents/dev.agent.yaml +2 -2
  39. package/src/modules/bmm/agents/pm.agent.yaml +7 -3
  40. package/src/modules/bmm/agents/sm.agent.yaml +2 -2
  41. package/src/modules/bmm/agents/tea.agent.yaml +2 -2
  42. package/src/modules/bmm/agents/tech-writer.agent.yaml +15 -3
  43. package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -2
  44. package/src/modules/bmm/docs/README.md +4 -0
  45. package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +5919 -0
  46. package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +2 -0
  47. package/src/modules/bmm/docs/quick-start.md +6 -0
  48. package/src/modules/bmm/docs/scale-adaptive-system.md +6 -0
  49. package/src/modules/bmm/docs/workflows-implementation.md +10 -0
  50. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +4 -4
  51. package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/workflow.yaml +5 -5
  52. package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +1 -1
  53. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/instructions.md +7 -8
  54. package/src/modules/bmm/workflows/diagrams/create-dataflow/workflow.yaml +27 -0
  55. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/instructions.md +9 -10
  56. package/src/modules/bmm/workflows/diagrams/create-diagram/workflow.yaml +27 -0
  57. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/instructions.md +4 -5
  58. package/src/modules/bmm/workflows/diagrams/create-flowchart/workflow.yaml +27 -0
  59. package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/instructions.md +3 -3
  60. package/src/modules/bmm/workflows/diagrams/create-wireframe/workflow.yaml +27 -0
  61. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +18 -30
  62. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +2 -14
  63. package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +2 -14
  64. package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +2 -14
  65. package/src/modules/cis/agents/presentation-master.agent.yaml +60 -0
  66. package/tools/cli/commands/agent-install.js +409 -0
  67. package/tools/cli/installers/lib/core/installer.js +119 -0
  68. package/tools/cli/installers/lib/ide/_base-ide.js +25 -0
  69. package/tools/cli/installers/lib/ide/antigravity.js +463 -0
  70. package/tools/cli/installers/lib/ide/claude-code.js +43 -0
  71. package/tools/cli/installers/lib/ide/codex.js +217 -32
  72. package/tools/cli/installers/lib/ide/cursor.js +48 -0
  73. package/tools/cli/installers/lib/ide/github-copilot.js +74 -0
  74. package/tools/cli/installers/lib/ide/manager.js +35 -0
  75. package/tools/cli/installers/lib/ide/opencode.js +45 -0
  76. package/tools/cli/installers/lib/ide/windsurf.js +47 -0
  77. package/tools/cli/lib/agent/compiler.js +390 -0
  78. package/tools/cli/lib/agent/installer.js +725 -0
  79. package/tools/cli/lib/agent/template-engine.js +152 -0
  80. package/docs/installers-bundlers/web-bundler-usage.md +0 -54
  81. package/src/modules/bmb/workflows/create-agent/README.md +0 -203
  82. package/src/modules/bmb/workflows/create-agent/agent-architecture.md +0 -415
  83. package/src/modules/bmb/workflows/create-agent/agent-command-patterns.md +0 -759
  84. package/src/modules/bmb/workflows/create-agent/agent-types.md +0 -292
  85. package/src/modules/bmb/workflows/create-agent/checklist.md +0 -62
  86. package/src/modules/bmb/workflows/create-agent/communication-styles.md +0 -202
  87. package/src/modules/bmb/workflows/edit-agent/checklist.md +0 -112
  88. package/src/modules/bmb/workflows/redoc/README.md +0 -87
  89. package/src/modules/bmb/workflows/redoc/checklist.md +0 -99
  90. package/src/modules/bmb/workflows/redoc/instructions.md +0 -265
  91. package/src/modules/bmb/workflows/redoc/workflow.yaml +0 -34
  92. package/src/modules/bmm/agents/frame-expert.agent.yaml +0 -42
  93. package/src/modules/bmm/workflows/frame-expert/create-dataflow/workflow.yaml +0 -24
  94. package/src/modules/bmm/workflows/frame-expert/create-diagram/workflow.yaml +0 -25
  95. package/src/modules/bmm/workflows/frame-expert/create-flowchart/workflow.yaml +0 -28
  96. package/src/modules/bmm/workflows/frame-expert/create-wireframe/workflow.yaml +0 -24
  97. package/src/modules/bmm/workflows/workflow-status/paths/game-design.yaml +0 -52
  98. /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/excalidraw-helpers.md +0 -0
  99. /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/validate-json-instructions.md +0 -0
  100. /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/epics-template.md +0 -0
  101. /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/instructions.md +0 -0
  102. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-library.json +0 -0
  103. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-templates.yaml +0 -0
  104. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/checklist.md +0 -0
  105. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/checklist.md +0 -0
  106. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/checklist.md +0 -0
  107. /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/checklist.md +0 -0
@@ -1,759 +0,0 @@
1
- # BMAD Agent Command Patterns Reference
2
-
3
- _LLM-Optimized Guide for Command Design_
4
-
5
- ## Important: How to Process Action References
6
-
7
- When executing agent commands, understand these reference patterns:
8
-
9
- ```xml
10
- <!-- Pattern 1: Inline action -->
11
- <item cmd="*example" action="do this specific thing">Description</item>
12
- → Execute the text "do this specific thing" directly
13
-
14
- <!-- Pattern 2: Internal reference with # prefix -->
15
- <item cmd="*example" action="#prompt-id">Description</item>
16
- → Find <prompt id="prompt-id"> in the current agent and execute its content
17
-
18
- <!-- Pattern 3: External file reference -->
19
- <item cmd="*example" exec="{project-root}/path/to/file.md">Description</item>
20
- → Load and execute the external file
21
- ```
22
-
23
- **The `#` prefix is your signal that this is an internal XML node reference, not a file path.**
24
-
25
- ## Command Anatomy
26
-
27
- ### Basic Structure
28
-
29
- ```xml
30
- <menu>
31
- <item cmd="*trigger" [attributes]>Description</item>
32
- </menu>
33
- ```
34
-
35
- **Components:**
36
-
37
- - `cmd` - The trigger word (always starts with \*)
38
- - `attributes` - Action directives (optional):
39
- - `run-workflow` - Path to workflow YAML
40
- - `exec` - Path to task/operation
41
- - `tmpl` - Path to template (used with exec)
42
- - `action` - Embedded prompt/instruction
43
- - `data` - Path to supplementary data (universal)
44
- - `Description` - What shows in menu
45
-
46
- ## Command Types
47
-
48
- **Quick Reference:**
49
-
50
- 1. **Workflow Commands** - Execute multi-step workflows (`run-workflow`)
51
- 2. **Task Commands** - Execute single operations (`exec`)
52
- 3. **Template Commands** - Generate from templates (`exec` + `tmpl`)
53
- 4. **Meta Commands** - Agent control (no attributes)
54
- 5. **Action Commands** - Embedded prompts (`action`)
55
- 6. **Embedded Commands** - Logic in persona (no attributes)
56
-
57
- **Universal Attributes:**
58
-
59
- - `data` - Can be added to ANY command type for supplementary info
60
- - `if` - Conditional execution (advanced pattern)
61
- - `params` - Runtime parameters (advanced pattern)
62
-
63
- ### 1. Workflow Commands
64
-
65
- Execute complete multi-step processes
66
-
67
- ```xml
68
- <!-- Standard workflow -->
69
- <item cmd="*create-prd"
70
- run-workflow="{project-root}/{bmad_folder}/bmm/workflows/prd/workflow.yaml">
71
- Create Product Requirements Document
72
- </item>
73
-
74
- <!-- Workflow with validation -->
75
- <item cmd="*validate-prd"
76
- validate-workflow="{output_folder}/prd-draft.md"
77
- workflow="{project-root}/{bmad_folder}/bmm/workflows/prd/workflow.yaml">
78
- Validate PRD Against Checklist
79
- </item>
80
-
81
- <!-- Auto-discover validation workflow from document -->
82
- <item cmd="*validate-doc"
83
- validate-workflow="{output_folder}/document.md">
84
- Validate Document (auto-discover checklist)
85
- </item>
86
-
87
- <!-- Placeholder for future development -->
88
- <item cmd="*analyze-data"
89
- run-workflow="todo">
90
- Analyze dataset (workflow coming soon)
91
- </item>
92
- ```
93
-
94
- **Workflow Attributes:**
95
-
96
- - `run-workflow` - Execute a workflow to create documents
97
- - `validate-workflow` - Validate an existing document against its checklist
98
- - `workflow` - (optional with validate-workflow) Specify the workflow.yaml directly
99
-
100
- **Best Practices:**
101
-
102
- - Use descriptive trigger names
103
- - Always use variable paths
104
- - Mark incomplete as "todo"
105
- - Description should be clear action
106
- - Include validation commands for workflows that produce documents
107
-
108
- ### 2. Task Commands
109
-
110
- Execute single operations
111
-
112
- ```xml
113
- <!-- Simple task -->
114
- <item cmd="*validate"
115
- exec="{project-root}/{bmad_folder}/core/tasks/validate-workflow.xml">
116
- Validate document against checklist
117
- </item>
118
-
119
- <!-- Task with data -->
120
- <item cmd="*standup"
121
- exec="{project-root}/{bmad_folder}/mmm/tasks/daily-standup.xml"
122
- data="{project-root}/{bmad_folder}/_cfg/agent-manifest.csv">
123
- Run agile team standup
124
- </item>
125
- ```
126
-
127
- **Data Property:**
128
-
129
- - Can be used with any command type
130
- - Provides additional reference or context
131
- - Path to supplementary files or resources
132
- - Loaded at runtime for command execution
133
-
134
- ### 3. Template Commands
135
-
136
- Generate documents from templates
137
-
138
- ```xml
139
- <item cmd="*brief"
140
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
141
- tmpl="{project-root}/{bmad_folder}/bmm/templates/brief.md">
142
- Produce Project Brief
143
- </item>
144
-
145
- <item cmd="*competitor-analysis"
146
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
147
- tmpl="{project-root}/{bmad_folder}/bmm/templates/competitor.md"
148
- data="{project-root}/{bmad_folder}/_data/market-research.csv">
149
- Produce Competitor Analysis
150
- </item>
151
- ```
152
-
153
- ### 4. Meta Commands
154
-
155
- Agent control and information
156
-
157
- ```xml
158
- <!-- Required meta commands -->
159
- <item cmd="*help">Show numbered cmd list</item>
160
- <item cmd="*exit">Exit with confirmation</item>
161
-
162
- <!-- Optional meta commands -->
163
- <item cmd="*yolo">Toggle Yolo Mode</item>
164
- <item cmd="*status">Show current status</item>
165
- <item cmd="*config">Show configuration</item>
166
- ```
167
-
168
- ### 5. Action Commands
169
-
170
- Direct prompts embedded in commands (Simple agents)
171
-
172
- #### Simple Action (Inline)
173
-
174
- ```xml
175
- <!-- Short action attribute with embedded prompt -->
176
- <item cmd="*list-tasks"
177
- action="list all tasks from {project-root}/{bmad_folder}/_cfg/task-manifest.csv">
178
- List Available Tasks
179
- </item>
180
-
181
- <item cmd="*summarize"
182
- action="summarize the key points from the current document">
183
- Summarize Document
184
- </item>
185
- ```
186
-
187
- #### Complex Action (Referenced)
188
-
189
- For multiline/complex prompts, define them separately and reference by id:
190
-
191
- ```xml
192
- <agent name="Research Assistant">
193
- <!-- Define complex prompts as separate nodes -->
194
- <prompts>
195
- <prompt id="deep-analysis">
196
- Perform a comprehensive analysis following these steps:
197
- 1. Identify the main topic and key themes
198
- 2. Extract all supporting evidence and data points
199
- 3. Analyze relationships between concepts
200
- 4. Identify gaps or contradictions
201
- 5. Generate insights and recommendations
202
- 6. Create an executive summary
203
- Format the output with clear sections and bullet points.
204
- </prompt>
205
-
206
- <prompt id="literature-review">
207
- Conduct a systematic literature review:
208
- 1. Summarize each source's main arguments
209
- 2. Compare and contrast different perspectives
210
- 3. Identify consensus points and controversies
211
- 4. Evaluate the quality and relevance of sources
212
- 5. Synthesize findings into coherent themes
213
- 6. Highlight research gaps and future directions
214
- Include proper citations and references.
215
- </prompt>
216
- </prompts>
217
-
218
- <!-- Commands reference the prompts by id -->
219
- <menu>
220
- <item cmd="*help">Show numbered cmd list</item>
221
-
222
- <item cmd="*deep-analyze"
223
- action="#deep-analysis">
224
- <!-- The # means: use the <prompt id="deep-analysis"> defined above -->
225
- Perform Deep Analysis
226
- </item>
227
-
228
- <item cmd="*review-literature"
229
- action="#literature-review"
230
- data="{project-root}/{bmad_folder}/_data/sources.csv">
231
- Conduct Literature Review
232
- </item>
233
-
234
- <item cmd="*exit">Exit with confirmation</item>
235
- </menu>
236
- </agent>
237
- ```
238
-
239
- **Reference Convention:**
240
-
241
- - `action="#prompt-id"` means: "Find and execute the <prompt> node with id='prompt-id' within this agent"
242
- - `action="inline text"` means: "Execute this text directly as the prompt"
243
- - `exec="{path}"` means: "Load and execute external file at this path"
244
- - The `#` prefix signals to the LLM: "This is an internal reference - look for a prompt node with this ID within the current agent XML"
245
-
246
- **LLM Processing Instructions:**
247
- When you see `action="#some-id"` in a command:
248
-
249
- 1. Look for `<prompt id="some-id">` within the same agent
250
- 2. Use the content of that prompt node as the instruction
251
- 3. If not found, report error: "Prompt 'some-id' not found in agent"
252
-
253
- **Use Cases:**
254
-
255
- - Quick operations (inline action)
256
- - Complex multi-step processes (referenced prompt)
257
- - Self-contained agents with task-like capabilities
258
- - Reusable prompt templates within agent
259
-
260
- ### 6. Embedded Commands
261
-
262
- Logic embedded in agent persona (Simple agents)
263
-
264
- ```xml
265
- <!-- No exec/run-workflow/action attribute -->
266
- <item cmd="*calculate">Perform calculation</item>
267
- <item cmd="*convert">Convert format</item>
268
- <item cmd="*generate">Generate output</item>
269
- ```
270
-
271
- ## Command Naming Conventions
272
-
273
- ### Action-Based Naming
274
-
275
- ```xml
276
- *create- <!-- Generate new content -->
277
- *build- <!-- Construct components -->
278
- *analyze- <!-- Examine and report -->
279
- *validate- <!-- Check correctness -->
280
- *generate- <!-- Produce output -->
281
- *update- <!-- Modify existing -->
282
- *review- <!-- Examine quality -->
283
- *test- <!-- Verify functionality -->
284
- ```
285
-
286
- ### Domain-Based Naming
287
-
288
- ```xml
289
- *brainstorm <!-- Creative ideation -->
290
- *architect <!-- Design systems -->
291
- *refactor <!-- Improve code -->
292
- *deploy <!-- Release to production -->
293
- *monitor <!-- Watch systems -->
294
- ```
295
-
296
- ### Naming Anti-Patterns
297
-
298
- ```xml
299
- <!-- ❌ Too vague -->
300
- <item cmd="*do">Do something</item>
301
-
302
- <!-- ❌ Too long -->
303
- <item cmd="*create-comprehensive-product-requirements-document-with-analysis">
304
-
305
- <!-- ❌ No verb -->
306
- <item cmd="*prd">Product Requirements</item>
307
-
308
- <!-- ✅ Clear and concise -->
309
- <item cmd="*create-prd">Create Product Requirements Document</item>
310
- ```
311
-
312
- ## Command Organization
313
-
314
- ### Standard Order
315
-
316
- ```xml
317
- <menu>
318
- <!-- 1. Always first -->
319
- <item cmd="*help">Show numbered cmd list</item>
320
-
321
- <!-- 2. Primary workflows -->
322
- <item cmd="*create-prd" run-workflow="...">Create PRD</item>
323
- <item cmd="*create-module" run-workflow="...">Build module</item>
324
-
325
- <!-- 3. Secondary actions -->
326
- <item cmd="*validate" exec="...">Validate document</item>
327
- <item cmd="*analyze" exec="...">Analyze code</item>
328
-
329
- <!-- 4. Utility commands -->
330
- <item cmd="*config">Show configuration</item>
331
- <item cmd="*yolo">Toggle Yolo Mode</item>
332
-
333
- <!-- 5. Always last -->
334
- <item cmd="*exit">Exit with confirmation</item>
335
- </menu>
336
- ```
337
-
338
- ### Grouping Strategies
339
-
340
- **By Lifecycle:**
341
-
342
- ```xml
343
- <menu>
344
- <item cmd="*help">Help</item>
345
- <!-- Planning -->
346
- <item cmd="*brainstorm">Brainstorm ideas</item>
347
- <item cmd="*plan">Create plan</item>
348
- <!-- Building -->
349
- <item cmd="*build">Build component</item>
350
- <item cmd="*test">Test component</item>
351
- <!-- Deployment -->
352
- <item cmd="*deploy">Deploy to production</item>
353
- <item cmd="*monitor">Monitor system</item>
354
- <item cmd="*exit">Exit</item>
355
- </menu>
356
- ```
357
-
358
- **By Complexity:**
359
-
360
- ```xml
361
- <menu>
362
- <item cmd="*help">Help</item>
363
- <!-- Simple -->
364
- <item cmd="*quick-review">Quick review</item>
365
- <!-- Standard -->
366
- <item cmd="*create-doc">Create document</item>
367
- <!-- Complex -->
368
- <item cmd="*full-analysis">Comprehensive analysis</item>
369
- <item cmd="*exit">Exit</item>
370
- </menu>
371
- ```
372
-
373
- ## Command Descriptions
374
-
375
- ### Good Descriptions
376
-
377
- ```xml
378
- <!-- Clear action and object -->
379
- <item cmd="*create-prd">Create Product Requirements Document</item>
380
-
381
- <!-- Specific outcome -->
382
- <item cmd="*analyze-security">Perform security vulnerability analysis</item>
383
-
384
- <!-- User benefit -->
385
- <item cmd="*optimize">Optimize code for performance</item>
386
- ```
387
-
388
- ### Poor Descriptions
389
-
390
- ```xml
391
- <!-- Too vague -->
392
- <item cmd="*process">Process</item>
393
-
394
- <!-- Technical jargon -->
395
- <item cmd="*exec-wf-123">Execute WF123</item>
396
-
397
- <!-- Missing context -->
398
- <item cmd="*run">Run</item>
399
- ```
400
-
401
- ## The Data Property
402
-
403
- ### Universal Data Attribute
404
-
405
- The `data` attribute can be added to ANY command type to provide supplementary information:
406
-
407
- ```xml
408
- <!-- Workflow with data -->
409
- <item cmd="*brainstorm"
410
- run-workflow="{project-root}/{bmad_folder}/core/workflows/brainstorming/workflow.yaml"
411
- data="{project-root}/{bmad_folder}/core/workflows/brainstorming/brain-methods.csv">
412
- Creative Brainstorming Session
413
- </item>
414
-
415
- <!-- Action with data -->
416
- <item cmd="*analyze-metrics"
417
- action="analyze these metrics and identify trends"
418
- data="{project-root}/{bmad_folder}/_data/performance-metrics.json">
419
- Analyze Performance Metrics
420
- </item>
421
-
422
- <!-- Template with data -->
423
- <item cmd="*report"
424
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
425
- tmpl="{project-root}/{bmad_folder}/bmm/templates/report.md"
426
- data="{project-root}/{bmad_folder}/_data/quarterly-results.csv">
427
- Generate Quarterly Report
428
- </item>
429
- ```
430
-
431
- **Common Data Uses:**
432
-
433
- - Reference tables (CSV files)
434
- - Configuration data (YAML/JSON)
435
- - Agent manifests (XML)
436
- - Historical context
437
- - Domain knowledge
438
- - Examples and patterns
439
-
440
- ## Advanced Patterns
441
-
442
- ### Conditional Commands
443
-
444
- ```xml
445
- <!-- Only show if certain conditions met -->
446
- <item cmd="*advanced-mode"
447
- if="user_level == 'expert'"
448
- run-workflow="...">
449
- Advanced configuration mode
450
- </item>
451
-
452
- <!-- Environment specific -->
453
- <item cmd="*deploy-prod"
454
- if="environment == 'production'"
455
- exec="...">
456
- Deploy to production
457
- </item>
458
- ```
459
-
460
- ### Parameterized Commands
461
-
462
- ```xml
463
- <!-- Accept runtime parameters -->
464
- <item cmd="*create-agent"
465
- run-workflow="..."
466
- params="agent_type,agent_name">
467
- Create new agent with parameters
468
- </item>
469
- ```
470
-
471
- ### Command Aliases
472
-
473
- ```xml
474
- <!-- Multiple triggers for same action -->
475
- <item cmd="*prd|*create-prd|*product-requirements"
476
- run-workflow="...">
477
- Create Product Requirements Document
478
- </item>
479
- ```
480
-
481
- ## Module-Specific Patterns
482
-
483
- ### BMM (Business Management)
484
-
485
- ```xml
486
- <item cmd="*create-prd">Product Requirements</item>
487
- <item cmd="*market-research">Market Research</item>
488
- <item cmd="*competitor-analysis">Competitor Analysis</item>
489
- <item cmd="*brief">Project Brief</item>
490
- ```
491
-
492
- ### BMB (Builder)
493
-
494
- ```xml
495
- <item cmd="*create-agent">Build Agent</item>
496
- <item cmd="*create-module">Build Module</item>
497
- <item cmd="*create-workflow">Create Workflow</item>
498
- <item cmd="*module-brief">Module Brief</item>
499
- ```
500
-
501
- ### CIS (Creative Intelligence)
502
-
503
- ```xml
504
- <item cmd="*brainstorm">Brainstorming Session</item>
505
- <item cmd="*ideate">Ideation Workshop</item>
506
- <item cmd="*storytell">Story Creation</item>
507
- ```
508
-
509
- ## Command Menu Presentation
510
-
511
- ### How Commands Display
512
-
513
- ```
514
- 1. *help - Show numbered cmd list
515
- 2. *create-prd - Create Product Requirements Document
516
- 3. *create-agent - Build new BMAD agent
517
- 4. *validate - Validate document
518
- 5. *exit - Exit with confirmation
519
- ```
520
-
521
- ### Menu Customization
522
-
523
- ```xml
524
- <!-- Group separator (visual only) -->
525
- <item cmd="---">━━━━━━━━━━━━━━━━━━━━</item>
526
-
527
- <!-- Section header (non-executable) -->
528
- <item cmd="SECTION">═══ Workflows ═══</item>
529
- ```
530
-
531
- ## Error Handling
532
-
533
- ### Missing Resources
534
-
535
- ```xml
536
- <!-- Workflow not yet created -->
537
- <item cmd="*future-feature"
538
- run-workflow="todo">
539
- Coming soon: Advanced feature
540
- </item>
541
-
542
- <!-- Graceful degradation -->
543
- <item cmd="*analyze"
544
- run-workflow="{optional-path|fallback-path}">
545
- Analyze with available tools
546
- </item>
547
- ```
548
-
549
- ## Testing Commands
550
-
551
- ### Command Test Checklist
552
-
553
- - [ ] Unique trigger (no duplicates)
554
- - [ ] Clear description
555
- - [ ] Valid path or "todo"
556
- - [ ] Uses variables not hardcoded paths
557
- - [ ] Executes without error
558
- - [ ] Returns to menu after execution
559
-
560
- ### Common Issues
561
-
562
- 1. **Duplicate triggers** - Each cmd must be unique
563
- 2. **Missing paths** - File must exist or be "todo"
564
- 3. **Hardcoded paths** - Always use variables
565
- 4. **No description** - Every command needs text
566
- 5. **Wrong order** - help first, exit last
567
-
568
- ## Quick Templates
569
-
570
- ### Workflow Command
571
-
572
- ```xml
573
- <!-- Create document -->
574
- <item cmd="*{action}-{object}"
575
- run-workflow="{project-root}/{bmad_folder}/{module}/workflows/{workflow}/workflow.yaml">
576
- {Action} {Object Description}
577
- </item>
578
-
579
- <!-- Validate document -->
580
- <item cmd="*validate-{object}"
581
- validate-workflow="{output_folder}/{document}.md"
582
- workflow="{project-root}/{bmad_folder}/{module}/workflows/{workflow}/workflow.yaml">
583
- Validate {Object Description}
584
- </item>
585
- ```
586
-
587
- ### Task Command
588
-
589
- ```xml
590
- <item cmd="*{action}"
591
- exec="{project-root}/{bmad_folder}/{module}/tasks/{task}.md">
592
- {Action Description}
593
- </item>
594
- ```
595
-
596
- ### Template Command
597
-
598
- ```xml
599
- <item cmd="*{document}"
600
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
601
- tmpl="{project-root}/{bmad_folder}/{module}/templates/{template}.md">
602
- Create {Document Name}
603
- </item>
604
- ```
605
-
606
- ## Self-Contained Agent Patterns
607
-
608
- ### When to Use Each Approach
609
-
610
- **Inline Action (`action="prompt"`)**
611
-
612
- - Prompt is < 2 lines
613
- - Simple, direct instruction
614
- - Not reused elsewhere
615
- - Quick transformations
616
-
617
- **Referenced Prompt (`action="#prompt-id"`)**
618
-
619
- - Prompt is multiline/complex
620
- - Contains structured steps
621
- - May be reused by multiple commands
622
- - Maintains readability
623
-
624
- **External Task (`exec="path/to/task.md"`)**
625
-
626
- - Logic needs to be shared across agents
627
- - Task is independently valuable
628
- - Requires version control separately
629
- - Part of larger workflow system
630
-
631
- ### Complete Self-Contained Agent
632
-
633
- ```xml
634
- <agent id="{bmad_folder}/research/agents/analyst.md" name="Research Analyst" icon="🔬">
635
- <!-- Embedded prompt library -->
636
- <prompts>
637
- <prompt id="swot-analysis">
638
- Perform a SWOT analysis:
639
-
640
- STRENGTHS (Internal, Positive)
641
- - What advantages exist?
642
- - What do we do well?
643
- - What unique resources?
644
-
645
- WEAKNESSES (Internal, Negative)
646
- - What could improve?
647
- - Where are resource gaps?
648
- - What needs development?
649
-
650
- OPPORTUNITIES (External, Positive)
651
- - What trends can we leverage?
652
- - What market gaps exist?
653
- - What partnerships are possible?
654
-
655
- THREATS (External, Negative)
656
- - What competition exists?
657
- - What risks are emerging?
658
- - What could disrupt us?
659
-
660
- Provide specific examples and actionable insights for each quadrant.
661
- </prompt>
662
-
663
- <prompt id="competitive-intel">
664
- Analyze competitive landscape:
665
- 1. Identify top 5 competitors
666
- 2. Compare features and capabilities
667
- 3. Analyze pricing strategies
668
- 4. Evaluate market positioning
669
- 5. Assess strengths and vulnerabilities
670
- 6. Recommend competitive strategies
671
- </prompt>
672
- </prompts>
673
-
674
- <menu>
675
- <item cmd="*help">Show numbered cmd list</item>
676
-
677
- <!-- Simple inline actions -->
678
- <item cmd="*summarize"
679
- action="create executive summary of findings">
680
- Create Executive Summary
681
- </item>
682
-
683
- <!-- Complex referenced prompts -->
684
- <item cmd="*swot"
685
- action="#swot-analysis">
686
- Perform SWOT Analysis
687
- </item>
688
-
689
- <item cmd="*compete"
690
- action="#competitive-intel"
691
- data="{project-root}/{bmad_folder}/_data/market-data.csv">
692
- Analyze Competition
693
- </item>
694
-
695
- <!-- Hybrid: external task with internal data -->
696
- <item cmd="*report"
697
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
698
- tmpl="{project-root}/{bmad_folder}/research/templates/report.md">
699
- Generate Research Report
700
- </item>
701
-
702
- <item cmd="*exit">Exit with confirmation</item>
703
- </menu>
704
- </agent>
705
- ```
706
-
707
- ## Simple Agent Example
708
-
709
- For agents that primarily use embedded logic:
710
-
711
- ```xml
712
- <agent name="Data Analyst">
713
- <menu>
714
- <item cmd="*help">Show numbered cmd list</item>
715
-
716
- <!-- Action commands for direct operations -->
717
- <item cmd="*list-metrics"
718
- action="list all available metrics from the dataset">
719
- List Available Metrics
720
- </item>
721
-
722
- <item cmd="*analyze"
723
- action="perform statistical analysis on the provided data"
724
- data="{project-root}/{bmad_folder}/_data/dataset.csv">
725
- Analyze Dataset
726
- </item>
727
-
728
- <item cmd="*visualize"
729
- action="create visualization recommendations for this data">
730
- Suggest Visualizations
731
- </item>
732
-
733
- <!-- Embedded logic commands -->
734
- <item cmd="*calculate">Perform calculations</item>
735
- <item cmd="*interpret">Interpret results</item>
736
-
737
- <item cmd="*exit">Exit with confirmation</item>
738
- </menu>
739
- </agent>
740
- ```
741
-
742
- ## LLM Building Guide
743
-
744
- When creating commands:
745
-
746
- 1. Start with *help and *exit
747
- 2. Choose appropriate command type:
748
- - Complex multi-step? Use `run-workflow`
749
- - Single operation? Use `exec`
750
- - Need template? Use `exec` + `tmpl`
751
- - Simple prompt? Use `action`
752
- - Agent handles it? Use no attributes
753
- 3. Add `data` attribute if supplementary info needed
754
- 4. Add primary workflows (main value)
755
- 5. Add secondary tasks
756
- 6. Include utility commands
757
- 7. Test each command works
758
- 8. Verify no duplicates
759
- 9. Ensure clear descriptions