Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bmm/agents/analyst.agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ agent:
description: "[BP] Brainstorm Project: Expert Guided Facilitation through a single or multiple techniques with a final report"

- trigger: MR or fuzzy match on market-research
exec: "{project-root}/_bmad/bmm/workflows/1-analysis/research/workflow-market-research.md"
exec: "skill:bmad-market-research"
description: "[MR] Market Research: Market analysis, competitive landscape, customer needs and trends"

- trigger: DR or fuzzy match on domain-research
Expand Down
2 changes: 1 addition & 1 deletion src/bmm/module-help.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bmm,anytime,Mermaid Generate,MG,,_bmad/bmm/agents/tech-writer/tech-writer.agent.
bmm,anytime,Validate Document,VD,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,,false,tech-writer,,"Review the specified document against documentation standards and best practices. Returns specific actionable improvement suggestions organized by priority.",planning_artifacts,"validation report",
bmm,anytime,Explain Concept,EC,,_bmad/bmm/agents/tech-writer/tech-writer.agent.yaml,,false,tech-writer,,"Create clear technical explanations with examples and diagrams for complex concepts. Breaks down into digestible sections using task-oriented approach.",project_knowledge,"explanation",
bmm,1-analysis,Brainstorm Project,BP,10,skill:bmad-brainstorming,bmad-brainstorming,false,analyst,data=_bmad/bmm/data/project-context-template.md,"Expert Guided Facilitation through a single or multiple techniques",planning_artifacts,"brainstorming session",
bmm,1-analysis,Market Research,MR,20,_bmad/bmm/workflows/1-analysis/research/workflow-market-research.md,bmad-bmm-market-research,false,analyst,Create Mode,"Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents",
bmm,1-analysis,Market Research,MR,20,skill:bmad-market-research,bmad-bmm-market-research,false,analyst,Create Mode,"Market analysis competitive landscape customer needs and trends","planning_artifacts|project-knowledge","research documents",
bmm,1-analysis,Domain Research,DR,21,skill:bmad-domain-research,bmad-bmm-domain-research,false,analyst,Create Mode,"Industry domain deep dive subject matter expertise and terminology","planning_artifacts|project_knowledge","research documents",
bmm,1-analysis,Technical Research,TR,22,skill:bmad-technical-research,bmad-bmm-technical-research,false,analyst,Create Mode,"Technical feasibility architecture options and implementation approaches","planning_artifacts|project_knowledge","research documents",
bmm,1-analysis,Create Brief,CB,30,skill:bmad-create-product-brief,bmad-bmm-create-product-brief,false,analyst,Create Mode,"A guided experience to nail down your product idea",planning_artifacts,"product brief",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: bmad-market-research
description: 'Conduct market research on competition and customers. Use when the user says "create a market research report about [business idea]".'
---

