Skip to content

Commit 973b8b5

Browse files
committed
feat(BMAD): add scrum master and developer agents with workflows
Add comprehensive scrum master (Bob) and developer (Amelia) agents with supporting templates and workflows: - Sprint planning and status tracking - Story creation and validation - Developer implementation and code review - Extensive checklists and documentation - Integration with existing BMAD workflow system
1 parent d272025 commit 973b8b5

File tree

18 files changed

+1900
-12
lines changed

18 files changed

+1900
-12
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ src/shared/runtime/resource-manifest.ts
2828

2929
# MkDocs build output
3030
site/
31+
_bmad
32+
_bmad-*
33+
.claude

config/main.agents.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,45 @@ module.exports = [
200200
path.join(promptsDir, 'bmad', '02-pm', '03-readiness', 'chained', 'step-05-complete.md'),
201201
],
202202
},
203+
{
204+
id: 'bmad-sprints',
205+
name: 'Bob [SM: Sprints]',
206+
description: 'BMAD SM for sprint status generation from epics',
207+
promptPath: [
208+
path.join(promptsDir, 'bmad', '06-sm', 'bob.md'),
209+
path.join(promptsDir, 'bmad', '06-sm', '01-sprint-planning', 'instructions.md'),
210+
],
211+
},
212+
{
213+
id: 'bmad-stories',
214+
name: 'Bob [SM: Create Story]',
215+
description: 'BMAD SM for creating developer-ready story files',
216+
promptPath: [
217+
path.join(promptsDir, 'bmad', '06-sm', 'bob.md'),
218+
path.join(promptsDir, 'bmad', '06-sm', '02-create-story', 'instructions.xml'),
219+
path.join(promptsDir, 'bmad', '06-sm', '02-create-story', 'checklist.md'),
220+
],
221+
},
222+
{
223+
id: 'bmad-dev',
224+
name: 'Amelia [Dev: Story]',
225+
description: 'BMAD Developer for story implementation',
226+
promptPath: [
227+
path.join(promptsDir, 'bmad', '07-dev', 'amelia.md'),
228+
path.join(promptsDir, 'bmad', '07-dev', '01-dev-story', 'instructions.xml'),
229+
path.join(promptsDir, 'bmad', '07-dev', '01-dev-story', 'checklist.md'),
230+
],
231+
},
232+
{
233+
id: 'bmad-review',
234+
name: 'Amelia [Dev: Code Review]',
235+
description: 'BMAD Developer for code review',
236+
promptPath: [
237+
path.join(promptsDir, 'bmad', '07-dev', 'amelia.md'),
238+
path.join(promptsDir, 'bmad', '07-dev', '02-code-review', 'instructions.xml'),
239+
path.join(promptsDir, 'bmad', '07-dev', '02-code-review', 'checklist.md'),
240+
],
241+
},
203242

204243
// Test agents
205244
{

config/placeholders.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ module.exports = {
3838

3939
// BMAD TEA workflow shared files
4040
test_design_template: path.join('prompts', 'templates', 'bmad', '05-tea', '01-test-design', 'test-design-template.md'),
41+
42+
// BMAD SM workflow shared files
43+
sprint_status_template: path.join('prompts', 'templates', 'bmad', '06-sm', '01-sprint-planning', 'sprint-status-template.yaml'),
44+
story_template: path.join('prompts', 'templates', 'bmad', '06-sm', '02-create-story', 'template.md'),
4145
}
4246
};

prompts/templates/bmad/02-pm/01-prd/chained/step-10-complete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ I've successfully collaborated with you to create a comprehensive Product Requir
6262
- ✅ Comprehensive Functional Requirements (capability contract)
6363
- ✅ Non-Functional Requirements for quality attributes
6464

65-
**The complete PRD is now available at:** `{output_folder}/prd.md`
65+
**The complete PRD is now available at:** `.codemachine/artifacts/prd.md`
6666

6767
This document is now ready to guide UX design, technical architecture, and development planning."
6868

prompts/templates/bmad/05-tea/01-test-design/instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ The workflow auto-detects which mode to use based on project phase.
2525
### Mode Detection
2626

2727
1. **Check for sprint-status.yaml**
28-
- If `{output_folder}/bmm-sprint-status.yaml` exists → **Epic-Level Mode** (Phase 4)
28+
- If `.codemachine/artifacts/bmm-sprint-status.yaml` exists → **Epic-Level Mode** (Phase 4)
2929
- If NOT exists → Check workflow status
3030

3131
2. **Check workflow-status.yaml**
32-
- Read `{output_folder}/bmm-workflow-status.yaml`
32+
- Read `.codemachine/artifacts/bmm-workflow-status.yaml`
3333
- If `implementation-readiness: required` or `implementation-readiness: recommended`**System-Level Mode** (Phase 3)
3434
- Otherwise → **Epic-Level Mode** (Phase 4 without sprint status yet)
3535

