Skip to content

refactor(bmm): convert domain research workflow to native skill#1928

Merged
alexeyv merged 3 commits intobmad-code-org:mainfrom
alexeyv:convert-domain-research-skill
Mar 13, 2026
Merged

refactor(bmm): convert domain research workflow to native skill#1928
alexeyv merged 3 commits intobmad-code-org:mainfrom
alexeyv:convert-domain-research-skill

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 12, 2026

Summary

  • convert workflow-domain-research.md into native skill package bmad-domain-research
  • move domain-steps/ and research.template.md under the new skill directory
  • switch module-help.csv domain research entry to skill:bmad-domain-research
  • update analyst agent DR exec path to the new workflow location
  • remove the domain workflow entry from the shared research multi-entry workflow manifest

Validation

  • npm test
  • node tools/cli/bmad-cli.js install --directory /Users/alex/src/bmad --modules bmm --tools claude-code --yes

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 12, 2026

🤖 Augment PR Summary

Summary: Converts the BMM Domain Research workflow into a native skill package.

Key changes:

  • Adds a new `bmad-domain-research/` skill directory (with `SKILL.md` + skill manifest) and moves the workflow/step files under it
  • Introduces `research.template.md` used to seed new research reports
  • Updates the Analyst agent’s DR menu item to exec the new workflow entrypoint path
  • Removes the legacy domain research entry from the shared research workflow manifest

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

- Document scope confirmation in research file
- Update frontmatter: `stepsCompleted: [1]`
- Load: `{project-root}/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md`
- Load: `./domain-steps/step-02-domain-analysis.md`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Load: targets in this step are already inside domain-steps/, so ./domain-steps/step-02-... likely resolves to domain-steps/domain-steps/... (and won’t be found if relative paths are resolved from the current file). Consider whether this should be ./step-02-domain-analysis.md (and similarly for the other steps).

Severity: medium

Other Locations
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-01-init.md:135
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md:174
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md:227
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-03-competitive-landscape.md:183
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-03-competitive-landscape.md:236
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md:158
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md:204
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-05-technical-trends.md:177

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

📝 Walkthrough

Walkthrough

This PR reorganizes the domain research workflow by moving it into a dedicated directory structure with relative path references. Changes include updating the analyst agent configuration, converting absolute paths to relative paths across workflow steps, creating supporting files (SKILL.md, manifest, template), and removing the old workflow entry from the research manifest. The workflow is renamed from "domain-research" to "bmad-domain-research".

Changes

Cohort / File(s) Summary
Analyst Agent Configuration
src/bmm/agents/analyst.agent.yaml
Updated the Domain Research menu entry path from the old workflow location to the new bmad-domain-research/workflow.md path.
Domain Research Workflow Structure
src/bmm/workflows/1-analysis/research/bmad-domain-research/workflow.md, src/bmm/workflows/1-analysis/research/bmad-domain-research/SKILL.md, src/bmm/workflows/1-analysis/research/bmad-domain-research/bmad-skill-manifest.yaml
Added new SKILL.md file defining the skill metadata and manifest file, updated workflow.md front matter name from "domain-research" to "bmad-domain-research".
Workflow Step Files
src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-01-init.md, step-02-domain-analysis.md, step-03-competitive-landscape.md, step-04-regulatory-focus.md, step-05-technical-trends.md
Converted all absolute project-root path references to relative paths (e.g., {project-root}/_bmad/... to ./step-XX-*.md) for inter-step navigation.
Research Workflow Assets
src/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md
Added new research workflow template with YAML front matter defining workflow metadata fields and placeholder sections for research report content.
Research Skill Manifest
src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml
Removed the old workflow-domain-research.md entry; market-research and technical-research entries remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~13 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: converting domain research workflow to a native skill package.
Description check ✅ Passed The description is directly related to the changeset, providing clear details about converting the workflow to a skill and updating related references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan for PR comments
  • Generate coding plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md (5)

28-29: ⚠️ Potential issue | 🟠 Major

