Skip to content

Commit a51c5bb

Browse files
committed
feat(BMAD): add shared step completion template and integrate into workflows
- Create new step-completion.md template for consistent step completion behavior - Add template path to placeholders.js configuration - Replace individual step completion sections with template reference in all workflow files - Add content saving step at start of completion sequences
1 parent 30a1624 commit a51c5bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+170
-478
lines changed

config/placeholders.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ module.exports = {
4242
// BMAD SM workflow shared files
4343
sprint_status_template: path.join('prompts', 'templates', 'bmad', '06-sm', '01-sprint-planning', 'sprint-status-template.yaml'),
4444
story_template: path.join('prompts', 'templates', 'bmad', '06-sm', '02-create-story', 'template.md'),
45+
46+
// BMAD shared step rules
47+
step_completion: path.join('prompts', 'templates', 'bmad', 'shared', 'step-completion.md'),
4548
}
4649
};

prompts/templates/bmad/01-analyst/chained/step-01-vision.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,7 @@ status: 'draft'
121121
[Key differentiators based on conversation]
122122
```
123123

124-
### 7. Step Completion
125-
126-
**Save Content:**
127-
Create the document and write the generated content to `.codemachine/artifacts/product-brief-{date}.md` now.
128-
129-
**Confirmation:**
130-
"Content saved to document.
131-
132-
I've drafted the executive summary and core vision based on our conversation. This captures the essence of the project and what makes it special.
133-
134-
- If you want to **modify or add details**, just tell me what you'd like to change
135-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
124+
{step_completion}
136125

137126

138127
## 🚨 SYSTEM SUCCESS/FAILURE METRICS

prompts/templates/bmad/01-analyst/chained/step-02-users.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Define target users with rich personas and map their key interactions with the p
3434

3535
## Sequence of Instructions (Do not deviate, skip, or optimize)
3636

37+
### 0. Save Previous Step Content
38+
39+
**First Action:** Create the product brief document at `.codemachine/artifacts/product-brief-{date}.md` using the content confirmed in Step 1.
40+
3741
### 1. Begin User Discovery
3842

3943
**Opening Exploration:**
@@ -123,18 +127,7 @@ Prepare the following structure for document append:
123127
[User journey content based on conversation, or N/A if not discussed]
124128
```
125129

126-
### 6. Step Completion
127-
128-
**Save Content:**
129-
Append the generated content to the document now.
130-
131-
**Confirmation:**
132-
"Content saved to document.
133-
134-
I've mapped out who {{project_name}} serves and how they'll interact with it. This helps us ensure we're building something that real people will love to use.
135-
136-
- If you want to **modify or add details**, just tell me what you'd like to change
137-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
130+
{step_completion}
138131

139132
---
140133

prompts/templates/bmad/01-analyst/chained/step-03-metrics.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Define comprehensive success metrics that include user success, business objecti
3434

3535
## Sequence of Instructions (Do not deviate, skip, or optimize)
3636

37+
### 0. Save Previous Step Content
38+
39+
**First Action:** Append the confirmed content from Step 2 to the product brief document.
40+
3741
### 1. Begin Success Metrics Discovery
3842

3943
**Opening Exploration:**
@@ -126,18 +130,7 @@ Prepare the following structure for document append:
126130
[Key performance indicators content based on conversation, or N/A if not discussed]
127131
```
128132

129-
### 7. Step Completion
130-
131-
**Save Content:**
132-
Append the generated content to the document now.
133-
134-
**Confirmation:**
135-
"Content saved to document.
136-
137-
I've defined success metrics that will help us track whether {{project_name}} is creating real value for users and achieving business objectives.
138-
139-
- If you want to **modify or add details**, just tell me what you'd like to change
140-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
133+
{step_completion}
141134

142135
---
143136

prompts/templates/bmad/01-analyst/chained/step-04-scope.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Define MVP scope with clear boundaries and outline future vision through collabo
3434

3535
## Sequence of Instructions (Do not deviate, skip, or optimize)
3636

37+
### 0. Save Previous Step Content
38+
39+
**First Action:** Append the confirmed content from Step 3 to the product brief document.
40+
3741
### 1. Begin Scope Definition
3842

3943
**Opening Exploration:**
@@ -140,18 +144,7 @@ Prepare the following structure for document append:
140144
[Future vision content based on conversation, or N/A if not discussed]
141145
```
142146

143-
### 7. Step Completion
144-
145-
**Save Content:**
146-
Append the generated content to the document now.
147-
148-
**Confirmation:**
149-
"Content saved to document.
150-
151-
I've defined the MVP scope for {{project_name}} that balances delivering real value with realistic boundaries. This gives us a clear path forward while keeping our options open for future growth.
152-
153-
- If you want to **modify or add details**, just tell me what you'd like to change
154-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
147+
{step_completion}
155148

