name: epic-tech-context
description: "Generate a comprehensive Technical Specification from PRD and Architecture with acceptance criteria and traceability mapping"
author: "BMAD BMM"

# Critical variables
config_source: "{project-root}/bmad/bmm/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
date: system-generated

# Inputs expected (check output_folder or ask user if missing)
recommended_inputs:
  - prd
  - gdd
  - architecture
  - ux_design
  - epics (only the specific epic needed for this tech spec)
  - prior epic tech-specs for model, style and consistency reference

# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
# Strategy: SELECTIVE LOAD - only load the specific epic needed (epic_num from context)
input_file_patterns:
  prd:
    whole: "{output_folder}/*prd*.md"
    sharded: "{output_folder}/*prd*/index.md"

  gdd:
    whole: "{output_folder}/*gdd*.md"
    sharded: "{output_folder}/*gdd*/index.md"

  architecture:
    whole: "{output_folder}/*architecture*.md"
    sharded: "{output_folder}/*architecture*/index.md"

  ux_design:
    whole: "{output_folder}/*ux*.md"
    sharded: "{output_folder}/*ux*/index.md"

  epics:
    whole: "{output_folder}/*epic*.md"
    sharded_index: "{output_folder}/*epic*/index.md"
    sharded_single: "{output_folder}/*epic*/epic-{{epic_num}}.md"

  document_project:
    sharded: "{output_folder}/docs/index.md"

# Workflow components
installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/epic-tech-context"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"

# Output configuration
default_output_file: "{output_folder}/tech-spec-epic-{{epic_id}}.md"

standalone: true