Missing validation: template variables could be undefined or empty.

Lines 28-29 reference {{research_topic}} and {{research_goals}} with no validation that these variables exist or contain meaningful values. If template instantiation fails or variables are empty, the agent will proceed with undefined context, producing nonsensical web search queries (line 60-63) and output.

🛡️ Proposed validation check

Add validation before the task begins:

## PRE-EXECUTION VALIDATION:

- ✅ Verify `{{research_topic}}` is defined and non-empty
- ✅ Verify `{{research_goals}}` is defined and non-empty
- ✅ HALT if any required variables are missing or empty with error: "Required research context variables not initialized. Cannot proceed."
🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
around lines 28 - 29, Add a PRE-EXECUTION VALIDATION block in
step-02-domain-analysis.md that checks the template variables
`{{research_topic}}` and `{{research_goals}}` are defined and non-empty before
any task or web-search logic runs; if either is missing or empty, stop execution
and emit the exact error "Required research context variables not initialized.
Cannot proceed." so downstream steps that build web-search queries or call
functions using `research_topic`/`research_goals` do not run with undefined
context.

94-94: ⚠️ Potential issue | 🟠 Major

Vague target document specification creates ambiguity.

The instruction "WRITE IMMEDIATELY TO DOCUMENT" doesn't specify which document or the target path. The template has an inputDocuments: [] array in frontmatter, but there's no clear mapping to the actual output document path. This vagueness could cause the agent to write to the wrong location or fail entirely.

💡 Suggested clarification
**WRITE IMMEDIATELY TO DOCUMENT**

Target: Append to the active research document referenced in frontmatter (typically `research.template.md` instantiated as the current working document).
🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
at line 94, The directive "WRITE IMMEDIATELY TO DOCUMENT" is ambiguous; update
it to explicitly name the target by referencing the frontmatter key
(inputDocuments) and the default template name so the agent knows where to
append output—e.g., change the instruction text to "WRITE IMMEDIATELY TO
DOCUMENT: Append to the active research document specified in frontmatter
(inputDocuments) — typically the instantiated research.template.md used as the
current working document); if inputDocuments is empty, default to
research.template.md in the working folder." Ensure you modify the string "WRITE
IMMEDIATELY TO DOCUMENT" and validate mapping logic that reads inputDocuments to
resolve the concrete output document path before writing.

22-23: 🛠️ Refactor suggestion | 🟠 Major

Brittle frontmatter update instruction with no error path.

Lines 22-23 instruct the agent to "Update frontmatter stepsCompleted: [1, 2] before loading next step" and "FORBIDDEN to load next step until C is selected." However, there's no specification of what to do if the frontmatter update fails (file permissions, syntax error, concurrent modification). The workflow will deadlock or proceed incorrectly.

🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
around lines 22 - 23, Ensure the frontmatter update for the stepsCompleted key
is atomic and error-handled: when attempting to write/update stepsCompleted: [1,
2] validate parsing of the frontmatter, catch write errors (permissions,
concurrent edits, syntax), retry a bounded number of times, and if still failing
emit a clear error and abort advancing; additionally enforce the "FORBIDDEN
until C is selected" gate by explicitly checking the selection condition (the "C
selected" flag/state) before any write and refuse to load the next step if not
satisfied, returning a deterministic failure path rather than deadlocking or
proceeding silently.

165-166: ⚠️ Potential issue | 🟡 Minor

Missing alternative paths: no handling for user rejection or revision requests.

Line 165 asks "Ready to proceed to competitive landscape analysis?" but line 166 only provides [C] Continue. What if the user responds "no", "revise", or requests changes to the analysis? There's no fallback, retry, or edit path—the workflow assumes linear success only.

🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
around lines 165 - 166, The prompt "Ready to proceed to competitive landscape
analysis?" currently only offers "[C] Continue" and lacks branches for negative
or revision responses; update step-02-domain-analysis.md to add explicit
alternative options (e.g., "[R] Revise / Request changes", "[N] No / Abort",
"[E] Edit previous analysis") and describe the corresponding branch behavior:
how to re-open the analysis for edits, ask clarifying questions, save
intermediate state, or return to prior steps before proceeding; ensure you
reference the prompt text and the existing "[C] Continue" option so the workflow
can handle "no", "revise", or other user responses instead of assuming a linear
path.

