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.
- package/CHANGELOG.md +219 -1105
- package/README.md +129 -359
- package/docs/custom-agent-installation.md +169 -0
- package/{v6-open-items.md → docs/v6-open-items.md} +1 -1
- package/package.json +4 -2
- package/src/core/resources/excalidraw/README.md +160 -0
- package/src/core/resources/excalidraw/library-loader.md +50 -0
- package/src/modules/bmb/docs/agent-compilation.md +340 -0
- package/src/modules/bmb/docs/agent-menu-patterns.md +524 -0
- package/src/modules/bmb/docs/expert-agent-architecture.md +364 -0
- package/src/modules/bmb/docs/index.md +55 -0
- package/src/modules/bmb/docs/module-agent-architecture.md +367 -0
- package/src/modules/bmb/docs/simple-agent-architecture.md +288 -0
- package/src/modules/bmb/docs/understanding-agent-types.md +184 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +242 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/breakthroughs.md +24 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/instructions.md +108 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/memories.md +46 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper-sidecar/mood-patterns.md +39 -0
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +152 -0
- package/src/modules/bmb/reference/agents/module-examples/README.md +50 -0
- package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +53 -0
- package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +57 -0
- package/src/modules/bmb/reference/agents/simple-examples/README.md +223 -0
- package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +126 -0
- package/src/modules/bmb/reference/readme.md +3 -0
- package/src/modules/bmb/workflows/create-agent/agent-validation-checklist.md +174 -0
- package/src/modules/bmb/workflows/create-agent/brainstorm-context.md +99 -120
- package/src/modules/bmb/workflows/create-agent/communication-presets.csv +61 -0
- package/src/modules/bmb/workflows/create-agent/instructions.md +126 -65
- package/src/modules/bmb/workflows/create-agent/workflow.yaml +19 -12
- package/src/modules/bmb/workflows/edit-agent/README.md +174 -47
- package/src/modules/bmb/workflows/edit-agent/instructions.md +397 -33
- package/src/modules/bmb/workflows/edit-agent/workflow.yaml +24 -8
- package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +1 -1
- package/src/modules/bmm/agents/analyst.agent.yaml +2 -2
- package/src/modules/bmm/agents/architect.agent.yaml +10 -2
- package/src/modules/bmm/agents/dev.agent.yaml +2 -2
- package/src/modules/bmm/agents/pm.agent.yaml +7 -3
- package/src/modules/bmm/agents/sm.agent.yaml +2 -2
- package/src/modules/bmm/agents/tea.agent.yaml +2 -2
- package/src/modules/bmm/agents/tech-writer.agent.yaml +15 -3
- package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -2
- package/src/modules/bmm/docs/README.md +4 -0
- package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +5919 -0
- package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +2 -0
- package/src/modules/bmm/docs/quick-start.md +6 -0
- package/src/modules/bmm/docs/scale-adaptive-system.md +6 -0
- package/src/modules/bmm/docs/workflows-implementation.md +10 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +4 -4
- package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/workflow.yaml +5 -5
- package/src/modules/bmm/workflows/4-implementation/story-context/workflow.yaml +1 -1
- package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/instructions.md +7 -8
- package/src/modules/bmm/workflows/diagrams/create-dataflow/workflow.yaml +27 -0
- package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/instructions.md +9 -10
- package/src/modules/bmm/workflows/diagrams/create-diagram/workflow.yaml +27 -0
- package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/instructions.md +4 -5
- package/src/modules/bmm/workflows/diagrams/create-flowchart/workflow.yaml +27 -0
- package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/instructions.md +3 -3
- package/src/modules/bmm/workflows/diagrams/create-wireframe/workflow.yaml +27 -0
- package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +18 -30
- package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +2 -14
- package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +2 -14
- package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +2 -14
- package/src/modules/cis/agents/presentation-master.agent.yaml +60 -0
- package/tools/cli/commands/agent-install.js +409 -0
- package/tools/cli/installers/lib/core/installer.js +119 -0
- package/tools/cli/installers/lib/ide/_base-ide.js +25 -0
- package/tools/cli/installers/lib/ide/antigravity.js +463 -0
- package/tools/cli/installers/lib/ide/claude-code.js +43 -0
- package/tools/cli/installers/lib/ide/codex.js +217 -32
- package/tools/cli/installers/lib/ide/cursor.js +48 -0
- package/tools/cli/installers/lib/ide/github-copilot.js +74 -0
- package/tools/cli/installers/lib/ide/manager.js +35 -0
- package/tools/cli/installers/lib/ide/opencode.js +45 -0
- package/tools/cli/installers/lib/ide/windsurf.js +47 -0
- package/tools/cli/lib/agent/compiler.js +390 -0
- package/tools/cli/lib/agent/installer.js +725 -0
- package/tools/cli/lib/agent/template-engine.js +152 -0
- package/docs/installers-bundlers/web-bundler-usage.md +0 -54
- package/src/modules/bmb/workflows/create-agent/README.md +0 -203
- package/src/modules/bmb/workflows/create-agent/agent-architecture.md +0 -415
- package/src/modules/bmb/workflows/create-agent/agent-command-patterns.md +0 -759
- package/src/modules/bmb/workflows/create-agent/agent-types.md +0 -292
- package/src/modules/bmb/workflows/create-agent/checklist.md +0 -62
- package/src/modules/bmb/workflows/create-agent/communication-styles.md +0 -202
- package/src/modules/bmb/workflows/edit-agent/checklist.md +0 -112
- package/src/modules/bmb/workflows/redoc/README.md +0 -87
- package/src/modules/bmb/workflows/redoc/checklist.md +0 -99
- package/src/modules/bmb/workflows/redoc/instructions.md +0 -265
- package/src/modules/bmb/workflows/redoc/workflow.yaml +0 -34
- package/src/modules/bmm/agents/frame-expert.agent.yaml +0 -42
- package/src/modules/bmm/workflows/frame-expert/create-dataflow/workflow.yaml +0 -24
- package/src/modules/bmm/workflows/frame-expert/create-diagram/workflow.yaml +0 -25
- package/src/modules/bmm/workflows/frame-expert/create-flowchart/workflow.yaml +0 -28
- package/src/modules/bmm/workflows/frame-expert/create-wireframe/workflow.yaml +0 -24
- package/src/modules/bmm/workflows/workflow-status/paths/game-design.yaml +0 -52
- /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/excalidraw-helpers.md +0 -0
- /package/src/{modules/bmm/workflows/frame-expert/_shared → core/resources/excalidraw}/validate-json-instructions.md +0 -0
- /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/epics-template.md +0 -0
- /package/src/modules/bmm/workflows/{2-plan-workflows → 3-solutioning}/create-epics-and-stories/instructions.md +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-library.json +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/_shared/excalidraw-templates.yaml +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-dataflow/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-diagram/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-flowchart/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{frame-expert → diagrams}/create-wireframe/checklist.md +0 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
# Module Agent Architecture
|
|
2
|
+
|
|
3
|
+
Full integration agents with workflow orchestration, module-specific paths, and professional tooling.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Professional development workflows (business analysis, architecture design)
|
|
8
|
+
- Team-oriented tools (project management, sprint planning)
|
|
9
|
+
- Agents that orchestrate multiple workflows
|
|
10
|
+
- Module-specific functionality (BMM, BMB, CIS, custom modules)
|
|
11
|
+
- Agents with complex multi-step operations
|
|
12
|
+
|
|
13
|
+
## File Location
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
src/modules/{module-code}/agents/{agent-name}.agent.yaml
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Compiles to:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
.bmad/{module-code}/agents/{agent-name}.md
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## YAML Structure
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
agent:
|
|
29
|
+
metadata:
|
|
30
|
+
id: '{bmad_folder}/{module-code}/agents/{agent-name}.md'
|
|
31
|
+
name: 'Persona Name'
|
|
32
|
+
title: 'Professional Title'
|
|
33
|
+
icon: 'emoji'
|
|
34
|
+
module: '{module-code}'
|
|
35
|
+
|
|
36
|
+
persona:
|
|
37
|
+
role: 'Primary expertise and function'
|
|
38
|
+
identity: 'Background, experience, specializations'
|
|
39
|
+
communication_style: 'Interaction approach, tone, methodology'
|
|
40
|
+
principles: 'Core beliefs and methodology'
|
|
41
|
+
|
|
42
|
+
menu:
|
|
43
|
+
- trigger: workflow-action
|
|
44
|
+
workflow: '{project-root}/{bmad_folder}/{module-code}/workflows/{workflow-name}/workflow.yaml'
|
|
45
|
+
description: 'Execute module workflow'
|
|
46
|
+
|
|
47
|
+
- trigger: another-workflow
|
|
48
|
+
workflow: '{project-root}/{bmad_folder}/core/workflows/{workflow-name}/workflow.yaml'
|
|
49
|
+
description: 'Execute core workflow'
|
|
50
|
+
|
|
51
|
+
- trigger: task-action
|
|
52
|
+
exec: '{project-root}/{bmad_folder}/{module-code}/tasks/{task-name}.xml'
|
|
53
|
+
description: 'Execute module task'
|
|
54
|
+
|
|
55
|
+
- trigger: cross-module
|
|
56
|
+
workflow: '{project-root}/{bmad_folder}/other-module/workflows/{workflow-name}/workflow.yaml'
|
|
57
|
+
description: 'Execute workflow from another module'
|
|
58
|
+
|
|
59
|
+
- trigger: with-template
|
|
60
|
+
exec: '{project-root}/{bmad_folder}/core/tasks/create-doc.xml'
|
|
61
|
+
tmpl: '{project-root}/{bmad_folder}/{module-code}/templates/{template-name}.md'
|
|
62
|
+
description: 'Create document from template'
|
|
63
|
+
|
|
64
|
+
- trigger: with-data
|
|
65
|
+
exec: '{project-root}/{bmad_folder}/{module-code}/tasks/{task-name}.xml'
|
|
66
|
+
data: '{project-root}/{bmad_folder}/_cfg/agent-manifest.csv'
|
|
67
|
+
description: 'Execute task with data file'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Key Components
|
|
71
|
+
|
|
72
|
+
### Metadata
|
|
73
|
+
|
|
74
|
+
- **id**: Path with `{bmad_folder}` variable (resolved at install time)
|
|
75
|
+
- **name**: Agent persona name
|
|
76
|
+
- **title**: Professional role
|
|
77
|
+
- **icon**: Single emoji
|
|
78
|
+
- **module**: Module code (bmm, bmb, cis, custom)
|
|
79
|
+
|
|
80
|
+
### Persona (Professional Voice)
|
|
81
|
+
|
|
82
|
+
Module agents typically use **professional** communication styles:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
persona:
|
|
86
|
+
role: Strategic Business Analyst + Requirements Expert
|
|
87
|
+
|
|
88
|
+
identity: Senior analyst with deep expertise in market research, competitive analysis, and requirements elicitation. Specializes in translating vague needs into actionable specs.
|
|
89
|
+
|
|
90
|
+
communication_style: Systematic and probing. Connects dots others miss. Structures findings hierarchically. Uses precise unambiguous language. Ensures all stakeholder voices heard.
|
|
91
|
+
|
|
92
|
+
principles: Every business challenge has root causes waiting to be discovered. Ground findings in verifiable evidence. Articulate requirements with absolute precision.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Note:** Module agents usually don't use Handlebars templating since they're not user-customized - they're professional tools with fixed personalities.
|
|
96
|
+
|
|
97
|
+
### Menu Handlers
|
|
98
|
+
|
|
99
|
+
#### Workflow Handler (Most Common)
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
menu:
|
|
103
|
+
- trigger: create-prd
|
|
104
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/prd/workflow.yaml'
|
|
105
|
+
description: 'Create Product Requirements Document'
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Invokes BMAD workflow engine to execute multi-step processes.
|
|
109
|
+
|
|
110
|
+
#### Task/Exec Handler
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
menu:
|
|
114
|
+
- trigger: validate
|
|
115
|
+
exec: '{project-root}/{bmad_folder}/core/tasks/validate-workflow.xml'
|
|
116
|
+
description: 'Validate document structure'
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Executes single-operation tasks.
|
|
120
|
+
|
|
121
|
+
#### Template Handler
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
menu:
|
|
125
|
+
- trigger: create-brief
|
|
126
|
+
exec: '{project-root}/{bmad_folder}/core/tasks/create-doc.xml'
|
|
127
|
+
tmpl: '{project-root}/{bmad_folder}/bmm/templates/brief.md'
|
|
128
|
+
description: 'Create project brief from template'
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Combines task execution with template file.
|
|
132
|
+
|
|
133
|
+
#### Data Handler
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
menu:
|
|
137
|
+
- trigger: team-standup
|
|
138
|
+
exec: '{project-root}/{bmad_folder}/bmm/tasks/standup.xml'
|
|
139
|
+
data: '{project-root}/{bmad_folder}/_cfg/agent-manifest.csv'
|
|
140
|
+
description: 'Run team standup with agent roster'
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Provides data file to task.
|
|
144
|
+
|
|
145
|
+
#### Placeholder Handler
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
menu:
|
|
149
|
+
- trigger: future-feature
|
|
150
|
+
workflow: 'todo'
|
|
151
|
+
description: 'Feature planned but not yet implemented'
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Marks unimplemented features - compiler handles gracefully.
|
|
155
|
+
|
|
156
|
+
### Platform-Specific Menu Items
|
|
157
|
+
|
|
158
|
+
Control visibility based on platform:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
menu:
|
|
162
|
+
- trigger: advanced-elicitation
|
|
163
|
+
exec: '{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.xml'
|
|
164
|
+
description: 'Advanced elicitation techniques'
|
|
165
|
+
web-only: true # Only shows in web bundle
|
|
166
|
+
|
|
167
|
+
- trigger: git-operations
|
|
168
|
+
exec: '{project-root}/{bmad_folder}/bmm/tasks/git-flow.xml'
|
|
169
|
+
description: 'Git workflow operations'
|
|
170
|
+
ide-only: true # Only shows in IDE environments
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Variable System
|
|
174
|
+
|
|
175
|
+
### Core Variables
|
|
176
|
+
|
|
177
|
+
- `{project-root}` - Root directory of installed project
|
|
178
|
+
- `{bmad_folder}` - BMAD installation folder (usually `.bmad`)
|
|
179
|
+
- `{user_name}` - User's name from module config
|
|
180
|
+
- `{communication_language}` - Language preference
|
|
181
|
+
- `{output_folder}` - Document output directory
|
|
182
|
+
|
|
183
|
+
### Path Construction
|
|
184
|
+
|
|
185
|
+
**Always use variables, never hardcoded paths:**
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
# GOOD
|
|
189
|
+
workflow: "{project-root}/{bmad_folder}/bmm/workflows/prd/workflow.yaml"
|
|
190
|
+
|
|
191
|
+
# BAD
|
|
192
|
+
workflow: "/Users/john/project/.bmad/bmm/workflows/prd/workflow.yaml"
|
|
193
|
+
|
|
194
|
+
# BAD
|
|
195
|
+
workflow: "../../../bmm/workflows/prd/workflow.yaml"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## What Gets Injected at Compile Time
|
|
199
|
+
|
|
200
|
+
Module agents use the same injection process as simple agents:
|
|
201
|
+
|
|
202
|
+
1. **Frontmatter** with name and description
|
|
203
|
+
2. **Activation block** with standard steps
|
|
204
|
+
3. **Menu handlers** based on usage (workflow, exec, tmpl, data)
|
|
205
|
+
4. **Rules section** for consistent behavior
|
|
206
|
+
5. **Auto-injected** *help and *exit commands
|
|
207
|
+
|
|
208
|
+
**Key difference:** Module agents load **module-specific config** instead of core config:
|
|
209
|
+
|
|
210
|
+
```xml
|
|
211
|
+
<step n="2">Load and read {project-root}/{bmad_folder}/{module}/config.yaml...</step>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Reference Examples
|
|
215
|
+
|
|
216
|
+
See: `src/modules/bmm/agents/`
|
|
217
|
+
|
|
218
|
+
**analyst.agent.yaml** - Business Analyst
|
|
219
|
+
|
|
220
|
+
- Workflow orchestration for analysis phase
|
|
221
|
+
- Multiple workflow integrations
|
|
222
|
+
- Cross-module workflow access (core/workflows/party-mode)
|
|
223
|
+
|
|
224
|
+
**architect.agent.yaml** - System Architect
|
|
225
|
+
|
|
226
|
+
- Technical workflow management
|
|
227
|
+
- Architecture decision workflows
|
|
228
|
+
|
|
229
|
+
**pm.agent.yaml** - Product Manager
|
|
230
|
+
|
|
231
|
+
- Planning and coordination workflows
|
|
232
|
+
- Sprint management integration
|
|
233
|
+
|
|
234
|
+
## Module Configuration
|
|
235
|
+
|
|
236
|
+
Each module has `config.yaml` providing:
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
# src/modules/{module}/config.yaml
|
|
240
|
+
user_name: 'User Name'
|
|
241
|
+
communication_language: 'English'
|
|
242
|
+
output_folder: '{project-root}/docs'
|
|
243
|
+
custom_settings: 'module-specific values'
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Agents load this at activation for consistent behavior.
|
|
247
|
+
|
|
248
|
+
## Workflow Integration Patterns
|
|
249
|
+
|
|
250
|
+
### Sequential Workflow Execution
|
|
251
|
+
|
|
252
|
+
```yaml
|
|
253
|
+
menu:
|
|
254
|
+
- trigger: init
|
|
255
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/workflow-init/workflow.yaml'
|
|
256
|
+
description: 'Initialize workflow path (START HERE)'
|
|
257
|
+
|
|
258
|
+
- trigger: status
|
|
259
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/workflow-status/workflow.yaml'
|
|
260
|
+
description: 'Check current workflow status'
|
|
261
|
+
|
|
262
|
+
- trigger: next-step
|
|
263
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/next-step/workflow.yaml'
|
|
264
|
+
description: 'Execute next workflow in sequence'
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Phase-Based Organization
|
|
268
|
+
|
|
269
|
+
```yaml
|
|
270
|
+
menu:
|
|
271
|
+
# Phase 1: Analysis
|
|
272
|
+
- trigger: brainstorm
|
|
273
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/1-analysis/brainstorm/workflow.yaml'
|
|
274
|
+
description: 'Guided brainstorming session'
|
|
275
|
+
|
|
276
|
+
- trigger: research
|
|
277
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/1-analysis/research/workflow.yaml'
|
|
278
|
+
description: 'Market and technical research'
|
|
279
|
+
|
|
280
|
+
# Phase 2: Planning
|
|
281
|
+
- trigger: prd
|
|
282
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/2-planning/prd/workflow.yaml'
|
|
283
|
+
description: 'Create PRD'
|
|
284
|
+
|
|
285
|
+
- trigger: architecture
|
|
286
|
+
workflow: '{project-root}/{bmad_folder}/bmm/workflows/2-planning/architecture/workflow.yaml'
|
|
287
|
+
description: 'Design architecture'
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Cross-Module Access
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
menu:
|
|
294
|
+
- trigger: party-mode
|
|
295
|
+
workflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml'
|
|
296
|
+
description: 'Bring all agents together'
|
|
297
|
+
|
|
298
|
+
- trigger: brainstorm
|
|
299
|
+
workflow: '{project-root}/{bmad_folder}/cis/workflows/brainstorming/workflow.yaml'
|
|
300
|
+
description: 'Use CIS brainstorming techniques'
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Best Practices
|
|
304
|
+
|
|
305
|
+
1. **Use {bmad_folder} paths** - Portable across installations
|
|
306
|
+
2. **Organize workflows by phase** - Clear progression for users
|
|
307
|
+
3. **Include workflow-status** - Help users track progress
|
|
308
|
+
4. **Reference module config** - Consistent behavior
|
|
309
|
+
5. **No Handlebars templating** - Module agents are fixed personalities
|
|
310
|
+
6. **Professional personas** - Match module purpose
|
|
311
|
+
7. **Clear trigger names** - Self-documenting commands
|
|
312
|
+
8. **Group related workflows** - Logical menu organization
|
|
313
|
+
|
|
314
|
+
## Common Patterns
|
|
315
|
+
|
|
316
|
+
### Entry Point Agent
|
|
317
|
+
|
|
318
|
+
```yaml
|
|
319
|
+
menu:
|
|
320
|
+
- trigger: start
|
|
321
|
+
workflow: '{project-root}/{bmad_folder}/{module}/workflows/init/workflow.yaml'
|
|
322
|
+
description: 'Start new project (BEGIN HERE)'
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Status Tracking
|
|
326
|
+
|
|
327
|
+
```yaml
|
|
328
|
+
menu:
|
|
329
|
+
- trigger: status
|
|
330
|
+
workflow: '{project-root}/{bmad_folder}/{module}/workflows/status/workflow.yaml'
|
|
331
|
+
description: 'Check workflow progress'
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Team Coordination
|
|
335
|
+
|
|
336
|
+
```yaml
|
|
337
|
+
menu:
|
|
338
|
+
- trigger: party
|
|
339
|
+
workflow: '{project-root}/{bmad_folder}/core/workflows/party-mode/workflow.yaml'
|
|
340
|
+
description: 'Multi-agent discussion'
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Module Agent vs Simple/Expert
|
|
344
|
+
|
|
345
|
+
| Aspect | Module Agent | Simple/Expert Agent |
|
|
346
|
+
| ------------- | -------------------------------- | ------------------------------- |
|
|
347
|
+
| Location | `{bmad_folder}/{module}/agents/` | `{bmad_folder}/custom/agents/` |
|
|
348
|
+
| Persona | Fixed, professional | Customizable via install_config |
|
|
349
|
+
| Handlebars | No templating | Yes, extensive |
|
|
350
|
+
| Menu actions | Workflows, tasks, templates | Prompts, inline actions |
|
|
351
|
+
| Configuration | Module config.yaml | Core config or none |
|
|
352
|
+
| Purpose | Professional tooling | Personal utilities |
|
|
353
|
+
|
|
354
|
+
## Validation Checklist
|
|
355
|
+
|
|
356
|
+
- [ ] Valid YAML syntax
|
|
357
|
+
- [ ] Metadata includes `module: "{module-code}"`
|
|
358
|
+
- [ ] id uses `{bmad_folder}/{module}/agents/{name}.md`
|
|
359
|
+
- [ ] All workflow paths use `{project-root}/{bmad_folder}/` prefix
|
|
360
|
+
- [ ] No hardcoded paths
|
|
361
|
+
- [ ] No duplicate triggers
|
|
362
|
+
- [ ] Each menu item has description
|
|
363
|
+
- [ ] Triggers don't start with `*` (auto-added)
|
|
364
|
+
- [ ] Professional persona appropriate for module
|
|
365
|
+
- [ ] Workflow paths resolve to actual workflows (or "todo")
|
|
366
|
+
- [ ] File named `{agent-name}.agent.yaml`
|
|
367
|
+
- [ ] Located in `src/modules/{module}/agents/`
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Simple Agent Architecture
|
|
2
|
+
|
|
3
|
+
Self-contained agents with prompts, menus, and optional install-time customization.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Single-purpose utilities (commit message generator, code formatter)
|
|
8
|
+
- Self-contained logic with no external dependencies
|
|
9
|
+
- Agents that benefit from user customization (style, tone, preferences)
|
|
10
|
+
- Quick-to-build standalone helpers
|
|
11
|
+
|
|
12
|
+
## YAML Structure
|
|
13
|
+
|
|
14
|
+
```yaml
|
|
15
|
+
agent:
|
|
16
|
+
metadata:
|
|
17
|
+
id: .bmad/agents/{agent-name}/{agent-name}.md
|
|
18
|
+
name: 'Persona Name'
|
|
19
|
+
title: 'Agent Title'
|
|
20
|
+
icon: 'emoji'
|
|
21
|
+
type: simple
|
|
22
|
+
|
|
23
|
+
persona:
|
|
24
|
+
role: |
|
|
25
|
+
First-person description of primary function (1-2 sentences)
|
|
26
|
+
|
|
27
|
+
identity: |
|
|
28
|
+
Background, experience, specializations in first-person (2-5 sentences)
|
|
29
|
+
{{#if custom_variable}}
|
|
30
|
+
Conditional identity text based on install_config
|
|
31
|
+
{{/if}}
|
|
32
|
+
|
|
33
|
+
communication_style: |
|
|
34
|
+
{{#if style_choice == "professional"}}
|
|
35
|
+
Professional and systematic approach...
|
|
36
|
+
{{/if}}
|
|
37
|
+
{{#if style_choice == "casual"}}
|
|
38
|
+
Friendly and approachable tone...
|
|
39
|
+
{{/if}}
|
|
40
|
+
|
|
41
|
+
principles:
|
|
42
|
+
- Core belief or methodology
|
|
43
|
+
- Another guiding principle
|
|
44
|
+
- Values that shape decisions
|
|
45
|
+
|
|
46
|
+
prompts:
|
|
47
|
+
- id: main-action
|
|
48
|
+
content: |
|
|
49
|
+
<instructions>
|
|
50
|
+
What this prompt does
|
|
51
|
+
</instructions>
|
|
52
|
+
|
|
53
|
+
<process>
|
|
54
|
+
1. Step one
|
|
55
|
+
{{#if detailed_mode}}
|
|
56
|
+
2. Additional detailed step
|
|
57
|
+
{{/if}}
|
|
58
|
+
3. Final step
|
|
59
|
+
</process>
|
|
60
|
+
|
|
61
|
+
- id: another-action
|
|
62
|
+
content: |
|
|
63
|
+
Another reusable prompt template
|
|
64
|
+
|
|
65
|
+
menu:
|
|
66
|
+
- trigger: action1
|
|
67
|
+
action: '#main-action'
|
|
68
|
+
description: 'Execute the main action'
|
|
69
|
+
|
|
70
|
+
- trigger: action2
|
|
71
|
+
action: '#another-action'
|
|
72
|
+
description: 'Execute another action'
|
|
73
|
+
|
|
74
|
+
- trigger: inline
|
|
75
|
+
action: 'Direct inline instruction text'
|
|
76
|
+
description: 'Execute inline action'
|
|
77
|
+
|
|
78
|
+
install_config:
|
|
79
|
+
compile_time_only: true
|
|
80
|
+
description: 'Personalize your agent'
|
|
81
|
+
questions:
|
|
82
|
+
- var: style_choice
|
|
83
|
+
prompt: 'Preferred communication style?'
|
|
84
|
+
type: choice
|
|
85
|
+
options:
|
|
86
|
+
- label: 'Professional'
|
|
87
|
+
value: 'professional'
|
|
88
|
+
- label: 'Casual'
|
|
89
|
+
value: 'casual'
|
|
90
|
+
default: 'professional'
|
|
91
|
+
|
|
92
|
+
- var: detailed_mode
|
|
93
|
+
prompt: 'Enable detailed explanations?'
|
|
94
|
+
type: boolean
|
|
95
|
+
default: true
|
|
96
|
+
|
|
97
|
+
- var: custom_variable
|
|
98
|
+
prompt: 'Your custom text'
|
|
99
|
+
type: text
|
|
100
|
+
default: ''
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Key Components
|
|
104
|
+
|
|
105
|
+
### Metadata
|
|
106
|
+
|
|
107
|
+
- **id**: Final compiled path (`.bmad/agents/{name}/{name}.md` for standalone)
|
|
108
|
+
- **name**: Agent's persona name displayed to users
|
|
109
|
+
- **title**: Professional role/function
|
|
110
|
+
- **icon**: Single emoji for visual identification
|
|
111
|
+
- **type**: `simple` - identifies agent category
|
|
112
|
+
|
|
113
|
+
### Persona (First-Person Voice)
|
|
114
|
+
|
|
115
|
+
- **role**: Primary expertise in 1-2 sentences
|
|
116
|
+
- **identity**: Background and specializations (2-5 sentences)
|
|
117
|
+
- **communication_style**: HOW the agent interacts, including conditional variations
|
|
118
|
+
- **principles**: Array of core beliefs (start with action verbs)
|
|
119
|
+
|
|
120
|
+
### Prompts with IDs
|
|
121
|
+
|
|
122
|
+
Reusable prompt templates referenced by `#id`:
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
prompts:
|
|
126
|
+
- id: analyze-code
|
|
127
|
+
content: |
|
|
128
|
+
<instructions>
|
|
129
|
+
Analyze the provided code for patterns
|
|
130
|
+
</instructions>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Menu items reference these:
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
menu:
|
|
137
|
+
- trigger: analyze
|
|
138
|
+
action: '#analyze-code'
|
|
139
|
+
description: 'Analyze code patterns'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Menu Actions
|
|
143
|
+
|
|
144
|
+
Two forms of action handlers:
|
|
145
|
+
|
|
146
|
+
1. **Prompt Reference**: `action: "#prompt-id"` - Executes prompt content
|
|
147
|
+
2. **Inline Instruction**: `action: "Direct text instruction"` - Executes text directly
|
|
148
|
+
|
|
149
|
+
### Install Config (Compile-Time Customization)
|
|
150
|
+
|
|
151
|
+
Questions asked during `bmad agent-install`:
|
|
152
|
+
|
|
153
|
+
**Question Types:**
|
|
154
|
+
|
|
155
|
+
- `choice` - Multiple choice selection
|
|
156
|
+
- `boolean` - Yes/no toggle
|
|
157
|
+
- `text` - Free-form text input
|
|
158
|
+
|
|
159
|
+
**Variables become available in Handlebars:**
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
{{#if variable_name}}
|
|
163
|
+
Content when true
|
|
164
|
+
{{/if}}
|
|
165
|
+
|
|
166
|
+
{{#if variable_name == "value"}}
|
|
167
|
+
Content when equals value
|
|
168
|
+
{{/if}}
|
|
169
|
+
|
|
170
|
+
{{#unless variable_name}}
|
|
171
|
+
Content when false
|
|
172
|
+
{{/unless}}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## What Gets Injected at Compile Time
|
|
176
|
+
|
|
177
|
+
The `tools/cli/lib/agent/compiler.js` automatically adds:
|
|
178
|
+
|
|
179
|
+
1. **YAML Frontmatter**
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
---
|
|
183
|
+
name: 'agent name'
|
|
184
|
+
description: 'Agent Title'
|
|
185
|
+
---
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
2. **Activation Block**
|
|
189
|
+
- Load persona step
|
|
190
|
+
- Load core config for {user_name}, {communication_language}
|
|
191
|
+
- Agent-specific critical_actions as numbered steps
|
|
192
|
+
- Menu display and input handling
|
|
193
|
+
- Menu handlers (action/workflow/exec/tmpl) based on usage
|
|
194
|
+
- Rules section
|
|
195
|
+
|
|
196
|
+
3. **Auto-Injected Menu Items**
|
|
197
|
+
- `*help` always first
|
|
198
|
+
- `*exit` always last
|
|
199
|
+
|
|
200
|
+
4. **Trigger Prefixing**
|
|
201
|
+
- Triggers without `*` get it added automatically
|
|
202
|
+
|
|
203
|
+
## Reference Example
|
|
204
|
+
|
|
205
|
+
See: `src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml`
|
|
206
|
+
|
|
207
|
+
Features demonstrated:
|
|
208
|
+
|
|
209
|
+
- Handlebars conditionals for style variations
|
|
210
|
+
- Multiple prompt templates with semantic XML tags
|
|
211
|
+
- Install config with choice, boolean, and text questions
|
|
212
|
+
- Menu items using both `#id` references and inline actions
|
|
213
|
+
|
|
214
|
+
## Installation
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Copy to your project
|
|
218
|
+
cp /path/to/commit-poet.agent.yaml .bmad/custom/agents/
|
|
219
|
+
|
|
220
|
+
# Install with personalization
|
|
221
|
+
bmad agent-install
|
|
222
|
+
# or: npx bmad agent-install
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The installer:
|
|
226
|
+
|
|
227
|
+
1. Prompts for personalization (name, preferences)
|
|
228
|
+
2. Processes Handlebars templates with your answers
|
|
229
|
+
3. Compiles YAML to XML-in-markdown
|
|
230
|
+
4. Creates IDE slash commands
|
|
231
|
+
5. Saves source for reinstallation
|
|
232
|
+
|
|
233
|
+
## Best Practices
|
|
234
|
+
|
|
235
|
+
1. **Use first-person voice** in all persona elements
|
|
236
|
+
2. **Keep prompts focused** - one clear purpose per prompt
|
|
237
|
+
3. **Leverage Handlebars** for user customization without code changes
|
|
238
|
+
4. **Provide sensible defaults** in install_config
|
|
239
|
+
5. **Use semantic XML tags** in prompt content for clarity
|
|
240
|
+
6. **Test all conditional paths** before distribution
|
|
241
|
+
|
|
242
|
+
## Common Patterns
|
|
243
|
+
|
|
244
|
+
### Style Variants
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
communication_style: |
|
|
248
|
+
{{#if enthusiasm == "high"}}
|
|
249
|
+
Enthusiastic and energetic approach!
|
|
250
|
+
{{/if}}
|
|
251
|
+
{{#if enthusiasm == "moderate"}}
|
|
252
|
+
Balanced and professional demeanor.
|
|
253
|
+
{{/if}}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Feature Toggles
|
|
257
|
+
|
|
258
|
+
```yaml
|
|
259
|
+
prompts:
|
|
260
|
+
- id: main-action
|
|
261
|
+
content: |
|
|
262
|
+
{{#if advanced_mode}}
|
|
263
|
+
Include advanced analysis steps...
|
|
264
|
+
{{/if}}
|
|
265
|
+
{{#unless advanced_mode}}
|
|
266
|
+
Basic analysis only...
|
|
267
|
+
{{/unless}}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### User Personalization
|
|
271
|
+
|
|
272
|
+
```yaml
|
|
273
|
+
identity: |
|
|
274
|
+
{{#if custom_name}}
|
|
275
|
+
Known as {{custom_name}} to you.
|
|
276
|
+
{{/if}}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Validation Checklist
|
|
280
|
+
|
|
281
|
+
- [ ] Valid YAML syntax
|
|
282
|
+
- [ ] All metadata fields present (id, name, title, icon, type)
|
|
283
|
+
- [ ] Persona complete (role, identity, communication_style, principles)
|
|
284
|
+
- [ ] Prompts have unique IDs
|
|
285
|
+
- [ ] Menu triggers don't start with `*` (auto-added)
|
|
286
|
+
- [ ] Install config questions have defaults
|
|
287
|
+
- [ ] Handlebars syntax is correct
|
|
288
|
+
- [ ] File named `{agent-name}.agent.yaml`
|