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

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 +219 -1105
  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 +4 -2
  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,415 +0,0 @@
1
- # BMAD Agent Architecture Reference
2
-
3
- _LLM-Optimized Technical Documentation for Agent Building_
4
-
5
- ## Core Agent Structure
6
-
7
- ### Minimal Valid Agent
8
-
9
- ```xml
10
- <agent id="path/to/agent.md" name="Name" title="Title" icon="🤖">
11
- <persona>
12
- <role>My primary function</role>
13
- <identity>My background and expertise</identity>
14
- <communication_style>How I interact</communication_style>
15
- <principles>My core beliefs and methodology</principles>
16
- </persona>
17
- <menu>
18
- <item cmd="*help">Show numbered menu</item>
19
- <item cmd="*exit">Exit with confirmation</item>
20
- </menu>
21
- </agent>
22
- ```
23
-
24
- ## Agent XML Schema
25
-
26
- ### Root Element: `<agent>`
27
-
28
- **Required Attributes:**
29
-
30
- - `id` - Unique path identifier (e.g., "{bmad_folder}/bmm/agents/analyst.md")
31
- - `name` - Agent's name (e.g., "Mary", "John", "Helper")
32
- - `title` - Professional title (e.g., "Business Analyst", "Security Engineer")
33
- - `icon` - Single emoji representing the agent
34
-
35
- ### Core Sections
36
-
37
- #### 1. Persona Section (REQUIRED)
38
-
39
- ```xml
40
- <persona>
41
- <role>1-2 sentences: Professional title and primary expertise, use first-person voice</role>
42
- <identity>2-5 sentences: Background, experience, specializations, use first-person voice</identity>
43
- <communication_style>1-3 sentences: Interaction approach, tone, quirks, use first-person voice</communication_style>
44
- <principles>2-5 sentences: Core beliefs, methodology, philosophy, use first-person voice</principles>
45
- </persona>
46
- ```
47
-
48
- **Best Practices:**
49
-
50
- - Role: Be specific about expertise area
51
- - Identity: Include experience indicators (years, depth)
52
- - Communication: Describe HOW they interact, not just tone and quirks
53
- - Principles: Start with "I believe" or "I operate" for first-person voice
54
-
55
- #### 2. Critical Actions Section
56
-
57
- ```xml
58
- <critical-actions>
59
- <i>Load into memory {project-root}/{bmad_folder}/{module}/config.yaml and set variables</i>
60
- <i>Remember the users name is {user_name}</i>
61
- <i>ALWAYS communicate in {communication_language}</i>
62
- <!-- Custom initialization actions -->
63
- </critical-actions>
64
- ```
65
-
66
- **For Expert Agents with Sidecars (CRITICAL):**
67
-
68
- ```xml
69
- <critical-actions>
70
- <!-- CRITICAL: Load sidecar files FIRST -->
71
- <i critical="MANDATORY">Load COMPLETE file {agent-folder}/instructions.md and follow ALL directives</i>
72
- <i critical="MANDATORY">Load COMPLETE file {agent-folder}/memories.md into permanent context</i>
73
- <i critical="MANDATORY">You MUST follow all rules in instructions.md on EVERY interaction</i>
74
-
75
- <!-- Standard initialization -->
76
- <i>Load into memory {project-root}/{bmad_folder}/{module}/config.yaml and set variables</i>
77
- <i>Remember the users name is {user_name}</i>
78
- <i>ALWAYS communicate in {communication_language}</i>
79
-
80
- <!-- Domain restrictions -->
81
- <i>ONLY read/write files in {user-folder}/diary/ - NO OTHER FOLDERS</i>
82
- </critical-actions>
83
- ```
84
-
85
- **Common Patterns:**
86
-
87
- - Config loading for module agents
88
- - User context initialization
89
- - Language preferences
90
- - **Sidecar file loading (Expert agents) - MUST be explicit and CRITICAL**
91
- - **Domain restrictions (Expert agents) - MUST be enforced**
92
-
93
- #### 3. Menu Section (REQUIRED)
94
-
95
- ```xml
96
- <menu>
97
- <item cmd="*trigger" [attributes]>Description</item>
98
- </menu>
99
- ```
100
-
101
- **Command Attributes:**
102
-
103
- - `run-workflow="{path}"` - Executes a workflow
104
- - `exec="{path}"` - Executes a task
105
- - `tmpl="{path}"` - Template reference
106
- - `data="{path}"` - Data file reference
107
-
108
- **Required Menu Items:**
109
-
110
- - `*help` - Always first, shows command list
111
- - `*exit` - Always last, exits agent
112
-
113
- ## Advanced Agent Patterns
114
-
115
- ### Activation Rules (OPTIONAL)
116
-
117
- ```xml
118
- <activation critical="true">
119
- <initialization critical="true" sequential="MANDATORY">
120
- <step n="1">Load configuration</step>
121
- <step n="2">Apply overrides</step>
122
- <step n="3">Execute critical actions</step>
123
- <step n="4" critical="BLOCKING">Show greeting with menu</step>
124
- <step n="5" critical="BLOCKING">AWAIT user input</step>
125
- </initialization>
126
- <command-resolution critical="true">
127
- <rule>Numeric input → Execute command at cmd_map[n]</rule>
128
- <rule>Text input → Fuzzy match against commands</rule>
129
- </command-resolution>
130
- </activation>
131
- ```
132
-
133
- ### Expert Agent Sidecar Pattern
134
-
135
- ```xml
136
- <!-- DO NOT use sidecar-resources tag - Instead use critical-actions -->
137
- <!-- Sidecar files MUST be loaded explicitly in critical-actions -->
138
-
139
- <!-- Example Expert Agent with Diary domain -->
140
- <agent id="diary-keeper" name="Personal Assistant" title="Diary Keeper" icon="📔">
141
- <critical-actions>
142
- <!-- MANDATORY: Load all sidecar files -->
143
- <i critical="MANDATORY">Load COMPLETE file {agent-folder}/diary-rules.md</i>
144
- <i critical="MANDATORY">Load COMPLETE file {agent-folder}/user-memories.md</i>
145
- <i critical="MANDATORY">Follow ALL rules from diary-rules.md</i>
146
-
147
- <!-- Domain restriction -->
148
- <i critical="MANDATORY">ONLY access files in {user-folder}/diary/</i>
149
- <i critical="MANDATORY">NEVER access files outside diary folder</i>
150
- </critical-actions>
151
-
152
- <persona>...</persona>
153
- <menu>...</menu>
154
- </agent>
155
- ```
156
-
157
- ### Module Agent Integration
158
-
159
- ```xml
160
- <module-integration>
161
- <module-path>{project-root}/{bmad_folder}/{module-code}</module-path>
162
- <config-source>{module-path}/config.yaml</config-source>
163
- <workflows-path>{project-root}/{bmad_folder}/{module-code}/workflows</workflows-path>
164
- </module-integration>
165
- ```
166
-
167
- ## Variable System
168
-
169
- ### System Variables
170
-
171
- - `{project-root}` - Root directory of project
172
- - `{user_name}` - User's name from config
173
- - `{communication_language}` - Language preference
174
- - `{date}` - Current date
175
- - `{module}` - Current module code
176
-
177
- ### Config Variables
178
-
179
- Format: `{config_source}:variable_name`
180
- Example: `{config_source}:output_folder`
181
-
182
- ### Path Construction
183
-
184
- ```
185
- Good: {project-root}/{bmad_folder}/{module}/agents/
186
- Bad: /absolute/path/to/agents/
187
- Bad: ../../../relative/paths/
188
- ```
189
-
190
- ## Command Patterns
191
-
192
- ### Workflow Commands
193
-
194
- ```xml
195
- <!-- Full path -->
196
- <item cmd="*create-prd" run-workflow="{project-root}/{bmad_folder}/bmm/workflows/prd/workflow.yaml">
197
- Create Product Requirements Document
198
- </item>
199
-
200
- <!-- Placeholder for future -->
201
- <item cmd="*analyze" run-workflow="todo">
202
- Perform analysis (workflow to be created)
203
- </item>
204
- ```
205
-
206
- ### Task Commands
207
-
208
- ```xml
209
- <item cmd="*validate" exec="{project-root}/{bmad_folder}/core/tasks/validate-workflow.xml">
210
- Validate document
211
- </item>
212
- ```
213
-
214
- ### Template Commands
215
-
216
- ```xml
217
- <item cmd="*brief"
218
- exec="{project-root}/{bmad_folder}/core/tasks/create-doc.md"
219
- tmpl="{project-root}/{bmad_folder}/bmm/templates/brief.md">
220
- Create project brief
221
- </item>
222
- ```
223
-
224
- ### Data-Driven Commands
225
-
226
- ```xml
227
- <item cmd="*standup"
228
- exec="{project-root}/{bmad_folder}/bmm/tasks/daily-standup.xml"
229
- data="{project-root}/{bmad_folder}/_cfg/agent-manifest.csv">
230
- Run daily standup
231
- </item>
232
- ```
233
-
234
- ## Agent Type Specific Patterns
235
-
236
- ### Simple Agent
237
-
238
- - Self-contained logic
239
- - Minimal or no external dependencies
240
- - May have embedded functions
241
- - Good for utilities and converters
242
-
243
- ### Expert Agent
244
-
245
- - Domain-specific with sidecar resources
246
- - Restricted access patterns
247
- - Memory/context files
248
- - Good for specialized domains
249
-
250
- ### Module Agent
251
-
252
- - Full integration with module
253
- - Multiple workflows and tasks
254
- - Config-driven behavior
255
- - Good for professional tools
256
-
257
- ## Common Anti-Patterns to Avoid
258
-
259
- ### ❌ Bad Practices
260
-
261
- ```xml
262
- <!-- Missing required persona elements -->
263
- <persona>
264
- <role>Helper</role>
265
- <!-- Missing identity, style, principles -->
266
- </persona>
267
-
268
- <!-- Hard-coded paths -->
269
- <item cmd="*run" exec="/Users/john/project/task.md">
270
-
271
- <!-- No help command -->
272
- <menu>
273
- <item cmd="*do-something">Action</item>
274
- <!-- Missing *help -->
275
- </menu>
276
-
277
- <!-- Duplicate command triggers -->
278
- <item cmd="*analyze">First</item>
279
- <item cmd="*analyze">Second</item>
280
- ```
281
-
282
- ### ✅ Good Practices
283
-
284
- ```xml
285
- <!-- Complete persona -->
286
- <persona>
287
- <role>Data Analysis Expert</role>
288
- <identity>Senior analyst with 10+ years...</identity>
289
- <communication_style>Analytical and precise...</communication_style>
290
- <principles>I believe in data-driven...</principles>
291
- </persona>
292
-
293
- <!-- Variable-based paths -->
294
- <item cmd="*run" exec="{project-root}/{bmad_folder}/module/task.md">
295
-
296
- <!-- Required commands present -->
297
- <menu>
298
- <item cmd="*help">Show commands</item>
299
- <item cmd="*analyze">Perform analysis</item>
300
- <item cmd="*exit">Exit</item>
301
- </menu>
302
- ```
303
-
304
- ## Agent Lifecycle
305
-
306
- ### 1. Initialization
307
-
308
- 1. Load agent file
309
- 2. Parse XML structure
310
- 3. Load critical-actions
311
- 4. Apply config overrides
312
- 5. Present greeting
313
-
314
- ### 2. Command Loop
315
-
316
- 1. Show numbered menu
317
- 2. Await user input
318
- 3. Resolve command
319
- 4. Execute action
320
- 5. Return to menu
321
-
322
- ### 3. Termination
323
-
324
- 1. User enters \*exit
325
- 2. Cleanup if needed
326
- 3. Exit persona
327
-
328
- ## Testing Checklist
329
-
330
- Before deploying an agent:
331
-
332
- - [ ] Valid XML structure
333
- - [ ] All persona elements present
334
- - [ ] *help and *exit commands exist
335
- - [ ] All paths use variables
336
- - [ ] No duplicate commands
337
- - [ ] Config loading works
338
- - [ ] Commands execute properly
339
-
340
- ## LLM Building Tips
341
-
342
- When building agents:
343
-
344
- 1. Start with agent type (Simple/Expert/Module)
345
- 2. Define complete persona first
346
- 3. Add standard critical-actions
347
- 4. Include *help and *exit
348
- 5. Add domain commands
349
- 6. Test command execution
350
- 7. Validate with checklist
351
-
352
- ## Integration Points
353
-
354
- ### With Workflows
355
-
356
- - Agents invoke workflows via run-workflow
357
- - Workflows can be incomplete (marked "todo")
358
- - Workflow paths must be valid or "todo"
359
-
360
- **Workflow Interaction Styles** (BMAD v6 default):
361
-
362
- - **Intent-based + Interactive**: Workflows adapt to user context and skill level
363
- - Workflows collaborate with users, not just extract data
364
- - See workflow-creation-guide.md "Instruction Styles" section for details
365
- - When creating workflows for your agent, default to intent-based unless you need prescriptive control
366
-
367
- ### With Tasks
368
-
369
- - Tasks are single operations
370
- - Executed via exec attribute
371
- - Can include data files
372
-
373
- ### With Templates
374
-
375
- - Templates define document structure
376
- - Used with create-doc task
377
- - Variables passed through
378
-
379
- ## Quick Reference
380
-
381
- ### Minimal Commands
382
-
383
- ```xml
384
- <menu>
385
- <item cmd="*help">Show numbered cmd list</item>
386
- <item cmd="*exit">Exit with confirmation</item>
387
- </menu>
388
- ```
389
-
390
- ### Standard Critical Actions
391
-
392
- ```xml
393
- <critical-actions>
394
- <i>Load into memory {project-root}/{bmad_folder}/{module}/config.yaml</i>
395
- <i>Remember the users name is {user_name}</i>
396
- <i>ALWAYS communicate in {communication_language}</i>
397
- </critical-actions>
398
- ```
399
-
400
- ### Module Agent Pattern
401
-
402
- ```xml
403
- <agent id="{bmad_folder}/{module}/agents/{name}.md"
404
- name="{Name}"
405
- title="{Title}"
406
- icon="{emoji}">
407
- <persona>...</persona>
408
- <critical-actions>...</critical-actions>
409
- <menu>
410
- <item cmd="*help">...</item>
411
- <item cmd="*{command}" run-workflow="{path}">...</item>
412
- <item cmd="*exit">...</item>
413
- </menu>
414
- </agent>
415
- ```