60-63: ⚠️ Potential issue | 🟠 Major

No error handling or sanitization for web search queries.

The web search queries directly embed {{research_topic}} without sanitization or bounds checking. If research_topic contains quotes, special characters, or is excessively long, the queries could fail or produce unexpected results. Additionally, there's no fallback if any of the four parallel searches fail or return zero results.

🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
around lines 60 - 63, The queries in step-02-domain-analysis.md embed
"{{research_topic}}" directly into the four search prompts ("market size value",
"market growth rate dynamics", "market segmentation structure", "industry trends
evolution") without sanitization or failure handling; update the code that
constructs these prompts to validate and sanitize research_topic (trim
whitespace, enforce a max length, escape/strip quotes and other special
characters, and reject empty or clearly invalid inputs) and wrap each web search
call with error handling and retry/fallback logic so a failed or empty search
doesn’t break the workflow—e.g., validate research_topic before building the
four search strings, escape/encode it when interpolating into the search
templates, run searches with try/catch and retries, and consolidate/dedupe
results with a fallback message if any search returns zero results.
🧹 Nitpick comments (6)
src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md (1)

158-158: Relative path follows same pattern—verify resolution behavior.

Same concern as other step files: if ./ paths resolve from skill root per the project convention, this would look for step-05-technical-trends.md at the skill root rather than in domain-steps/. The path change is consistent across all step files, so the behavior will either work correctly for all or fail for all.

🤖 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-domain-research/domain-steps/step-04-regulatory-focus.md`
at line 158, The Load entry "Load: `./step-05-technical-trends.md`" uses a `./`
path that will resolve from the skill root per project convention; update this
to reference the domain-steps directory explicitly so it resolves relative to
the current step file (e.g., change the Load line in step-04-regulatory-focus.md
from `./step-05-technical-trends.md` to
`./domain-steps/step-05-technical-trends.md`) and apply the same fix to any
other step files with the same `Load: ./...` pattern.
src/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md (4)

6-8: Semantic overlap between research_type, research_topic, and research_goals is unclear.

Three separate frontmatter fields (research_type, research_topic, research_goals) capture research metadata, but their boundaries are undefined. For example:

  • If research_type is "Domain Research" and research_topic is "AI in Healthcare," is there overlap or redundancy?
  • Could research_goals conflict with or duplicate information in research_topic?

Without clear semantic definitions, users and agents may populate these inconsistently, leading to confusing or contradictory document headers.

📖 Suggested clarification

Add a comment block in the template:

# Field definitions:
# - research_type: The category of research (e.g., "Domain Research", "Competitive Analysis")
# - research_topic: The specific subject being researched (e.g., "AI in Healthcare", "E-commerce Platforms")
# - research_goals: The objectives or questions driving the research (e.g., "Assess market size and growth trends")
research_type: '{{research_type}}'
research_topic: '{{research_topic}}'
research_goals: '{{research_goals}}'
🤖 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-domain-research/research.template.md`
around lines 6 - 8, Add a YAML comment block above the three frontmatter fields
explaining each field's semantics so contributors populate them consistently;
explicitly define research_type (category of research, e.g., "Domain Research"),
research_topic (specific subject, e.g., "AI in Healthcare"), and research_goals
(objectives or research questions, e.g., "Assess market size and growth
trends"), then leave the existing placeholders research_type:
'{{research_type}}', research_topic: '{{research_topic}}', research_goals:
'{{research_goals}}' unchanged.

15-19: Redundant usage of {{research_type}} in title and metadata section.

{{research_type}} appears twice: once in the title (line 15) and again in the metadata (line 19). If research_type is long (e.g., "Comprehensive Domain and Competitive Landscape Research"), this creates verbose, repetitive headers.

♻️ Alternative: Remove redundant field from metadata
 # Research Report: {{research_type}}
 
 **Date:** {{date}}
 **Author:** {{user_name}}
-**Research Type:** {{research_type}}

The title already conveys the research type; repeating it in the metadata block is unnecessary.

🤖 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-domain-research/research.template.md`
around lines 15 - 19, The template redundantly repeats the {{research_type}}
token in both the title and the metadata block; remove the duplicate by keeping
{{research_type}} only in the title and deleting it from the metadata section
(the lines showing **Research Type:** {{research_type}}) in research.template.md
so the title conveys the type without a repeated verbose metadata field.

25-25: Ambiguous placeholder syntax conflicts with step-02 content structure.

Line 25 uses [Research overview and methodology will be appended here] as a placeholder. However, step-02 (file 1, lines 102-149) uses similar [bracketed text] for content placeholders like [Market size analysis with source citations]. This creates ambiguity:

  • Should bracketed text in the final document be replaced or preserved?
  • Are brackets part of the output format or just placeholder syntax?

Different agents may interpret this inconsistently, producing malformed output.


4-4: Inflexible hardcoded workflowType: 'research' limits template reusability.

Line 4 hardcodes workflowType: 'research', but this prevents the template from being adapted for related workflow types like "market-research", "technical-research", or "competitive-intelligence". If BMAD-METHOD later introduces research sub-types, this field will need to be changed across all instantiated documents.

Consider making this a placeholder:

workflowType: '{{workflow_type}}'

Or use a more generic value:

workflowType: 'research-workflow'
🤖 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-domain-research/research.template.md`
at line 4, The template currently hardcodes the workflowType key to the literal
'research', which reduces reuse; update the workflowType entry (the workflowType
key currently set to 'research') to use a placeholder like {{workflow_type}} or
a more generic value such as 'research-workflow' so downstream instantiations
can override it; ensure any template rendering code or callers that consume this
template are updated to provide the workflow_type variable if you choose the
placeholder approach.
src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md (1)

102-149: Ambiguous placeholder syntax could confuse content generation.

The content structure template (lines 102-149) mixes [bracketed placeholders] with explicit field labels like _Total Market Size:_ and _Growth Rate:_. It's unclear whether the agent should:

  1. Replace the brackets with actual content while keeping the underscore-wrapped labels.
  2. Remove both brackets and labels.
  3. Keep brackets as literal Markdown list syntax.

This ambiguity could lead to inconsistent output formatting across different agent implementations.

📝 Suggested clarification

Add a formatting note:

#### Content Structure:

**Formatting Instructions:**
- Replace `[bracketed placeholders]` with actual analysis content (do not output the brackets).
- Preserve `_underscore-wrapped field labels:_` exactly as shown for consistent structure.
- Follow the exact heading hierarchy (## and ###) as specified.
🤖 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-domain-research/domain-steps/step-02-domain-analysis.md`
around lines 102 - 149, The Industry Analysis template under "## Industry
Analysis" mixes [bracketed placeholders] and _underscore-wrapped field labels:_
which is ambiguous; add a short "#### Content Structure" formatting note
immediately after the "## Industry Analysis" heading that instructs agents to
(1) replace bracketed placeholders with actual content (remove the brackets),
(2) preserve underscore-wrapped field labels exactly as shown, and (3) keep the
specified heading hierarchy (## and ###); reference these terms ("[bracketed
placeholders]" and "_underscore-wrapped field labels:_") so implementers can
update the template text unambiguously.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md`:
- Line 227: The next-step link currently uses the incorrect relative path
'./step-03-competitive-landscape.md' (see the "After user selects 'C'" line)
which duplicates the earlier error; update that reference to include the
domain-steps directory prefix so it points to
'./domain-steps/step-03-competitive-landscape.md' (or
'domain-steps/step-03-competitive-landscape.md') to match the correct resolution
used elsewhere.
- Around line 172-173: The frontmatter update `stepsCompleted: [1, 2]` is
applied unconditionally after the "C" (Continue) action even though the file
contains only the placeholder "**CONTENT ALREADY WRITTEN TO DOCUMENT**";
implement a validation step before setting `stepsCompleted` in the "Continue"
handler (the UI action bound to 'C') that verifies the actual content was
written to step-02-domain-analysis.md by checking the file size changed and that
required section headers (e.g., "Industry Analysis" or other expected headings)
are present, and if verification fails abort the transition and surface the
error "Content write verification failed. Cannot proceed until industry analysis
is written to document." so the frontmatter update is only applied when
validation passes.
- Line 174: Replace the incorrect relative reference
"./step-03-competitive-landscape.md" with the skill-root-corrected path
"./domain-steps/step-03-competitive-landscape.md" in this markdown so step
navigation resolves correctly; update both occurrences (the two places that
currently reference "./step-03-competitive-landscape.md") in the
step-02-domain-analysis content.

In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md`:
- Around line 2-5: The front-matter has inconsistent initial state:
stepsCompleted: [] but lastStep: 1; choose one of two fixes and apply it
consistently—either set lastStep to 0 or null to indicate no steps done (update
the lastStep field) or add 1 to stepsCompleted (stepsCompleted: [1]) to reflect
that step 1 is complete; ensure the final values of stepsCompleted and lastStep
match the chosen initial state and update only the fields stepsCompleted and
lastStep in the template.

---

Outside diff comments:
In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md`:
- Around line 28-29: Add a PRE-EXECUTION VALIDATION block in
step-02-domain-analysis.md that checks the template variables
`{{research_topic}}` and `{{research_goals}}` are defined and non-empty before
any task or web-search logic runs; if either is missing or empty, stop execution
and emit the exact error "Required research context variables not initialized.
Cannot proceed." so downstream steps that build web-search queries or call
functions using `research_topic`/`research_goals` do not run with undefined
context.
- Line 94: The directive "WRITE IMMEDIATELY TO DOCUMENT" is ambiguous; update it
to explicitly name the target by referencing the frontmatter key
(inputDocuments) and the default template name so the agent knows where to
append output—e.g., change the instruction text to "WRITE IMMEDIATELY TO
DOCUMENT: Append to the active research document specified in frontmatter
(inputDocuments) — typically the instantiated research.template.md used as the
current working document); if inputDocuments is empty, default to
research.template.md in the working folder." Ensure you modify the string "WRITE
IMMEDIATELY TO DOCUMENT" and validate mapping logic that reads inputDocuments to
resolve the concrete output document path before writing.
- Around line 22-23: Ensure the frontmatter update for the stepsCompleted key is
atomic and error-handled: when attempting to write/update stepsCompleted: [1, 2]
validate parsing of the frontmatter, catch write errors (permissions, concurrent
edits, syntax), retry a bounded number of times, and if still failing emit a
clear error and abort advancing; additionally enforce the "FORBIDDEN until C is
selected" gate by explicitly checking the selection condition (the "C selected"
flag/state) before any write and refuse to load the next step if not satisfied,
returning a deterministic failure path rather than deadlocking or proceeding
silently.
- Around line 165-166: The prompt "Ready to proceed to competitive landscape
analysis?" currently only offers "[C] Continue" and lacks branches for negative
or revision responses; update step-02-domain-analysis.md to add explicit
alternative options (e.g., "[R] Revise / Request changes", "[N] No / Abort",
"[E] Edit previous analysis") and describe the corresponding branch behavior:
how to re-open the analysis for edits, ask clarifying questions, save
intermediate state, or return to prior steps before proceeding; ensure you
reference the prompt text and the existing "[C] Continue" option so the workflow
can handle "no", "revise", or other user responses instead of assuming a linear
path.
- Around line 60-63: The queries in step-02-domain-analysis.md embed
"{{research_topic}}" directly into the four search prompts ("market size value",
"market growth rate dynamics", "market segmentation structure", "industry trends
evolution") without sanitization or failure handling; update the code that
constructs these prompts to validate and sanitize research_topic (trim
whitespace, enforce a max length, escape/strip quotes and other special
characters, and reject empty or clearly invalid inputs) and wrap each web search
call with error handling and retry/fallback logic so a failed or empty search
doesn’t break the workflow—e.g., validate research_topic before building the
four search strings, escape/encode it when interpolating into the search
templates, run searches with try/catch and retries, and consolidate/dedupe
results with a fallback message if any search returns zero results.

---

Nitpick comments:
In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md`:
- Around line 102-149: The Industry Analysis template under "## Industry
Analysis" mixes [bracketed placeholders] and _underscore-wrapped field labels:_
which is ambiguous; add a short "#### Content Structure" formatting note
immediately after the "## Industry Analysis" heading that instructs agents to
(1) replace bracketed placeholders with actual content (remove the brackets),
(2) preserve underscore-wrapped field labels exactly as shown, and (3) keep the
specified heading hierarchy (## and ###); reference these terms ("[bracketed
placeholders]" and "_underscore-wrapped field labels:_") so implementers can
update the template text unambiguously.

In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md`:
- Line 158: The Load entry "Load: `./step-05-technical-trends.md`" uses a `./`
path that will resolve from the skill root per project convention; update this
to reference the domain-steps directory explicitly so it resolves relative to
the current step file (e.g., change the Load line in step-04-regulatory-focus.md
from `./step-05-technical-trends.md` to
`./domain-steps/step-05-technical-trends.md`) and apply the same fix to any
other step files with the same `Load: ./...` pattern.

In
`@src/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md`:
- Around line 6-8: Add a YAML comment block above the three frontmatter fields
explaining each field's semantics so contributors populate them consistently;
explicitly define research_type (category of research, e.g., "Domain Research"),
research_topic (specific subject, e.g., "AI in Healthcare"), and research_goals
(objectives or research questions, e.g., "Assess market size and growth
trends"), then leave the existing placeholders research_type:
'{{research_type}}', research_topic: '{{research_topic}}', research_goals:
'{{research_goals}}' unchanged.
- Around line 15-19: The template redundantly repeats the {{research_type}}
token in both the title and the metadata block; remove the duplicate by keeping
{{research_type}} only in the title and deleting it from the metadata section
(the lines showing **Research Type:** {{research_type}}) in research.template.md
so the title conveys the type without a repeated verbose metadata field.
- Line 4: The template currently hardcodes the workflowType key to the literal
'research', which reduces reuse; update the workflowType entry (the workflowType
key currently set to 'research') to use a placeholder like {{workflow_type}} or
a more generic value such as 'research-workflow' so downstream instantiations
can override it; ensure any template rendering code or callers that consume this
template are updated to provide the workflow_type variable if you choose the
placeholder approach.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3f081542-a7a2-4f2d-840c-33456bc9fba4

📥 Commits

Reviewing files that changed from the base of the PR and between 861716f and 50a0b2e.

⛔ Files ignored due to path filters (1)
  • src/bmm/module-help.csv is excluded by !**/*.csv
📒 Files selected for processing (12)
  • src/bmm/agents/analyst.agent.yaml
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/SKILL.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/bmad-skill-manifest.yaml
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-01-init.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-03-competitive-landscape.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-05-technical-trends.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-06-research-synthesis.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md
  • src/bmm/workflows/1-analysis/research/bmad-domain-research/workflow.md
  • src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml
💤 Files with no reviewable changes (1)
  • src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml

@alexeyv alexeyv force-pushed the convert-domain-research-skill branch from 50a0b2e to 8ce08fc Compare March 13, 2026 11:14
@alexeyv alexeyv merged commit 037c34b into bmad-code-org:main Mar 13, 2026
14 checks passed
alexeyv added a commit that referenced this pull request Mar 14, 2026
* refactor(bmm): convert domain research workflow to native skill

* fix(bmm): correct domain-research step relative paths

* fix domain research skill metadata refs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant