create-byan-agent 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/LICENSE +21 -0
- package/README.md +54 -6
- package/bin/create-byan-agent-backup.js +220 -0
- package/bin/create-byan-agent-fixed.js +301 -0
- package/bin/create-byan-agent.js +111 -30
- package/package.json +21 -9
- package/templates/.github/agents/bmad-agent-bmad-master.md +15 -0
- package/templates/.github/agents/bmad-agent-bmb-agent-builder.md +15 -0
- package/templates/.github/agents/bmad-agent-bmb-module-builder.md +15 -0
- package/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-analyst.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-architect.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-dev.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-pm.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-quinn.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-sm.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-tech-writer.md +15 -0
- package/templates/.github/agents/bmad-agent-bmm-ux-designer.md +15 -0
- package/templates/.github/agents/bmad-agent-byan.md +224 -0
- package/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +15 -0
- package/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +15 -0
- package/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +15 -0
- package/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +15 -0
- package/templates/.github/agents/bmad-agent-cis-presentation-master.md +15 -0
- package/templates/.github/agents/bmad-agent-cis-storyteller.md +15 -0
- package/templates/.github/agents/bmad-agent-marc.md +48 -0
- package/templates/.github/agents/bmad-agent-rachid.md +47 -0
- package/templates/.github/agents/bmad-agent-tea-tea.md +15 -0
- package/templates/_bmad/bmb/agents/agent-builder.md +59 -0
- package/templates/_bmad/bmb/agents/byan.md +215 -0
- package/templates/_bmad/bmb/agents/marc.md +303 -0
- package/templates/_bmad/bmb/agents/module-builder.md +60 -0
- package/templates/_bmad/bmb/agents/rachid.md +184 -0
- package/templates/_bmad/bmb/agents/workflow-builder.md +61 -0
- package/templates/_bmad/bmb/workflows/byan/data/mantras.yaml +272 -0
- package/templates/_bmad/bmb/workflows/byan/data/templates.yaml +59 -0
- package/templates/_bmad/bmb/workflows/byan/delete-agent-workflow.md +657 -0
- package/templates/_bmad/bmb/workflows/byan/edit-agent-workflow.md +688 -0
- package/templates/_bmad/bmb/workflows/byan/interview-workflow.md +753 -0
- package/templates/_bmad/bmb/workflows/byan/quick-create-workflow.md +450 -0
- package/templates/_bmad/bmb/workflows/byan/templates/base-agent-template.md +79 -0
- package/templates/_bmad/bmb/workflows/byan/validate-agent-workflow.md +676 -0
- package/install.sh +0 -239
- package/package-npm.json +0 -55
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
# BYAN Quick Create Workflow
|
|
2
|
+
|
|
3
|
+
**Workflow:** Quick Agent Creation (Minimal Questions)
|
|
4
|
+
**Duration:** 10 minutes
|
|
5
|
+
**Methodology:** Merise Agile + TDD (with sensible defaults)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## OVERVIEW
|
|
10
|
+
|
|
11
|
+
Quick Create is for experienced users who want to create agents fast with minimal interview.
|
|
12
|
+
|
|
13
|
+
**Key Differences from Full Interview:**
|
|
14
|
+
- Uses existing ProjectContext (no Phase 1 or 2)
|
|
15
|
+
- Assumes sensible defaults
|
|
16
|
+
- Only asks essential questions
|
|
17
|
+
- 10 min vs 30-45 min
|
|
18
|
+
|
|
19
|
+
**When to Use:**
|
|
20
|
+
- You've already done a full interview for the project
|
|
21
|
+
- You want to create multiple agents quickly
|
|
22
|
+
- You're comfortable with BMAD agent structure
|
|
23
|
+
- You know exactly what you need
|
|
24
|
+
|
|
25
|
+
**When NOT to Use:**
|
|
26
|
+
- First agent for a new project → Use full interview
|
|
27
|
+
- Complex or critical agent → Use full interview
|
|
28
|
+
- Uncertain about requirements → Use full interview
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## PREREQUISITES
|
|
33
|
+
|
|
34
|
+
**Required:**
|
|
35
|
+
- ProjectContext must exist for this project
|
|
36
|
+
- User must know agent role and capabilities
|
|
37
|
+
|
|
38
|
+
**Validate before starting:**
|
|
39
|
+
```
|
|
40
|
+
"Quick Create requires an existing project context.
|
|
41
|
+
|
|
42
|
+
Available projects:
|
|
43
|
+
[List all ProjectContext with project_name]
|
|
44
|
+
|
|
45
|
+
Which project is this agent for? (or type 'new' for full interview)"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If no ProjectContext exists:
|
|
49
|
+
```
|
|
50
|
+
"No project context found. Quick Create requires project context.
|
|
51
|
+
|
|
52
|
+
You have two options:
|
|
53
|
+
1. [INT] Start full interview (30-45 min) to create project context
|
|
54
|
+
2. [EXIT] Exit and come back later
|
|
55
|
+
|
|
56
|
+
Which do you prefer?"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## QUICK CREATE FLOW
|
|
62
|
+
|
|
63
|
+
### Step 1: Load Project Context
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
"Loading project context for: {project_name}
|
|
67
|
+
|
|
68
|
+
PROJECT: {project_description}
|
|
69
|
+
DOMAIN: {domain}
|
|
70
|
+
GLOSSARY: {n} concepts
|
|
71
|
+
TECH STACK: {stack}
|
|
72
|
+
|
|
73
|
+
Ready to create a new agent for this project.
|
|
74
|
+
"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 2: Agent Name & Role
|
|
78
|
+
|
|
79
|
+
**Q1: Agent Name (kebab-case)**
|
|
80
|
+
```
|
|
81
|
+
"What's the agent name? (kebab-case, e.g., 'backend-expert', 'test-specialist')
|
|
82
|
+
|
|
83
|
+
Name: _____
|
|
84
|
+
"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Validate:
|
|
88
|
+
- Must be kebab-case: ^[a-z0-9]+(-[a-z0-9]+)*$
|
|
89
|
+
- Must be unique (RG-AGT-001)
|
|
90
|
+
- Suggest if name is too generic:
|
|
91
|
+
```
|
|
92
|
+
"The name 'helper' is very generic. More specific names are better.
|
|
93
|
+
Suggestions based on your domain:
|
|
94
|
+
- {domain}-backend-expert
|
|
95
|
+
- {domain}-api-specialist
|
|
96
|
+
- {domain}-test-engineer
|
|
97
|
+
|
|
98
|
+
Use 'helper' anyway? (yes/no)"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Q2: Role (one sentence)**
|
|
102
|
+
```
|
|
103
|
+
"What's this agent's role? (one sentence, like a job title)
|
|
104
|
+
|
|
105
|
+
Example: 'Backend API specialist who ensures RESTful best practices'
|
|
106
|
+
|
|
107
|
+
Role: _____
|
|
108
|
+
"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 3: Capabilities (Minimum 3)
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
"What are the 3 most critical capabilities? (minimum 3, can add more)
|
|
115
|
+
|
|
116
|
+
Think in terms of CREATE, ANALYZE, REVIEW, OPTIMIZE, TEACH.
|
|
117
|
+
|
|
118
|
+
Examples:
|
|
119
|
+
- 'Generate API endpoints with OpenAPI specs'
|
|
120
|
+
- 'Review database queries for N+1 problems'
|
|
121
|
+
- 'Create integration tests with realistic fixtures'
|
|
122
|
+
|
|
123
|
+
Capability 1: _____
|
|
124
|
+
Capability 2: _____
|
|
125
|
+
Capability 3: _____
|
|
126
|
+
More? (press Enter to skip)
|
|
127
|
+
"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Validate RG-AGT-002: >= 3 capabilities
|
|
131
|
+
|
|
132
|
+
**Auto-categorize capabilities:**
|
|
133
|
+
```python
|
|
134
|
+
capability_categories = {
|
|
135
|
+
"generate|create|build|scaffold": "create",
|
|
136
|
+
"analyze|review|audit|check": "analyze",
|
|
137
|
+
"optimize|improve|refactor": "optimize",
|
|
138
|
+
"teach|explain|guide": "teach"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Step 4: Mantras (Auto-suggest + Custom)
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
"Which mantras should this agent prioritize?
|
|
146
|
+
|
|
147
|
+
I'll suggest 5 based on your role and capabilities.
|
|
148
|
+
You can accept these or customize.
|
|
149
|
+
|
|
150
|
+
SUGGESTED MANTRAS:
|
|
151
|
+
[Auto-suggest based on role/capabilities]
|
|
152
|
+
1. Mantra #{id}: {name} - {why relevant}
|
|
153
|
+
2. Mantra #{id}: {name} - {why relevant}
|
|
154
|
+
3. Mantra #{id}: {name} - {why relevant}
|
|
155
|
+
4. Mantra #{id}: {name} - {why relevant}
|
|
156
|
+
5. Mantra #{id}: {name} - {why relevant}
|
|
157
|
+
|
|
158
|
+
Accept these suggestions? (yes/no/show-all)
|
|
159
|
+
"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Auto-suggestion logic:**
|
|
163
|
+
```python
|
|
164
|
+
def suggest_mantras(role, capabilities):
|
|
165
|
+
suggestions = []
|
|
166
|
+
|
|
167
|
+
# Always include
|
|
168
|
+
suggestions.append(37) # Ockham's Razor
|
|
169
|
+
suggestions.append(39) # Consequences
|
|
170
|
+
|
|
171
|
+
# Role-based
|
|
172
|
+
if "backend" in role.lower():
|
|
173
|
+
suggestions.append(4) # Fail Fast
|
|
174
|
+
suggestions.append(20) # Performance
|
|
175
|
+
suggestions.append(18) # TDD
|
|
176
|
+
elif "test" in role.lower():
|
|
177
|
+
suggestions.append(18) # TDD
|
|
178
|
+
suggestions.append(19) # Test Behavior
|
|
179
|
+
suggestions.append(16) # Challenge Before Confirm (IA)
|
|
180
|
+
elif "frontend" in role.lower():
|
|
181
|
+
suggestions.append(12) # UX is Priority
|
|
182
|
+
suggestions.append(20) # Performance
|
|
183
|
+
suggestions.append(7) # KISS
|
|
184
|
+
|
|
185
|
+
# Capability-based
|
|
186
|
+
for cap in capabilities:
|
|
187
|
+
if "security" in cap.lower():
|
|
188
|
+
suggestions.append(21) # Security by Design
|
|
189
|
+
if "optimize" in cap.lower():
|
|
190
|
+
suggestions.append(20) # Performance
|
|
191
|
+
if "review" in cap.lower():
|
|
192
|
+
suggestions.append(16) # Challenge Before Confirm (IA)
|
|
193
|
+
|
|
194
|
+
# Dedupe and take first 5
|
|
195
|
+
return list(set(suggestions))[:5]
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
If user says "show-all":
|
|
199
|
+
```
|
|
200
|
+
"Full list of 64 mantras available in {project-root}/_bmad-output/guide-reference-rapide-merise-agile-tdd.md
|
|
201
|
+
|
|
202
|
+
Or I can list them here by category:
|
|
203
|
+
1. Show Conception Mantras (39)
|
|
204
|
+
2. Show AI Agent Mantras (25)
|
|
205
|
+
3. Keep suggestions
|
|
206
|
+
|
|
207
|
+
What would you like?"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Step 5: Communication Style (Quick)
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
"Communication style for this agent? Pick one:
|
|
214
|
+
|
|
215
|
+
1. CONCISE - Direct, minimal words, assumes expertise
|
|
216
|
+
2. EDUCATIONAL - Detailed explanations, examples, teaches as it works
|
|
217
|
+
3. BALANCED - Mix of both, adapts to context
|
|
218
|
+
|
|
219
|
+
Your choice (1/2/3): ___
|
|
220
|
+
"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Step 6: Quick Validation
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
"Let me confirm what we're creating:
|
|
227
|
+
|
|
228
|
+
AGENT: {agent_name}
|
|
229
|
+
ROLE: {role}
|
|
230
|
+
CAPABILITIES: {n} capabilities
|
|
231
|
+
- {capability_1}
|
|
232
|
+
- {capability_2}
|
|
233
|
+
- {capability_3}
|
|
234
|
+
...
|
|
235
|
+
MANTRAS: {n} mantras
|
|
236
|
+
- Mantra #{id}: {name}
|
|
237
|
+
...
|
|
238
|
+
STYLE: {communication_style}
|
|
239
|
+
PROJECT: {project_name}
|
|
240
|
+
|
|
241
|
+
This will take ~30 seconds to generate.
|
|
242
|
+
|
|
243
|
+
Proceed? (yes/no/edit)"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
If "edit":
|
|
247
|
+
```
|
|
248
|
+
"What needs adjustment?
|
|
249
|
+
1. Agent name
|
|
250
|
+
2. Role
|
|
251
|
+
3. Capabilities
|
|
252
|
+
4. Mantras
|
|
253
|
+
5. Communication style
|
|
254
|
+
6. Cancel
|
|
255
|
+
|
|
256
|
+
Choice: ___"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## GENERATION
|
|
262
|
+
|
|
263
|
+
### Create AgentSpec
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
agent_spec = AgentSpec.create(
|
|
267
|
+
context_id=context.id,
|
|
268
|
+
agent_name=answers['agent_name'],
|
|
269
|
+
role=answers['role'],
|
|
270
|
+
responsibilities=[], # Auto-derive from capabilities
|
|
271
|
+
knowledge_business=context.glossaire.keys(), # Inherit from context
|
|
272
|
+
knowledge_technical=context.stack_tech, # Inherit from context
|
|
273
|
+
capabilities=answers['capabilities'],
|
|
274
|
+
mantras_applied=answers['mantras'],
|
|
275
|
+
communication_style=answers['communication_style'],
|
|
276
|
+
use_cases=[], # Will be empty for quick create
|
|
277
|
+
status="draft"
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
# Validate
|
|
281
|
+
agent_spec.validate() # RG-AGT-001, 002, 003 checked
|
|
282
|
+
|
|
283
|
+
# Save
|
|
284
|
+
agent_spec.save()
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Handle validation failures:**
|
|
288
|
+
```
|
|
289
|
+
"Validation failed:
|
|
290
|
+
- {error_1}
|
|
291
|
+
- {error_2}
|
|
292
|
+
|
|
293
|
+
Quick fixes:
|
|
294
|
+
{suggested_fixes}
|
|
295
|
+
|
|
296
|
+
Try again? (yes/no)"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## COMPLETION
|
|
302
|
+
|
|
303
|
+
### Success Message
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
"Agent created successfully!
|
|
307
|
+
|
|
308
|
+
AGENT: {agent_name}
|
|
309
|
+
STATUS: Validated and ready for file generation
|
|
310
|
+
LOCATION: _bmad/{module}/agents/{agent_name}.md (pending generation)
|
|
311
|
+
|
|
312
|
+
NEXT STEPS:
|
|
313
|
+
1. Generate agent file for platform
|
|
314
|
+
2. Test the agent
|
|
315
|
+
3. Iterate based on usage
|
|
316
|
+
|
|
317
|
+
Generate files now for which platform(s)?
|
|
318
|
+
- copilot (GitHub Copilot CLI)
|
|
319
|
+
- vscode (VSCode extension)
|
|
320
|
+
- claude (Claude Code)
|
|
321
|
+
- codex (Codex)
|
|
322
|
+
- all (all platforms)
|
|
323
|
+
- later (exit, generate later)
|
|
324
|
+
|
|
325
|
+
Platform: ____
|
|
326
|
+
"
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### If "later":
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
"Agent spec saved! You can generate files anytime with:
|
|
333
|
+
|
|
334
|
+
[BYAN Menu] > Generate Files
|
|
335
|
+
|
|
336
|
+
Or via CLI:
|
|
337
|
+
byan generate {agent_name} --platform=copilot
|
|
338
|
+
|
|
339
|
+
Session summary saved to:
|
|
340
|
+
{output_folder}/quick-create-{agent_name}-{timestamp}.md
|
|
341
|
+
"
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## DEFAULTS APPLIED
|
|
347
|
+
|
|
348
|
+
Quick Create uses these defaults:
|
|
349
|
+
|
|
350
|
+
**Responsibilities:** Auto-derived from capabilities
|
|
351
|
+
```python
|
|
352
|
+
def derive_responsibilities(capabilities):
|
|
353
|
+
return [cap['description'] for cap in capabilities]
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Use Cases:** Left empty (can be added later)
|
|
357
|
+
|
|
358
|
+
**Knowledge:** Inherited from ProjectContext
|
|
359
|
+
- Business: All glossary concepts
|
|
360
|
+
- Technical: Full tech stack
|
|
361
|
+
|
|
362
|
+
**Menu Structure:** Standard BMAD menu
|
|
363
|
+
```
|
|
364
|
+
[MH] Menu Help
|
|
365
|
+
[CH] Chat
|
|
366
|
+
[TASK] Execute primary task
|
|
367
|
+
[EXIT] Dismiss
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Persona Template:** Based on role + communication style
|
|
371
|
+
|
|
372
|
+
**Anti-patterns:** Standard set from 64 mantras
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## ERROR HANDLING
|
|
377
|
+
|
|
378
|
+
**No ProjectContext:**
|
|
379
|
+
```
|
|
380
|
+
"ERROR: No project context found.
|
|
381
|
+
|
|
382
|
+
Quick Create requires existing context. Please:
|
|
383
|
+
1. Run full interview first: [INT]
|
|
384
|
+
2. Or import existing context
|
|
385
|
+
|
|
386
|
+
Cannot proceed with Quick Create."
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
**Duplicate Agent Name:**
|
|
390
|
+
```
|
|
391
|
+
"ERROR: Agent '{agent_name}' already exists.
|
|
392
|
+
|
|
393
|
+
Existing agents in this project:
|
|
394
|
+
- {agent_1}
|
|
395
|
+
- {agent_2}
|
|
396
|
+
...
|
|
397
|
+
|
|
398
|
+
Choose a different name or edit existing agent."
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Insufficient Capabilities:**
|
|
402
|
+
```
|
|
403
|
+
"ERROR: Need at least 3 capabilities (you provided {n}).
|
|
404
|
+
|
|
405
|
+
Please provide {3-n} more capabilities."
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## COMPARISON: Full Interview vs Quick Create
|
|
411
|
+
|
|
412
|
+
| Aspect | Full Interview | Quick Create |
|
|
413
|
+
|--------|----------------|--------------|
|
|
414
|
+
| Duration | 30-45 min | 10 min |
|
|
415
|
+
| Project Context | Created | Reused |
|
|
416
|
+
| Business Glossary | Interactive creation | Inherited |
|
|
417
|
+
| Capabilities | Deep exploration | Quick list |
|
|
418
|
+
| Mantras | Justified selection | Auto-suggested |
|
|
419
|
+
| Use Cases | Minimum 3 required | Optional |
|
|
420
|
+
| Validation | Extensive | Basic |
|
|
421
|
+
| Suitable for | First agent, critical agents | Additional agents |
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## SUCCESS CRITERIA
|
|
426
|
+
|
|
427
|
+
✅ ProjectContext exists
|
|
428
|
+
✅ Agent name unique and valid format
|
|
429
|
+
✅ RG-AGT-002: >= 3 capabilities
|
|
430
|
+
✅ RG-AGT-003: >= 5 mantras
|
|
431
|
+
✅ AgentSpec validated
|
|
432
|
+
✅ User confirmed creation
|
|
433
|
+
✅ Completed in < 15 minutes
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## NEXT WORKFLOW
|
|
438
|
+
|
|
439
|
+
After Quick Create, automatically offer:
|
|
440
|
+
```
|
|
441
|
+
"Agent created!
|
|
442
|
+
|
|
443
|
+
Want to enhance it?
|
|
444
|
+
- [VA] Validate against all 64 mantras
|
|
445
|
+
- [EA] Edit to add use cases or refine
|
|
446
|
+
- Generate files now
|
|
447
|
+
- Exit
|
|
448
|
+
|
|
449
|
+
What would you like to do?"
|
|
450
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "{agent_name}"
|
|
3
|
+
description: "{agent_description}"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
|
|
7
|
+
|
|
8
|
+
```xml
|
|
9
|
+
<agent id="{agent_id}" name="{agent_display_name}" title="{agent_title}" icon="{agent_icon}">
|
|
10
|
+
<activation critical="MANDATORY">
|
|
11
|
+
<step n="1">Load persona from this current agent file (already in context)</step>
|
|
12
|
+
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
|
|
13
|
+
- Load and read {project-root}/_bmad/{module}/config.yaml NOW
|
|
14
|
+
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
|
|
15
|
+
- VERIFY: If config not loaded, STOP and report error to user
|
|
16
|
+
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored
|
|
17
|
+
</step>
|
|
18
|
+
<step n="3">Remember: user's name is {user_name}</step>
|
|
19
|
+
|
|
20
|
+
<step n="4">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of ALL menu items from menu section</step>
|
|
21
|
+
<step n="5">Let {user_name} know they can type command `/bmad-help` at any time to get advice on what to do next, and that they can combine that with what they need help with <example>`/bmad-help {example_help_query}`</example></step>
|
|
22
|
+
<step n="6">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or cmd trigger or fuzzy command match</step>
|
|
23
|
+
<step n="7">On user input: Number → process menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user to clarify | No match → show "Not recognized"</step>
|
|
24
|
+
<step n="8">When processing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
|
|
25
|
+
|
|
26
|
+
<menu-handlers>
|
|
27
|
+
<handlers>
|
|
28
|
+
<handler type="exec">
|
|
29
|
+
When menu item or handler has: exec="path/to/file.md":
|
|
30
|
+
1. Read fully and follow the file at that path
|
|
31
|
+
2. Process the complete file and follow all instructions within it
|
|
32
|
+
3. If there is data="some/path/data-foo.md" with the same item, pass that data path to the executed file as context.
|
|
33
|
+
</handler>
|
|
34
|
+
</handlers>
|
|
35
|
+
</menu-handlers>
|
|
36
|
+
|
|
37
|
+
<rules>
|
|
38
|
+
<r>ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style.</r>
|
|
39
|
+
<r>Stay in character until exit selected</r>
|
|
40
|
+
<r>Display Menu items as the item dictates and in the order given.</r>
|
|
41
|
+
<r>Load files ONLY when executing a user chosen workflow or a command requires it, EXCEPTION: agent activation step 2 config.yaml</r>
|
|
42
|
+
{custom_rules}
|
|
43
|
+
</rules>
|
|
44
|
+
</activation>
|
|
45
|
+
|
|
46
|
+
<persona>
|
|
47
|
+
<role>{role}</role>
|
|
48
|
+
<identity>{identity}</identity>
|
|
49
|
+
<communication_style>{communication_style}</communication_style>
|
|
50
|
+
<principles>{principles}</principles>
|
|
51
|
+
{mantras_section}
|
|
52
|
+
</persona>
|
|
53
|
+
|
|
54
|
+
{knowledge_base_section}
|
|
55
|
+
|
|
56
|
+
<menu>
|
|
57
|
+
<item cmd="MH or fuzzy match on menu or help">[MH] Redisplay Menu Help</item>
|
|
58
|
+
<item cmd="CH or fuzzy match on chat">[CH] Chat with {agent_display_name} about anything</item>
|
|
59
|
+
{custom_menu_items}
|
|
60
|
+
<item cmd="EXIT or fuzzy match on exit, leave, goodbye or dismiss agent">[EXIT] Dismiss {agent_display_name}</item>
|
|
61
|
+
</menu>
|
|
62
|
+
|
|
63
|
+
<capabilities>
|
|
64
|
+
{capabilities_list}
|
|
65
|
+
</capabilities>
|
|
66
|
+
|
|
67
|
+
<anti_patterns>
|
|
68
|
+
{anti_patterns_list}
|
|
69
|
+
</anti_patterns>
|
|
70
|
+
|
|
71
|
+
<exit_protocol>
|
|
72
|
+
When user selects EXIT:
|
|
73
|
+
1. {exit_step_1}
|
|
74
|
+
2. {exit_step_2}
|
|
75
|
+
3. {exit_step_3}
|
|
76
|
+
4. Return control to user
|
|
77
|
+
</exit_protocol>
|
|
78
|
+
</agent>
|
|
79
|
+
```
|