Skip to content

Commit bc86f27

Browse files
committed
feat(bmad): add bmad workflow and analyst agent configuration
Introduce BMAD (Business Method Analysis and Design) workflow with: - Workflow definition file - Analyst agent configuration - Prompt templates for each workflow step - Shared rules and brief template - Step-by-step workflow execution files The workflow enables collaborative product brief creation through structured analysis steps from vision to MVP scope definition.
1 parent 61865e3 commit bc86f27

File tree

11 files changed

+831
-0
lines changed

11 files changed

+831
-0
lines changed

config/main.agents.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@ module.exports = [
7171
promptPath: path.join(promptsDir, 'codemachine', 'fallback-agents', 'planning-fallback.md'),
7272
},
7373

74+
// BMAD agents
75+
{
76+
id: 'bmad-analyst',
77+
name: 'Mary the Analyst',
78+
description: 'BMAD business analyst for collaborative product discovery',
79+
promptPath: [
80+
path.join(promptsDir, 'bmad', '01-analyst', 'mary.md'),
81+
path.join(promptsDir, 'bmad', '01-analyst', 'workflow.md'),
82+
path.join(promptsDir, 'bmad', '01-analyst', 'chained', 'step-01-vision.md'),
83+
],
84+
chainedPromptsPath: path.join(promptsDir, 'bmad', '01-analyst', 'chained'),
85+
},
86+
7487
// Test agents
7588
{
7689
id: 'test-agent-1',
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
name: 'Step 1: Vision Discovery'
3+
description: 'Discover and define the core product vision, problem statement, and unique value proposition'
4+
---
5+
6+
# Step 1: Product Vision Discovery
7+
8+
## STEP GOAL:
9+
10+
Conduct comprehensive product vision discovery to define the core problem, solution, and unique value proposition through collaborative analysis.
11+
12+
## MANDATORY EXECUTION RULES (READ FIRST):
13+
14+
{bmad_analyst_rules}
15+
16+
## CONTEXT BOUNDARIES:
17+
18+
- Available context: Current document and frontmatter from step 1, input documents already loaded in memory
19+
- Focus: This will be the first content section appended to the document
20+
- Limits: Focus on clear, compelling product vision and problem statement
21+
- Dependencies: Document initialization from step-01 must be complete
22+
- **Output Path:** `.codemachine/artifacts/product-brief-{date}.md`
23+
24+
## Sequence of Instructions (Do not deviate, skip, or optimize)
25+
26+
### 1. Begin Vision Discovery
27+
28+
**Opening Conversation:**
29+
"As your PM peer, I'm excited to help you shape the vision for {project_name}. Let's start with the foundation.
30+
31+
**Tell me about the product you envision:**
32+
33+
- What core problem are you trying to solve?
34+
- Who experiences this problem most acutely?
35+
- What would success look like for the people you're helping?
36+
- What excites you most about this solution?
37+
38+
Let's start with the problem space before we get into solutions."
39+
40+
### 2. Deep Problem Understanding
41+
42+
**Problem Discovery:**
43+
Explore the problem from multiple angles using targeted questions:
44+
45+
- How do people currently solve this problem?
46+
- What's frustrating about current solutions?
47+
- What happens if this problem goes unsolved?
48+
- Who feels this pain most intensely?
49+
50+
### 3. Current Solutions Analysis
51+
52+
**Competitive Landscape:**
53+
54+
- What solutions exist today?
55+
- Where do they fall short?
56+
- What gaps are they leaving open?
57+
- Why haven't existing solutions solved this completely?
58+
59+
### 4. Solution Vision
60+
61+
**Collaborative Solution Crafting:**
62+
63+
- If we could solve this perfectly, what would that look like?
64+
- What's the simplest way we could make a meaningful difference?
65+
- What makes your approach different from what's out there?
66+
- What would make users say 'this is exactly what I needed'?
67+
68+
### 5. Unique Differentiators
69+
70+
**Competitive Advantage:**
71+
72+
- What's your unfair advantage?
73+
- What would be hard for competitors to copy?
74+
- What insight or approach is uniquely yours?
75+
- Why is now the right time for this solution?
76+
77+
### 6. Generate Executive Summary Content
78+
79+
**Content to Append:**
80+
Prepare the following structure for document append:
81+
82+
```markdown
83+
{bmad_brief_template}
84+
85+
## Executive Summary
86+
87+
[Executive summary content based on conversation]
88+
89+
---
90+
91+
## Core Vision
92+
93+
### Problem Statement
94+
95+
[Problem statement content based on conversation]
96+
97+
### Problem Impact
98+
99+
[Problem impact content based on conversation]
100+
101+
### Why Existing Solutions Fall Short
102+
103+
[Analysis of existing solution gaps based on conversation]
104+
105+
### Proposed Solution
106+
107+
[Proposed solution description based on conversation]
108+
109+
### Key Differentiators
110+
111+
[Key differentiators based on conversation]
112+
```
113+
114+
### 7. Step Completion
115+
116+
**Content Presentation:**
117+
"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.
118+
119+
- If you want to **modify or add details**, just tell me what you'd like to change
120+
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
121+
122+
123+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
124+
125+
### ✅ SUCCESS:
126+
127+
- Clear problem statement that resonates with target users
128+
- Compelling solution vision that addresses the core problem
129+
- Unique differentiators that provide competitive advantage
130+
- Executive summary that captures the product essence
131+
132+
### ❌ SYSTEM FAILURE:
133+
134+
- Accepting vague problem statements without pushing for specificity
135+
- Creating solution vision without fully understanding the problem
136+
- Missing unique differentiators or competitive insights
137+
- Generating vision without real user input and collaboration
138+
139+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
name: 'Step 2: Target Users'
3+
description: 'Define target users with rich personas and map their key interactions with the product'
4+
---
5+
6+
# Step 2: Target Users Discovery
7+
8+
## STEP GOAL:
9+
10+
Define target users with rich personas and map their key interactions with the product through collaborative user research and journey mapping.
11+
12+
## MANDATORY EXECUTION RULES (READ FIRST):
13+
14+
{bmad_analyst_rules}
15+
16+
### Step-Specific Rules:
17+
18+
- 🎯 Focus only on defining who this product serves and how they interact with it
19+
- 🚫 FORBIDDEN to create generic user profiles without specific details
20+
- 💬 Approach: Systematic persona development with journey mapping
21+
- 📋 COLLABORATIVE persona development, not assumption-based user creation
22+
23+
## EXECUTION PROTOCOLS:
24+
25+
- 🎯 Show your analysis before taking any action
26+
- 💾 Generate user personas and journeys collaboratively with user
27+
28+
## CONTEXT BOUNDARIES:
29+
30+
- Available context: Current document and frontmatter from previous steps, product vision and problem already defined
31+
- Focus: Creating vivid, actionable user personas that align with product vision
32+
- Limits: Focus on users who directly experience the problem or benefit from the solution
33+
- Dependencies: Product vision and problem statement from step-02 must be complete
34+
35+
## Sequence of Instructions (Do not deviate, skip, or optimize)
36+
37+
### 1. Begin User Discovery
38+
39+
**Opening Exploration:**
40+
"Now that we understand what {{project_name}} does, let's define who it's for.
41+
42+
**User Discovery:**
43+
44+
- Who experiences the problem we're solving?
45+
- Are there different types of users with different needs?
46+
- Who gets the most value from this solution?
47+
- Are there primary users and secondary users we should consider?
48+
49+
Let's start by identifying the main user groups."
50+
51+
### 2. Primary User Segment Development
52+
53+
**Persona Development Process:**
54+
For each primary user segment, create rich personas:
55+
56+
**Name & Context:**
57+
58+
- Give them a realistic name and brief backstory
59+
- Define their role, environment, and context
60+
- What motivates them? What are their goals?
61+
62+
**Problem Experience:**
63+
64+
- How do they currently experience the problem?
65+
- What workarounds are they using?
66+
- What are the emotional and practical impacts?
67+
68+
**Success Vision:**
69+
70+
- What would success look like for them?
71+
- What would make them say "this is exactly what I needed"?
72+
73+
**Primary User Questions:**
74+
75+
- "Tell me about a typical person who would use {{project_name}}"
76+
- "What's their day like? Where does our product fit in?"
77+
- "What are they trying to accomplish that's hard right now?"
78+
79+
### 3. Secondary User Segment Exploration
80+
81+
**Secondary User Considerations:**
82+
83+
- "Who else benefits from this solution, even if they're not the primary user?"
84+
- "Are there admin, support, or oversight roles we should consider?"
85+
- "Who influences the decision to adopt or purchase this product?"
86+
- "Are there partner or stakeholder users who matter?"
87+
88+
### 4. User Journey Mapping
89+
90+
**Journey Elements:**
91+
Map key interactions for each user segment:
92+
93+
- **Discovery:** How do they find out about the solution?
94+
- **Onboarding:** What's their first experience like?
95+
- **Core Usage:** How do they use the product day-to-day?
96+
- **Success Moment:** When do they realize the value?
97+
- **Long-term:** How does it become part of their routine?
98+
99+
**Journey Questions:**
100+
101+
- "Walk me through how [Persona Name] would discover and start using {{project_name}}"
102+
- "What's their 'aha!' moment?"
103+
- "How does this product change how they work or live?"
104+
105+
### 5. Generate Target Users Content
106+
107+
**Content to Append:**
108+
Prepare the following structure for document append:
109+
110+
```markdown
111+
## Target Users
112+
113+
### Primary Users
114+
115+
[Primary user segment content based on conversation]
116+
117+
### Secondary Users
118+
119+
[Secondary user segment content based on conversation, or N/A if not discussed]
120+
121+
### User Journey
122+
123+
[User journey content based on conversation, or N/A if not discussed]
124+
```
125+
126+
### 6. Step Completion
127+
128+
**Content Presentation:**
129+
"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.
130+
131+
- If you want to **modify or add details**, just tell me what you'd like to change
132+
- If you're satisfied, **press Enter in the promptbox to go to the next step**"
133+
134+
---
135+
136+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
137+
138+
### ✅ SUCCESS:
139+
140+
- Rich, believable user personas with clear motivations
141+
- Clear distinction between primary and secondary users
142+
- User journeys that show key interaction points and value creation
143+
- User segments that align with product vision and problem statement
144+
145+
### ❌ SYSTEM FAILURE:
146+
147+
- Creating generic user profiles without specific details
148+
- Missing key user segments that are important to success
149+
- User journeys that don't show how the product creates value
150+
- Not connecting user needs back to the problem statement
151+
152+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.

0 commit comments

Comments
 (0)