Skip to content

Commit 33fb46c

Browse files
committed
feat(bmad): add epics workflow with validation and story creation
Add new epics workflow including: - Configuration for epics agent in main.agents.js - New workflow steps for requirements validation, epic design, story creation and final validation - Template for epics document structure - Placeholder configuration for architecture artifacts - Updated workflow template to include epics step
1 parent 32d51b7 commit 33fb46c

File tree

10 files changed

+861
-1
lines changed

10 files changed

+861
-1
lines changed

config/main.agents.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = [
103103
description: 'BMAD product manager for PRD creation workflow',
104104
promptPath: [
105105
path.join(promptsDir, 'bmad', '02-pm', 'john.md'),
106-
path.join(promptsDir, 'bmad', '02-pm', 'workflow.md'),
106+
path.join(promptsDir, 'bmad', '02-pm', '01-prd', 'workflow.md'),
107107
path.join(promptsDir, 'bmad', '02-pm', '01-prd', 'chained', 'step-01-discovery.md'),
108108
],
109109
chainedPromptsPath: [
@@ -160,6 +160,21 @@ module.exports = [
160160
path.join(promptsDir, 'bmad', '04-architect', 'chained', 'step-07-complete.md'),
161161
],
162162
},
163+
{
164+
id: 'bmad-epics',
165+
name: 'John the PM - Epics',
166+
description: 'BMAD PM for epics and stories creation workflow',
167+
promptPath: [
168+
path.join(promptsDir, 'bmad', '02-pm', 'john.md'),
169+
path.join(promptsDir, 'bmad', '02-pm', '02-epics', 'workflow.md'),
170+
path.join(promptsDir, 'bmad', '02-pm', '02-epics', 'chained', 'step-01-validate-prerequisites.md'),
171+
],
172+
chainedPromptsPath: [
173+
path.join(promptsDir, 'bmad', '02-pm', '02-epics', 'chained', 'step-02-design-epics.md'),
174+
path.join(promptsDir, 'bmad', '02-pm', '02-epics', 'chained', 'step-03-create-stories.md'),
175+
path.join(promptsDir, 'bmad', '02-pm', '02-epics', 'chained', 'step-04-final-validation.md'),
176+
],
177+
},
163178

164179
// Test agents
165180
{

config/placeholders.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
product_brief: path.join('.codemachine', 'artifacts', 'product-brief-*.md'),
2020
prd: path.join('.codemachine', 'artifacts', 'prd-*.md'),
2121
ux_design_spec: path.join('.codemachine', 'artifacts', 'ux-design-spec-*.md'),
22+
architecture: path.join('.codemachine', 'artifacts', 'architecture-*.md'),
2223
},
2324

2425
// Paths relative to codemachine package root
File renamed without changes.
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
name: 'Step 1: Validate Prerequisites'
3+
description: 'Validate required documents exist and extract all requirements for epic and story creation'
4+
---
5+
6+
# Step 1: Validate Prerequisites and Extract Requirements
7+
8+
**Progress: Step 1 of 4** - Next: Design Epics
9+
10+
## STEP GOAL:
11+
12+
To validate that all required input documents exist and extract all requirements (FRs, NFRs, and additional requirements from UX/Architecture) needed for epic and story creation.
13+
14+
## MANDATORY EXECUTION RULES (READ FIRST):
15+
16+
- 🛑 NEVER generate content without user input
17+
- 📋 YOU ARE A FACILITATOR, not a content generator
18+
- ✅ You are a product strategist and technical specifications writer
19+
- ✅ We engage in collaborative dialogue, not command-response
20+
- ✅ You bring requirements extraction expertise
21+
- ✅ User brings their product vision and context
22+
23+
### Step-Specific Rules:
24+
25+
- 🎯 Focus ONLY on extracting and organizing requirements
26+
- 🚫 FORBIDDEN to start creating epics or stories in this step
27+
- 💬 Extract requirements from ALL available documents
28+
29+
## CONTEXT BOUNDARIES:
30+
31+
- PRD document loaded in workflow context
32+
- Architecture document loaded in workflow context
33+
- UX Design document loaded in workflow context (if exists)
34+
- **Output Path:** `.codemachine/artifacts/epics-{date}.md`
35+
36+
## REQUIREMENTS EXTRACTION PROCESS:
37+
38+
### 1. Welcome and Overview
39+
40+
Welcome to comprehensive epic and story creation!
41+
42+
**Documents Available in Context:**
43+
44+
1. **PRD** - Contains requirements (FRs and NFRs) and product scope
45+
2. **Architecture** - Contains technical decisions, API contracts, data models
46+
3. **UX Design** (if UI exists) - Contains interaction patterns, mockups, user flows
47+
48+
Review the documents loaded in the workflow context and confirm what's available.
49+
50+
### 2. Extract Functional Requirements (FRs)
51+
52+
From the PRD document, extract ALL functional requirements:
53+
54+
**Extraction Method:**
55+
56+
- Look for numbered items like "FR1:", "Functional Requirement 1:", or similar
57+
- Identify requirement statements that describe what the system must DO
58+
- Include user actions, system behaviors, and business rules
59+
60+
**Format the FR list as:**
61+
62+
```
63+
FR1: [Clear, testable requirement description]
64+
FR2: [Clear, testable requirement description]
65+
...
66+
```
67+
68+
### 3. Extract Non-Functional Requirements (NFRs)
69+
70+
From the PRD document, extract ALL non-functional requirements:
71+
72+
**Extraction Method:**
73+
74+
- Look for performance, security, usability, reliability requirements
75+
- Identify constraints and quality attributes
76+
- Include technical standards and compliance requirements
77+
78+
**Format the NFR list as:**
79+
80+
```
81+
NFR1: [Performance/Security/Usability requirement]
82+
NFR2: [Performance/Security/Usability requirement]
83+
...
84+
```
85+
86+
### 4. Extract Additional Requirements from Architecture
87+
88+
Review the Architecture document for technical requirements that impact epic and story creation:
89+
90+
**Look for:**
91+
92+
- **Starter Template**: Does Architecture specify a starter/greenfield template? If YES, document this for Epic 1 Story 1
93+
- Infrastructure and deployment requirements
94+
- Integration requirements with external systems
95+
- Data migration or setup requirements
96+
- Monitoring and logging requirements
97+
- API versioning or compatibility requirements
98+
- Security implementation requirements
99+
100+
**IMPORTANT**: If a starter template is mentioned in Architecture, note it prominently. This will impact Epic 1 Story 1.
101+
102+
**Format Additional Requirements as:**
103+
104+
```
105+
- [Technical requirement from Architecture that affects implementation]
106+
- [Infrastructure setup requirement]
107+
- [Integration requirement]
108+
...
109+
```
110+
111+
### 5. Extract Additional Requirements from UX (if exists)
112+
113+
Review the UX document for requirements that affect epic and story creation:
114+
115+
**Look for:**
116+
117+
- Responsive design requirements
118+
- Accessibility requirements
119+
- Browser/device compatibility
120+
- User interaction patterns that need implementation
121+
- Animation or transition requirements
122+
- Error handling UX requirements
123+
124+
**Add these to Additional Requirements list.**
125+
126+
### 6. Initialize Output Document
127+
128+
Create the epics document at `.codemachine/artifacts/epics-{date}.md`:
129+
130+
1. Use the epics template structure
131+
2. Populate with project name
132+
3. Add extracted requirements:
133+
- Functional Requirements section
134+
- Non-Functional Requirements section
135+
- Additional Requirements section
136+
4. Leave epic list and coverage map as placeholders for next steps
137+
138+
### 7. Present Extracted Requirements
139+
140+
Display to user:
141+
142+
**Functional Requirements Extracted:**
143+
144+
- Show count of FRs found
145+
- Display the first few FRs as examples
146+
- Ask if any FRs are missing or incorrectly captured
147+
148+
**Non-Functional Requirements Extracted:**
149+
150+
- Show count of NFRs found
151+
- Display key NFRs
152+
- Ask if any constraints were missed
153+
154+
**Additional Requirements:**
155+
156+
- Summarize technical requirements from Architecture
157+
- Summarize UX requirements (if applicable)
158+
- Verify completeness
159+
160+
### 8. Get User Confirmation
161+
162+
Ask: "Do these extracted requirements accurately represent what needs to be built? Any additions or corrections?"
163+
164+
Update the requirements based on user feedback until confirmation is received.
165+
166+
### 9. Step Completion
167+
168+
**Save Content:**
169+
Save the extracted requirements to the epics document now.
170+
171+
**Confirmation:**
172+
"Requirements extraction complete!
173+
174+
**What we've captured:**
175+
- {{fr_count}} Functional Requirements
176+
- {{nfr_count}} Non-Functional Requirements
177+
- {{additional_count}} Additional Requirements from Architecture/UX
178+
179+
All requirements are documented and ready for epic design.
180+
181+
- If you want to **modify or add requirements**, just tell me what you'd like to change
182+
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
183+
184+
## SUCCESS METRICS:
185+
186+
✅ All required documents validated and available
187+
✅ All FRs extracted and formatted correctly
188+
✅ All NFRs extracted and formatted correctly
189+
✅ Additional requirements from Architecture/UX identified
190+
✅ Output document initialized with requirements
191+
✅ User confirms requirements are complete and accurate
192+
193+
## FAILURE MODES:
194+
195+
❌ Missing required documents (PRD, Architecture)
196+
❌ Incomplete requirements extraction
197+
❌ Not saving requirements to output file
198+
❌ Starting epic creation before requirements are confirmed

0 commit comments

Comments
 (0)