156149
---
157150

prompts/templates/bmad/01-analyst/chained/step-05-complete.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Complete the product brief workflow, update status files, and provide guidance o
3636

3737
## Sequence of Instructions (Do not deviate, skip, or optimize)
3838

39+
### 0. Save Previous Step Content
40+
41+
**First Action:** Append the confirmed content from Step 4 to the product brief document.
42+
3943
### 1. Announce Workflow Completion
4044

4145
**Completion Announcement:**

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,7 @@ status: 'draft'
172172
{project_classification_content}
173173
```
174174

175-
### 6. Step Completion
176-
177-
**Save Content:**
178-
Create the PRD document at `.codemachine/artifacts/prd-{date}.md` using the structure from step 5 now.
179-
180-
**Confirmation:**
181-
"Document created and saved.
182-
183-
I've drafted the Executive Summary based on our conversation. This will be the first section of your PRD and captures the project classification and vision.
184-
185-
- If you want to **modify or add details**, just tell me what you'd like to change
186-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
175+
{step_completion}
187176

188177
## SUCCESS METRICS:
189178

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

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Define comprehensive success criteria that cover user success, business success,
3333

3434
## SUCCESS DISCOVERY SEQUENCE:
3535

36+
### 0. Save Previous Step Content
37+
38+
**First Action:** Create the PRD document at `.codemachine/artifacts/prd-{date}.md` using the content confirmed in Step 1.
39+
3640
### 1. Begin Success Definition Conversation
3741

3842
**Check Product Brief for Success Indicators:**
@@ -168,18 +172,7 @@ When saving to document, append these Level 2 and Level 3 sections:
168172
[Content about future vision based on conversation]
169173
```
170174

171-
### 8. Step Completion
172-
173-
**Save Content:**
174-
Append the content to the document using the structure from step 7 now.
175-
176-
**Confirmation:**
177-
"Content saved to document.
178-
179-
I've drafted the Success Criteria and Scope based on our conversation. This captures what success looks like for users, business, and technical implementation.
180-
181-
- If you want to **modify or add details**, 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**"
175+
{step_completion}
183176

184177
## SUCCESS METRICS:
185178

prompts/templates/bmad/02-pm/01-prd/chained/step-03-journeys.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Create compelling narrative user journeys that leverage existing personas from p
3333

3434
## JOURNEY MAPPING SEQUENCE:
3535

36+
### 0. Save Previous Step Content
37+
38+
**First Action:** Append the confirmed content from Step 2 to the PRD document.
39+
3640
### 1. Leverage Existing Users & Identify Additional Types
3741

3842
**Check Product Brief for Existing Personas:**
@@ -170,18 +174,7 @@ When saving to document, append these Level 2 and Level 3 sections:
170174
[Summary of capabilities revealed by journeys based on conversation]
171175
```
172176

173-
### 7. Step Completion
174-
175-
**Save Content:**
176-
Append the content to the document using the structure from step 6 now.
177-
178-
**Confirmation:**
179-
"Content saved to document.
180-
181-
I've mapped out the user journeys based on our conversation. Each journey reveals different capabilities needed for {{project_name}}.
182-
183-
- If you want to **modify or add journeys**, just tell me what you'd like to change
184-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
177+
{step_completion}
185178

186179
## SUCCESS METRICS:
187180

prompts/templates/bmad/02-pm/01-prd/chained/step-04-domain.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Explore domain-specific requirements for complex domains that need specialized c
4242

4343
## DOMAIN EXPLORATION SEQUENCE:
4444

45+
### 0. Save Previous Step Content
46+
47+
**First Action:** Append the confirmed content from Step 3 to the PRD document.
48+
4549
### 1. Use Domain Configuration Data
4650

4751
Use domain-specific configuration from workflow context:
@@ -151,18 +155,7 @@ Parse `special_sections` list from the matched CSV row. For each section name, g
151155
- "safety_measures" → Specify safety protocols and monitoring
152156
- "compliance_matrix" → Create compliance tracking matrix
153157

154-
### 7. Step Completion
155-
156-
**Save Content:**
157-
Append the content to the document using the structure from step 5 now.
158-
159-
**Confirmation:**
160-
"Content saved to document.
161-
162-
I've documented the {domain}-specific requirements that will shape {{project_name}}. These constraints are critical for success in this complex domain.
163-
164-
- If you want to **modify or add details**, just tell me what you'd like to change
165-
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
158+
{step_completion}
166159

167160
## SUCCESS METRICS:
168161

0 commit comments

Comments
 (0)