# Test Architect workflow: framework
name: testarch-framework
description: "Initialize production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, and configuration"
author: "BMad"

# Critical variables from config
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"
document_output_language: "{config_source}:document_output_language"
date: system-generated

# Workflow components
installed_path: "{project-root}/_bmad/bmm/workflows/testarch/framework"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"

# Variables and inputs
variables:
  test_dir: "{project-root}/tests" # Root test directory
  use_typescript: true # Prefer TypeScript configuration
  framework_preference: "auto" # auto, playwright, cypress - user can override auto-detection
  project_size: "auto" # auto, small, large - influences framework recommendation

# Output configuration
default_output_file: "{test_dir}/README.md" # Main deliverable is test setup README

# Required tools
required_tools:
  - read_file # Read package.json, existing configs
  - write_file # Create config files, helpers, fixtures, tests
  - create_directory # Create test directory structure
  - list_files # Check for existing framework
  - search_repo # Find architecture docs

tags:
  - qa
  - setup
  - test-architect
  - framework
  - initialization

execution_hints:
  interactive: false # Minimize prompts; auto-detect when possible
  autonomous: true # Proceed without user input unless blocked
  iterative: true
