# Market Research Workflow - Claude Code Integration Configuration
# This file configures how subagents are installed and integrated

subagents:
  # List of subagent files to be installed
  files:
    - bmm-market-researcher.md
    - bmm-trend-spotter.md
    - bmm-data-analyst.md
    - bmm-competitor-analyzer.md
    - bmm-user-researcher.md

  # Installation configuration
  installation:
    prompt: "The Market Research workflow includes specialized AI subagents for enhanced research capabilities. Would you like to install them?"
    location_options:
      - project # Install to .claude/agents/ in project
      - user # Install to ~/.claude/agents/ for all projects
    default_location: project

# Content injections for the workflow
injections:
  - injection_point: "market-research-subagents"
    description: "Injects subagent activation instructions into the workflow"
    content: |
      <critical>
      Claude Code Enhanced Mode: The following specialized subagents are available to enhance your market research:

      - **bmm-market-researcher**: Comprehensive market intelligence gathering and analysis
      - **bmm-trend-spotter**: Identifies emerging trends and weak signals
      - **bmm-data-analyst**: Quantitative analysis and market sizing calculations
      - **bmm-competitor-analyzer**: Deep competitive intelligence and positioning
      - **bmm-user-researcher**: User research, personas, and journey mapping

      These subagents will be automatically invoked when their expertise is relevant to the current research task.
      Use them PROACTIVELY throughout the workflow for enhanced insights.
      </critical>

  - injection_point: "market-tam-calculations"
    description: "Enhanced TAM calculation with data analyst"
    content: |
      <invoke-subagent name="bmm-data-analyst">
      Calculate TAM using multiple methodologies and provide confidence intervals.
      Use all available market data from previous research steps.
      Show detailed calculations and assumptions.
      </invoke-subagent>

  - injection_point: "market-trends-analysis"
    description: "Enhanced trend analysis with trend spotter"
    content: |
      <invoke-subagent name="bmm-trend-spotter">
      Identify emerging trends, weak signals, and future disruptions.
      Look for cross-industry patterns and second-order effects.
      Provide timeline estimates for mainstream adoption.
      </invoke-subagent>

  - injection_point: "market-customer-segments"
    description: "Enhanced customer research"
    content: |
      <invoke-subagent name="bmm-user-researcher">
      Develop detailed user personas with jobs-to-be-done analysis.
      Map the complete customer journey with pain points and opportunities.
      Provide behavioral and psychographic insights.
      </invoke-subagent>

  - injection_point: "market-executive-summary"
    description: "Enhanced executive summary synthesis"
    content: |
      <invoke-subagent name="bmm-market-researcher">
      Synthesize all research findings into a compelling executive summary.
      Highlight the most critical insights and strategic implications.
      Ensure all key metrics and recommendations are captured.
      </invoke-subagent>

# Configuration for subagent behavior
configuration:
  auto_invoke: true # Automatically invoke subagents when relevant
  parallel_execution: true # Allow parallel subagent execution
  cache_results: true # Cache subagent outputs for reuse

  # Subagent-specific configurations
  subagent_config:
    bmm-market-researcher:
      priority: high
      max_execution_time: 300 # seconds
      retry_on_failure: true

    bmm-trend-spotter:
      priority: medium
      max_execution_time: 180
      retry_on_failure: false

    bmm-data-analyst:
      priority: high
      max_execution_time: 240
      retry_on_failure: true

    bmm-competitor-analyzer:
      priority: high
      max_execution_time: 300
      retry_on_failure: true

    bmm-user-researcher:
      priority: medium
      max_execution_time: 240
      retry_on_failure: false

# Metadata
metadata:
  compatible_with: "claude-code-1.0+"
  workflow: "market-research"
  module: "bmm"
  author: "BMad Builder"
  description: "Claude Code enhancements for comprehensive market research"