@@ -39,14 +39,14 @@ The workflow auto-detects which mode to use based on project phase.
3939
- ✅ Architecture document exists (architecture.md or tech-spec)
4040
- ✅ PRD exists with functional and non-functional requirements
4141
- ✅ Epics documented (epics.md)
42-
- ⚠️ Output: `{output_folder}/test-design-system.md`
42+
- ⚠️ Output: `.codemachine/artifacts/test-design-system.md`
4343

4444
**Epic-Level Mode (Phase 4 - Per-Epic Planning):**
4545
- ✅ Story markdown with acceptance criteria available
4646
- ✅ PRD or epic documentation exists for context
4747
- ✅ Architecture documents available (optional but recommended)
4848
- ✅ Requirements are clear and testable
49-
- ⚠️ Output: `{output_folder}/test-design-epic-{epic_num}.md`
49+
- ⚠️ Output: `.codemachine/artifacts/test-design-epic-{epic_num}.md`
5050

5151
**Halt Condition:** If mode cannot be determined or required files missing, HALT and notify user with missing prerequisites.
5252

@@ -180,7 +180,7 @@ The workflow auto-detects which mode to use based on project phase.
180180

181181
6. **Output System-Level Test Design**
182182

183-
Write to `{output_folder}/test-design-system.md` containing:
183+
Write to `.codemachine/artifacts/test-design-system.md` containing:
184184

