# Product Requirements Document (PRD) Workflow
name: prd
description: "Unified PRD workflow for BMad Method and Enterprise Method tracks. Produces strategic PRD and tactical epic breakdown. Hands off to architecture workflow for technical design. Note: Quick Flow track uses tech-spec workflow."
author: "BMad"

# Critical variables from config
config_source: "{project-root}/{bmad_folder}/bmm/config.yaml"
project_name: "{config_source}:project_name"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
document_output_language: "{config_source}:document_output_language"
user_skill_level: "{config_source}:user_skill_level"
date: system-generated

# Workflow components
installed_path: "{project-root}/{bmad_folder}/bmm/workflows/2-plan-workflows/prd"
instructions: "{installed_path}/instructions.md"

# Templates
prd_template: "{installed_path}/prd-template.md"

# Data files for data-driven behavior
project_types_data: "{installed_path}/project-types.csv"
domain_complexity_data: "{installed_path}/domain-complexity.csv"

# External workflows for checkpoints
advanced_elicitation: "{project-root}/{bmad_folder}/core/tasks/advanced-elicitation.md"
party_mode: "{project-root}/{bmad_folder}/core/workflows/party-mode.md"

# Output files
status_file: "{output_folder}/bmm-workflow-status.yaml"
default_output_file: "{output_folder}/prd.md"

# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
# Strategy: How to load sharded documents (FULL_LOAD, SELECTIVE_LOAD, INDEX_GUIDED)
input_file_patterns:
  product_brief:
    description: "Product vision and goals (optional)"
    whole: "{output_folder}/*brief*.md"
    sharded: "{output_folder}/*brief*/index.md"
    load_strategy: "FULL_LOAD"
  research:
    description: "Market or domain research (optional)"
    whole: "{output_folder}/*research*.md"
    sharded: "{output_folder}/*research*/index.md"
    load_strategy: "FULL_LOAD"
  document_project:
    description: "Brownfield project documentation (optional)"
    sharded: "{output_folder}/index.md"
    load_strategy: "INDEX_GUIDED"

standalone: true

web_bundle:
  name: "prd"
  description: "Unified PRD workflow for BMad Method and Enterprise Method tracks. Produces strategic PRD and tactical epic breakdown. Hands off to architecture workflow for technical design. Note: Quick Flow track uses tech-spec workflow."
  author: "BMad"
  instructions: "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/instructions.md"
  validation: "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/checklist.md"
  web_bundle_files:
    # Core workflow files
    - "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/instructions.md"
    - "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/prd-template.md"
    - "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/project-types.csv"
    - "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/domain-complexity.csv"
    - "{bmad_folder}/bmm/workflows/2-plan-workflows/prd/checklist.md"

    # Child workflow and its files
    - "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml"
    - "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md"
    - "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md"

    # Task dependencies (referenced in instructions.md)
    - "{bmad_folder}/core/tasks/workflow.xml"
    - "{bmad_folder}/core/tasks/advanced-elicitation.xml"
    - "{bmad_folder}/core/tasks/advanced-elicitation-methods.csv"
  child_workflows:
    - create-epics-and-stories: "{bmad_folder}/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml"
