# create-module Workflow Rule

This rule defines the create-module workflow.

## Workflow Description

Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure

## Workflow Definition

# Build Module Workflow Configuration
name: create-module
description: "Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure"
author: "BMad"

# Critical variables load from config_source
config_source: "{project-root}/.bmad/bmb/config.yaml"
custom_module_location: "{config_source}:custom_module_location"
communication_language: "{config_source}:communication_language"
user_name: "{config_source}:user_name"

# Reference guides for module building
module_structure_guide: "{installed_path}/module-structure.md"
installer_templates: "{installed_path}/installer-templates/"

# Use existing build workflows
agent_builder: "{project-root}/.bmad/bmb/workflows/create-agent/workflow.yaml"
workflow_builder: "{project-root}/.bmad/bmb/workflows/create-workflow/workflow.yaml"
brainstorming_workflow: "{project-root}/.bmad/core/workflows/brainstorming/workflow.yaml"
brainstorming_context: "{installed_path}/brainstorm-context.md"

# Reference examples - for learning patterns
bmm_module_dir: "{project-root}/.bmad/bmm/"
cis_module_dir: "{project-root}/.bmad/cis/"
existing_agents_dir: "{project-root}/.bmad/*/agents/"
existing_workflows_dir: "{project-root}/.bmad/*/workflows/"

# Optional user inputs - discovered if they exist
input_file_patterns:
  module_brief:
    description: "Module brief with vision and requirements (optional)"
    whole: "{output_folder}/module-brief-*.md"
    load_strategy: "FULL_LOAD"
  brainstorming:
    description: "Brainstorming session outputs (optional)"
    whole: "{output_folder}/brainstorming-*.md"
    load_strategy: "FULL_LOAD"

# Module path and component files
installed_path: "{project-root}/.bmad/bmb/workflows/create-module"
template: false # This is an interactive scaffolding workflow
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"

# Output configuration - creates entire module structure
# Save to custom_module_location/{{module_code}}
installer_output_folder: "{custom_module_location}/{{module_code}}"

standalone: true

# Web bundle configuration

## Usage

Reference this workflow with `@workflow-create-module` to execute the guided workflow.

## Module

Part of the BMAD BMB module.