185185
```markdown
186186
# System-Level Test Design
@@ -593,7 +593,7 @@ The workflow auto-detects which mode to use based on project phase.
593593

594594
6. **Write to Output File**
595595

596-
Save to `{output_folder}/test-design-epic-{epic_num}.md` using template structure.
596+
Save to `.codemachine/artifacts/test-design-epic-{epic_num}.md` using template structure.
597597

598598
---
599599

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Sprint Planning Validation Checklist
2+
3+
## Core Validation
4+
5+
### Complete Coverage Check
6+
7+
- [ ] Every epic found in epic\*.md files appears in sprint-status.yaml
8+
- [ ] Every story found in epic\*.md files appears in sprint-status.yaml
9+
- [ ] Every epic has a corresponding retrospective entry
10+
- [ ] No items in sprint-status.yaml that don't exist in epic files
11+
12+
### Parsing Verification
13+
14+
Compare epic files against generated sprint-status.yaml:
15+
16+
```
17+
Epic Files Contains: Sprint Status Contains:
18+
✓ Epic 1 ✓ epic-1: [status]
19+
✓ Story 1.1: User Auth ✓ 1-1-user-auth: [status]
20+
✓ Story 1.2: Account Mgmt ✓ 1-2-account-mgmt: [status]
21+
✓ Story 1.3: Plant Naming ✓ 1-3-plant-naming: [status]
22+
✓ epic-1-retrospective: [status]
23+
✓ Epic 2 ✓ epic-2: [status]
24+
✓ Story 2.1: Personality Model ✓ 2-1-personality-model: [status]
25+
✓ Story 2.2: Chat Interface ✓ 2-2-chat-interface: [status]
26+
✓ epic-2-retrospective: [status]
27+
```
28+
29+
### Final Check
30+
31+
- [ ] Total count of epics matches
32+
- [ ] Total count of stories matches
33+
- [ ] All items are in the expected order (epic, stories, retrospective)
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
name: sprint-planning
3+
description: 'Generate and manage sprint status tracking file, extracting all epics and stories and tracking their status through the development lifecycle'
4+
---
5+
6+
# Sprint Planning - Sprint Status Generator
7+
8+
## EPICS
9+
10+
{epics}
11+
12+
## SPRINT STATUS TEMPLATE
13+
14+
{sprint_status_template}
15+
16+
---
17+
18+
## Step 1: Parse Epics and Extract All Work Items
19+
20+
For each epic, extract:
21+
22+
- Epic numbers from headers like `## Epic 1:` or `## Epic 2:`
23+
- Story IDs and titles from patterns like `### Story 1.1: User Authentication`
24+
- Convert story format from `Epic.Story: Title` to kebab-case key: `epic-story-title`
25+
26+
**Story ID Conversion Rules:**
27+
28+
- Original: `### Story 1.1: User Authentication`
29+
- Replace period with dash: `1-1`
30+
- Convert title to kebab-case: `user-authentication`
31+
- Final key: `1-1-user-authentication`
32+
33+
Build complete inventory of all epics and stories.
34+
35+
## Step 2: Build Sprint Status Structure
36+
37+
For each epic found, create entries in this order:
38+
39+
1. **Epic entry** - Key: `epic-{num}`, Default status: `backlog`
40+
2. **Story entries** - Key: `{epic}-{story}-{title}`, Default status: `backlog`
41+
3. **Retrospective entry** - Key: `epic-{num}-retrospective`, Default status: `optional`
42+
43+
**Example structure:**
44+
45+
```yaml
46+
development_status:
47+
epic-1: backlog
48+
1-1-user-authentication: backlog
49+
1-2-account-management: backlog
50+
epic-1-retrospective: optional
51+
```
52+
53+
## Step 3: Generate Sprint Status File
54+
55+
Create `.codemachine/artifacts/sprint-status.yaml` with:
56+
57+
**File Structure:**
58+
59+
```yaml
60+
# generated: {date}
61+
# project: {project_name}
62+
# project_key: {project_key}
63+
# tracking_system: {tracking_system}
64+
# story_location: {story_location}
65+
66+
# STATUS DEFINITIONS:
67+
# ==================
68+
# Epic Status:
69+
# - backlog: Epic not yet started
70+
# - in-progress: Epic actively being worked on
71+
# - done: All stories in epic completed
72+
#
73+
# Epic Status Transitions:
74+
# - backlog → in-progress: Automatically when first story is created (via create-story)
75+
# - in-progress → done: Manually when all stories reach 'done' status
76+
#
77+
# Story Status:
78+
# - backlog: Story only exists in epic file
79+
# - ready-for-dev: Story file created in stories folder
80+
# - in-progress: Developer actively working on implementation
81+
# - review: Ready for code review (via Dev's code-review workflow)
82+
# - done: Story completed
83+
#
84+
# Retrospective Status:
85+
# - optional: Can be completed but not required
86+
# - done: Retrospective has been completed
87+
#
88+
# WORKFLOW NOTES:
89+
# ===============
90+
# - Epic transitions to 'in-progress' automatically when first story is created
91+
# - Stories can be worked in parallel if team capacity allows
92+
# - SM typically creates next story after previous one is 'done' to incorporate learnings
93+
# - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended)
94+
95+
generated: { date }
96+
project: { project_name }
97+
project_key: { project_key }
98+
tracking_system: { tracking_system }
99+
story_location: { story_location }
100+
101+
development_status:
102+
# All epics, stories, and retrospectives in order
103+
```
104+
105+
<action>Write the complete sprint status YAML to .codemachine/artifacts/sprint-status.yaml</action>
106+
<action>CRITICAL: Metadata appears TWICE - once as comments (#) for documentation, once as YAML key:value fields for parsing</action>
107+
<action>Ensure all items are ordered: epic, its stories, its retrospective, next epic...</action>
108+
</step>
109+
110+
<step n="5" goal="Validate and report">
111+
<action>Perform validation checks:</action>
112+
113+
- [ ] Every epic in epic files appears in .codemachine/artifacts/sprint-status.yaml
114+
- [ ] Every story in epic files appears in .codemachine/artifacts/sprint-status.yaml
115+
- [ ] Every epic has a corresponding retrospective entry
116+
- [ ] No items in .codemachine/artifacts/sprint-status.yaml that don't exist in epic files
117+
- [ ] All status values are legal (match state machine definitions)
118+
- [ ] File is valid YAML syntax
119+
120+
<action>Count totals:</action>
121+
122+
- Total epics: {{epic_count}}
123+
- Total stories: {{story_count}}
124+
- Epics in-progress: {{in_progress_count}}
125+
- Stories done: {{done_count}}
126+
127+
<action>Display completion summary to {user_name} in {communication_language}:</action>
128+
129+
**Sprint Status Generated Successfully**
130+
131+
- **File Location:** .codemachine/artifacts/sprint-status.yaml
132+
- **Total Epics:** {{epic_count}}
133+
- **Total Stories:** {{story_count}}
134+
- **Epics In Progress:** {{epics_in_progress_count}}
135+
- **Stories Completed:** {{done_count}}
136+
137+
**Next Steps:**
138+
139+
1. Review the generated .codemachine/artifacts/sprint-status.yaml
140+
2. Use this file to track development progress
141+
3. Agents will update statuses as they work
142+
4. Re-run this workflow to refresh auto-detected statuses
143+
144+
</step>
145+
146+
</workflow>
147+
148+
## Additional Documentation
149+
150+
### Status State Machine
151+
152+
**Epic Status Flow:**
153+
154+
```
155+
backlog → in-progress → done
156+
```
157+
158+
- **backlog**: Epic not yet started
159+
- **in-progress**: Epic actively being worked on (stories being created/implemented)
160+
- **done**: All stories in epic completed
161+
162+
**Story Status Flow:**
163+
164+
```
165+
backlog → ready-for-dev → in-progress → review → done
166+
```
167+
168+
- **backlog**: Story only exists in epic file
169+
- **ready-for-dev**: Story file created (e.g., `stories/1-3-plant-naming.md`)
170+
- **in-progress**: Developer actively working
171+
- **review**: Ready for code review (via Dev's code-review workflow)
172+
- **done**: Completed
173+
174+
**Retrospective Status:**
175+
176+
```
177+
optional ↔ done
178+
```
179+
180+
- **optional**: Ready to be conducted but not required
181+
- **done**: Finished
182+
183+
### Guidelines
184+
185+
1. **Epic Activation**: Mark epic as `in-progress` when starting work on its first story
186+
2. **Sequential Default**: Stories are typically worked in order, but parallel work is supported
187+
3. **Parallel Work Supported**: Multiple stories can be `in-progress` if team capacity allows
188+
4. **Review Before Done**: Stories should pass through `review` before `done`
189+
5. **Learning Transfer**: SM typically creates next story after previous one is `done` to incorporate learnings

0 commit comments

Comments
 (0)