Follow the instructions in [workflow.md](workflow.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type: skill
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
stepsCompleted: []
inputDocuments: []
workflowType: 'research'
lastStep: 1
Comment on lines +2 to +5
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Template state initializes as already advanced.

stepsCompleted is empty, but lastStep is 1. That’s contradictory bootstrap state and can cause resume logic to skip initialization.

Suggested fix
 stepsCompleted: []
 inputDocuments: []
 workflowType: 'research'
-lastStep: 1
+lastStep: 0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
stepsCompleted: []
inputDocuments: []
workflowType: 'research'
lastStep: 1
stepsCompleted: []
inputDocuments: []
workflowType: 'research'
lastStep: 0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/1-analysis/research/bmad-market-research/research.template.md`
around lines 2 - 5, The template initializes inconsistent workflow state:
stepsCompleted is an empty array while lastStep is 1; update the template so
lastStep reflects stepsCompleted (e.g., set lastStep: 0) or compute lastStep
from stepsCompleted.length at bootstrap; modify the research template to either
set lastStep to 0 or add logic in the workflow loader to derive lastStep =
stepsCompleted.length to ensure resume/initialization logic is consistent (refer
to the stepsCompleted and lastStep fields in the research.template.md).

research_type: '{{research_type}}'
research_topic: '{{research_topic}}'
research_goals: '{{research_goals}}'
user_name: '{{user_name}}'
date: '{{date}}'
web_research_enabled: true
source_verification: true
---

# Research Report: {{research_type}}

**Date:** {{date}}
**Author:** {{user_name}}
**Research Type:** {{research_type}}

---

## Research Overview

[Research overview and methodology will be appended here]

---

<!-- Content will be appended sequentially through research workflow steps -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Market Research Step 1: Market Research Initialization

## MANDATORY EXECUTION RULES (READ FIRST):

- 🛑 NEVER generate research content in init step
- ✅ ALWAYS confirm understanding of user's research goals
- 📋 YOU ARE A MARKET RESEARCH FACILITATOR, not content generator
- 💬 FOCUS on clarifying scope and approach
- 🔍 NO WEB RESEARCH in init - that's for later steps
- 📖 CRITICAL: ALWAYS read the complete step file before taking any action - partial understanding leads to incomplete research
- 🔄 CRITICAL: When loading next step with 'C', ensure the entire file is read and understood before proceeding
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`

## EXECUTION PROTOCOLS:

- 🎯 Confirm research understanding before proceeding
- ⚠️ Present [C] continue option after scope clarification
- 💾 Write initial scope document immediately
- 📖 Update frontmatter `stepsCompleted: [1]` before loading next step
- 🚫 FORBIDDEN to load next step until C is selected

## CONTEXT BOUNDARIES:

- Current document and frontmatter from main workflow discovery are available
- Research type = "market" is already set
- **Research topic = "{{research_topic}}"** - discovered from initial discussion
- **Research goals = "{{research_goals}}"** - captured from initial discussion
- Focus on market research scope clarification
- Web search capabilities are enabled for later steps

## YOUR TASK:

Initialize market research by confirming understanding of {{research_topic}} and establishing clear research scope.

## MARKET RESEARCH INITIALIZATION:

### 1. Confirm Research Understanding

**INITIALIZE - DO NOT RESEARCH YET**

Start with research confirmation:
"I understand you want to conduct **market research** for **{{research_topic}}** with these goals: {{research_goals}}

**My Understanding of Your Research Needs:**

- **Research Topic**: {{research_topic}}
- **Research Goals**: {{research_goals}}
- **Research Type**: Market Research
- **Approach**: Comprehensive market analysis with source verification

**Market Research Areas We'll Cover:**

- Market size, growth dynamics, and trends
- Customer insights and behavior analysis
- Competitive landscape and positioning
- Strategic recommendations and implementation guidance

**Does this accurately capture what you're looking for?**"

### 2. Refine Research Scope

Gather any clarifications needed:

#### Scope Clarification Questions:

- "Are there specific customer segments or aspects of {{research_topic}} we should prioritize?"
- "Should we focus on specific geographic regions or global market?"
- "Is this for market entry, expansion, product development, or other business purpose?"
- "Any competitors or market segments you specifically want us to analyze?"

### 3. Document Initial Scope

**WRITE IMMEDIATELY TO DOCUMENT**

Write initial research scope to document:

```markdown
# Market Research: {{research_topic}}

## Research Initialization

### Research Understanding Confirmed

**Topic**: {{research_topic}}
**Goals**: {{research_goals}}
**Research Type**: Market Research
**Date**: {{date}}

### Research Scope

**Market Analysis Focus Areas:**

- Market size, growth projections, and dynamics
- Customer segments, behavior patterns, and insights
- Competitive landscape and positioning analysis
- Strategic recommendations and implementation guidance

**Research Methodology:**

- Current web data with source verification
- Multiple independent sources for critical claims
- Confidence level assessment for uncertain data
- Comprehensive coverage with no critical gaps

### Next Steps

**Research Workflow:**

1. ✅ Initialization and scope setting (current step)
2. Customer Insights and Behavior Analysis
3. Competitive Landscape Analysis
4. Strategic Synthesis and Recommendations

**Research Status**: Scope confirmed, ready to proceed with detailed market analysis
```
Comment on lines +73 to +115
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Artifact writing is missing an explicit {document_output_language} requirement.

This step writes document content but only enforces spoken output language (Line 12). Without a write-language contract, generated artifacts can drift from configured document language.

Suggested fix
-Write initial research scope to document:
+Write initial research scope to document in `{document_output_language}`:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/1-analysis/research/bmad-market-research/market-steps/step-01-init.md`
around lines 73 - 115, Add an explicit document language field to the artifact
template and enforce it when writing: update the markdown block to include a
"Document Language: {{document_output_language}}" (or similar) metadata line
near "Research Initialization"/the header and ensure the writer that produces
this artifact checks and uses the {{document_output_language}} placeholder
rather than only the spoken language; locate the template in step-01-init.md and
modify the initialization section where "Research Initialization" and
"Topic/Goals/Date" are set so the document output language is unambiguous and
required.


### 4. Present Confirmation and Continue Option

Show initial scope document and present continue option:
"I've documented our understanding and initial scope for **{{research_topic}}** market research.

**What I've established:**

- Research topic and goals confirmed
- Market analysis focus areas defined
- Research methodology verification
- Clear workflow progression

**Document Status:** Initial scope written to research file for your review

**Ready to begin detailed market research?**
[C] Continue - Confirm scope and proceed to customer insights analysis
[Modify] Suggest changes to research scope before proceeding

Comment on lines +120 to +134
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Close the presentation quote block to avoid prompt-boundary leakage.

The quoted assistant message opened on Line 120 is never explicitly closed before control instructions continue. That makes the parser/agent boundary ambiguous.

Suggested fix
 **Ready to begin detailed market research?**
 [C] Continue - Confirm scope and proceed to customer insights analysis
 [Modify] Suggest changes to research scope before proceeding
+"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"I've documented our understanding and initial scope for **{{research_topic}}** market research.
**What I've established:**
- Research topic and goals confirmed
- Market analysis focus areas defined
- Research methodology verification
- Clear workflow progression
**Document Status:** Initial scope written to research file for your review
**Ready to begin detailed market research?**
[C] Continue - Confirm scope and proceed to customer insights analysis
[Modify] Suggest changes to research scope before proceeding
"I've documented our understanding and initial scope for **{{research_topic}}** market research.
**What I've established:**
- Research topic and goals confirmed
- Market analysis focus areas defined
- Research methodology verification
- Clear workflow progression
**Document Status:** Initial scope written to research file for your review
**Ready to begin detailed market research?**
[C] Continue - Confirm scope and proceed to customer insights analysis
[Modify] Suggest changes to research scope before proceeding
"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/bmm/workflows/1-analysis/research/bmad-market-research/market-steps/step-01-init.md`
around lines 120 - 134, The opening presentation quote starting with "I've
documented our understanding and initial scope for **{{research_topic}}**..." is
never closed; add a matching closing quote mark (") after the final paragraph
("**Document Status:** Initial scope written to research file for your review")
or immediately before the choice lines ([C] Continue...) so the quoted block is
explicitly terminated and prevents prompt-boundary leakage; update the content
in step-01-init.md around the block that contains the "{{research_topic}}" text
accordingly.

**HALT — wait for user response before proceeding.**

### 5. Handle User Response

#### If 'C' (Continue):

- Update frontmatter: `stepsCompleted: [1]`
- Add confirmation note to document: "Scope confirmed by user on {{date}}"
- Load: `./step-02-customer-behavior.md`

#### If 'Modify':

- Gather user changes to scope
- Update document with modifications
- Re-present updated scope for confirmation

## SUCCESS METRICS:

✅ Research topic and goals accurately understood
✅ Market research scope clearly defined
✅ Initial scope document written immediately
✅ User opportunity to review and modify scope
✅ [C] continue option presented and handled correctly
✅ Document properly updated with scope confirmation

## FAILURE MODES:

❌ Not confirming understanding of research topic and goals
❌ Generating research content instead of just scope clarification
❌ Not writing initial scope document to file
❌ Not providing opportunity for user to modify scope
❌ Proceeding to next step without user confirmation
❌ **CRITICAL**: Reading only partial step file - leads to incomplete understanding and poor research decisions
❌ **CRITICAL**: Proceeding with 'C' without fully reading and understanding the next step file
❌ **CRITICAL**: Making decisions without complete understanding of step requirements and protocols

## INITIALIZATION PRINCIPLES:

This step ensures:

- Clear mutual understanding of research objectives
- Well-defined research scope and approach
- Immediate documentation for user review
- User control over research direction before detailed work begins

## NEXT STEP:

After user confirmation and scope finalization, load `./step-02-customer-behavior.md` to begin detailed market research with customer insights analysis.

Remember: Init steps confirm understanding and scope, not generate research content!
Loading
Loading