bmad-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

BMAD Orchestrator

BMAD编排器

Purpose: Core orchestrator for the BMAD Method (Breakthrough Method for Agile AI-Driven Development), managing workflows, tracking status, and routing users through structured development phases.
用途: BMAD方法(敏捷AI驱动开发突破方法)的核心编排器,用于管理工作流、跟踪状态,并引导用户完成结构化开发阶段。

When to Use This Skill

何时使用此技能

Use this skill when:
  • User requests
    /workflow-init
    or
    /init
    - Initialize BMAD in a project
  • User requests
    /workflow-status
    or
    /status
    - Check progress and get recommendations
  • User mentions "BMAD setup" or "start BMAD workflow"
  • Project needs structured development methodology
  • Coordination between multiple development phases is required
在以下场景使用此技能:
  • 用户请求
    /workflow-init
    /init
    - 在项目中初始化BMAD
  • 用户请求
    /workflow-status
    /status
    - 检查进度并获取建议
  • 用户提及"BMAD设置"或"启动BMAD工作流"
  • 项目需要结构化开发方法论
  • 需要协调多个开发阶段

Core Responsibilities

核心职责

  1. Project Initialization - Set up BMAD directory structure and configuration
  2. Status Tracking - Monitor progress across 4 development phases
  3. Workflow Routing - Direct users to appropriate next steps based on project state
  4. Progress Management - Maintain workflow status and completion tracking
  1. 项目初始化 - 搭建BMAD目录结构和配置
  2. 状态跟踪 - 监控4个开发阶段的进度
  3. 工作流路由 - 根据项目状态引导用户至合适的下一步
  4. 进度管理 - 维护工作流状态和完成情况跟踪

BMAD Method Overview

BMAD方法概述

4 Development Phases

4个开发阶段

  1. Analysis (Optional) - Research, brainstorming, product brief
  2. Planning (Required) - PRD or Tech Spec based on project complexity
  3. Solutioning (Conditional) - Architecture design for medium+ projects
  4. Implementation (Required) - Sprint planning, stories, development
  1. 分析(可选)- 调研、头脑风暴、产品简报
  2. 规划(必填)- 根据项目复杂度编写PRD或技术规格书
  3. 方案设计(条件必填)- 中型及以上项目的架构设计
  4. 实施(必填)- 冲刺规划、用户故事、开发

Project Levels

项目级别

  • Level 0: Single atomic change (1 story) - Quick fixes, small tweaks
  • Level 1: Small feature (1-10 stories) - Single feature additions
  • Level 2: Medium feature set (5-15 stories) - Multiple related features
  • Level 3: Complex integration (12-40 stories) - System integrations
  • Level 4: Enterprise expansion (40+ stories) - Large-scale projects
Planning Requirements by Level:
  • Level 0-1: Tech Spec required, PRD optional/recommended
  • Level 2+: PRD required, Tech Spec optional
  • Level 2+: Architecture required
  • 0级: 单一原子变更(1个用户故事)- 快速修复、小调整
  • 1级: 小型功能(1-10个用户故事)- 单一功能新增
  • 2级: 中型功能集(5-15个用户故事)- 多个相关功能
  • 3级: 复杂集成(12-40个用户故事)- 系统集成
  • 4级: 企业级扩展(40+个用户故事)- 大型项目
各阶段规划要求:
  • 0-1级:必填技术规格书,PRD可选/推荐
  • 2级及以上:必填PRD,技术规格书可选
  • 2级及以上:必填架构设计

Available Commands

可用命令

/workflow-init or /init

/workflow-init 或 /init

Initialize BMAD structure in the current project.
Steps:
  1. Create directory structure:
    bmad/
    ├── config.yaml
    └── agent-overrides/
    
    docs/
    ├── bmm-workflow-status.yaml
    └── stories/
    
    .claude/commands/bmad/ (if not exists)
  2. Collect project information:
    • Project name
    • Project type (web-app, mobile-app, api, game, library, other)
    • Project level (0-4)
  3. Create project config using config.template.yaml
  4. Create workflow status file with conditional requirements based on level:
    • Use workflow-status template
    • Set PRD: required if level >= 2, else recommended
    • Set Tech-spec: required if level <= 1, else optional
    • Set Architecture: required if level >= 2, else optional
  5. Display initialization summary and recommend next workflow
  6. Offer to start recommended workflow
Example interaction:
User: /workflow-init

Orchestrator: I'll initialize BMAD for your project.
[Collects info, creates files...]

✓ BMAD Method initialized!

Project: MyApp
Type: web-app
Level: 2 (Medium feature set)

Configuration: bmad/config.yaml
Status tracking: docs/bmm-workflow-status.yaml

Recommended next step: Create Product Brief with /product-brief
This will help define your product vision and requirements.

Would you like to start with /product-brief?
在当前项目中初始化BMAD结构。
步骤:
  1. 创建目录结构:
    bmad/
    ├── config.yaml
    └── agent-overrides/
    
    docs/
    ├── bmm-workflow-status.yaml
    └── stories/
    
    .claude/commands/bmad/(若不存在)
  2. 收集项目信息:
    • 项目名称
    • 项目类型(web-app、mobile-app、api、game、library、other)
    • 项目级别(0-4)
  3. 使用config.template.yaml创建项目配置
  4. 根据项目级别创建带条件要求的工作流状态文件:
    • 使用工作流状态模板
    • 设置PRD:级别≥2时必填,否则推荐
    • 设置技术规格书:级别≤1时必填,否则可选
    • 设置架构设计:级别≥2时必填,否则可选
  5. 显示初始化摘要并推荐下一个工作流
  6. 提供启动推荐工作流的选项
交互示例:
用户: /workflow-init

编排器: 我将为你的项目初始化BMAD。
[收集信息,创建文件...]

✓ BMAD方法已初始化!

项目: MyApp
类型: web-app
级别: 2(中型功能集)

配置文件: bmad/config.yaml
状态跟踪文件: docs/bmm-workflow-status.yaml

推荐下一步:使用/product-brief创建产品简报
这将帮助你定义产品愿景和需求。

是否要从/product-brief开始?

/workflow-status or /status

/workflow-status 或 /status

Check project status and get recommendations for next steps.
Steps:
  1. Load project config (bmad/config.yaml)
  2. Load workflow status (docs/bmm-workflow-status.yaml)
  3. Determine current phase and next recommended workflow
  4. Display status with visual indicators
  5. Offer to execute recommended workflow
Status Indicators:
  • ✓ = Completed (shows file path)
  • ⚠ = Required but not started
  • → = Current phase
    • = Optional/not required
Example interaction:
User: /status

Orchestrator: Checking your project status...

Project: MyApp (Web Application, Level 2)

✓ Phase 1: Analysis
  ✓ product-brief (docs/product-brief-myapp-2025-01-11.md)

→ Phase 2: Planning [CURRENT]
  ⚠ prd (required - NOT STARTED)
  - tech-spec (optional)

Phase 3: Solutioning
  - architecture (required)

Phase 4: Implementation
  - sprint-planning (required)

Recommended next step: Create PRD with /prd command

Would you like to run /prd to create your PRD?
If project not initialized:
  • Inform user BMAD not detected
  • Offer to run
    /workflow-init
检查项目状态并获取下一步建议。
步骤:
  1. 加载项目配置(bmad/config.yaml)
  2. 加载工作流状态(docs/bmm-workflow-status.yaml)
  3. 确定当前阶段和推荐的下一个工作流
  4. 带视觉标识显示状态
  5. 提供执行推荐工作流的选项
状态标识:
  • ✓ = 已完成(显示文件路径)
  • ⚠ = 必填但未启动
  • → = 当前阶段
    • = 可选/非必填
交互示例:
用户: /status

编排器: 正在检查你的项目状态...

项目: MyApp(Web应用,级别2)

✓ 阶段1:分析
  ✓ product-brief(docs/product-brief-myapp-2025-01-11.md)

→ 阶段2:规划 [当前]
  ⚠ prd(必填 - 未启动)
  - tech-spec(可选)

阶段3:方案设计
  - architecture(必填)

阶段4:实施
  - sprint-planning(必填)

推荐下一步:使用/prd命令创建PRD

是否要运行/prd来创建你的PRD?
若项目未初始化:
  • 告知用户未检测到BMAD
  • 提供运行
    /workflow-init
    的选项

Workflow Routing Logic

工作流路由逻辑

After determining project status, route users to specialized workflows:
  • Analysis workflows:
    /product-brief
    ,
    /brainstorm
    ,
    /research
  • Planning workflows:
    /prd
    ,
    /tech-spec
  • UX workflows:
    /create-ux-design
  • Architecture workflows:
    /architecture
  • Sprint workflows:
    /sprint-planning
    ,
    /create-story
  • Development workflows:
    /dev-story
    ,
    /code-review
Recommendation logic:
  1. If no product-brief and project new → Recommend:
    /product-brief
  2. If product-brief complete, no PRD/tech-spec:
    • Level 0-1 → Recommend:
      /tech-spec
    • Level 2+ → Recommend:
      /prd
  3. If PRD/tech-spec complete, no architecture, level 2+ → Recommend:
    /architecture
  4. If planning complete → Recommend:
    /sprint-planning
  5. If sprint active → Recommend:
    /create-story
    or
    /dev-story
See REFERENCE.md for detailed routing logic.
确定项目状态后,将用户引导至专业工作流:
  • 分析阶段工作流:
    /product-brief
    /brainstorm
    /research
  • 规划阶段工作流:
    /prd
    /tech-spec
  • UX工作流:
    /create-ux-design
  • 架构工作流:
    /architecture
  • 冲刺工作流:
    /sprint-planning
    /create-story
  • 开发工作流:
    /dev-story
    /code-review
推荐逻辑:
  1. 若项目为新项目且无产品简报 → 推荐:
    /product-brief
  2. 若产品简报已完成,无PRD/技术规格书:
    • 0-1级 → 推荐:
      /tech-spec
    • 2级及以上 → 推荐:
      /prd
  3. 若PRD/技术规格书已完成,无架构设计且级别≥2 → 推荐:
    /architecture
  4. 若规划阶段已完成 → 推荐:
    /sprint-planning
  5. 若冲刺已激活 → 推荐:
    /create-story
    /dev-story
详细路由逻辑请参考REFERENCE.md

Configuration Files

配置文件

Project Config (bmad/config.yaml)

项目配置(bmad/config.yaml)

yaml
project_name: "MyApp"
project_type: "web-app"  # web-app, mobile-app, api, game, library, other
project_level: 2         # 0-4
output_folder: "docs"
communication_language: "English"
yaml
project_name: "MyApp"
project_type: "web-app"  # web-app, mobile-app, api, game, library, other
project_level: 2         # 0-4
output_folder: "docs"
communication_language: "English"

Workflow Status (docs/bmm-workflow-status.yaml)

工作流状态(docs/bmm-workflow-status.yaml)

Tracks completion of each workflow with status values:
  • "optional"
    - Can be skipped
  • "recommended"
    - Strongly suggested
  • "required"
    - Must be completed
  • "{file-path}"
    - Completed (shows output file)
  • "skipped"
    - Explicitly skipped
See templates/config.template.yaml for full template.
使用状态值跟踪每个工作流的完成情况:
  • "optional"
    - 可跳过
  • "recommended"
    - 强烈建议
  • "required"
    - 必须完成
  • "{file-path}"
    - 已完成(显示输出文件)
  • "skipped"
    - 明确跳过
完整模板请参考templates/config.template.yaml

Helper Scripts

辅助脚本

Execute via Bash tool:
  • init-project.sh - Automated project initialization
    bash
    bash scripts/init-project.sh --name "MyApp" --type web-app --level 2
  • check-status.sh - Display current workflow status
    bash
    bash scripts/check-status.sh
  • validate-config.sh - Validate YAML configuration
    bash
    bash scripts/validate-config.sh bmad/config.yaml
See scripts documentation for details.
通过Bash工具执行:
  • init-project.sh - 自动化项目初始化
    bash
    bash scripts/init-project.sh --name "MyApp" --type web-app --level 2
  • check-status.sh - 显示当前工作流状态
    bash
    bash scripts/check-status.sh
  • validate-config.sh - 验证YAML配置
    bash
    bash scripts/validate-config.sh bmad/config.yaml
详细信息请参考脚本文档

Error Handling

错误处理

Config missing:
  • Suggest
    /workflow-init
  • Explain BMAD not initialized
Invalid YAML:
  • Show error location
  • Offer to fix or reinitialize
Template missing:
  • Use inline fallback
  • Log warning
  • Continue operation
Status file inconsistent:
  • Validate against project level
  • Offer to regenerate
配置缺失:
  • 建议使用
    /workflow-init
  • 说明BMAD未初始化
YAML无效:
  • 显示错误位置
  • 提供修复或重新初始化的选项
模板缺失:
  • 使用内置备选模板
  • 记录警告
  • 继续操作
状态文件不一致:
  • 根据项目级别验证
  • 提供重新生成的选项

Integration with Other Skills

与其他技能的集成

This orchestrator coordinates with specialized BMAD skills:
  • bmad-analyst
    - Analysis phase workflows
  • bmad-planner
    - Planning phase workflows
  • bmad-architect
    - Architecture design
  • bmad-sprint-master
    - Sprint and story management
  • bmad-developer
    - Development workflows
When routing to these skills, pass context:
  • Current project config
  • Workflow status
  • Project level
  • Output folder location
此编排器与专业BMAD技能协同工作:
  • bmad-analyst
    - 分析阶段工作流
  • bmad-planner
    - 规划阶段工作流
  • bmad-architect
    - 架构设计
  • bmad-sprint-master
    - 冲刺和用户故事管理
  • bmad-developer
    - 开发工作流
引导至这些技能时,传递以下上下文:
  • 当前项目配置
  • 工作流状态
  • 项目级别
  • 输出文件夹位置

Token Optimization

Token优化

  • Use script automation for repetitive tasks
  • Reference REFERENCE.md for detailed logic
  • Load files only when needed
  • Keep status displays concise
  • Delegate detailed work to specialized skills
  • 使用脚本自动化重复任务
  • 参考REFERENCE.md获取详细逻辑
  • 仅在需要时加载文件
  • 保持状态显示简洁
  • 将详细工作委托给专业技能

Subagent Strategy

子代理策略

This skill leverages parallel subagents to maximize context utilization (each agent has 200K tokens).
此技能利用并行子代理最大化上下文利用率(每个代理拥有200K Token)。

Workflow Status Check Workflow

工作流状态检查工作流

Pattern: Fan-Out Research Agents: 3-4 parallel agents
AgentTaskOutput
Agent 1Check project config and validate structurebmad/outputs/config-status.md
Agent 2Analyze workflow status file and phase completionbmad/outputs/workflow-status.md
Agent 3Scan docs directory for completed artifactsbmad/outputs/artifacts-status.md
Agent 4Generate recommendations based on project levelbmad/outputs/recommendations.md
Coordination:
  1. Launch all agents with shared project context
  2. Each agent writes status findings to designated output
  3. Main context synthesizes results into unified status report
  4. Display visual status indicators and next steps
模式: 扇出调研 代理: 3-4个并行代理
代理任务输出
代理1检查项目配置并验证结构bmad/outputs/config-status.md
代理2分析工作流状态文件和阶段完成情况bmad/outputs/workflow-status.md
代理3扫描docs目录查找已完成的工件bmad/outputs/artifacts-status.md
代理4根据项目级别生成建议bmad/outputs/recommendations.md
协调流程:
  1. 启动所有代理并共享项目上下文
  2. 每个代理将状态发现写入指定输出
  3. 主上下文将结果合成为统一状态报告
  4. 显示可视化状态标识和下一步操作

Project Initialization Workflow

项目初始化工作流

Pattern: Parallel Section Generation Agents: 3 parallel agents
AgentTaskOutput
Agent 1Create directory structure and validate pathsbmad/outputs/directory-setup.md
Agent 2Generate project config from templatebmad/config.yaml
Agent 3Generate workflow status file with level-based requirementsdocs/bmm-workflow-status.yaml
Coordination:
  1. Gather project information from user (sequential)
  2. Launch parallel agents to create structures and configs
  3. Main context validates all outputs and displays summary
模式: 并行章节生成 代理: 3个并行代理
代理任务输出
代理1创建目录结构并验证路径bmad/outputs/directory-setup.md
代理2根据模板生成项目配置bmad/config.yaml
代理3根据项目级别生成工作流状态文件docs/bmm-workflow-status.yaml
协调流程:
  1. 从用户处收集项目信息(串行)
  2. 启动并行代理创建结构和配置
  3. 主上下文验证所有输出并显示摘要

Example Subagent Prompt

子代理提示示例

Task: Analyze workflow status and determine current phase
Context: Read bmad/config.yaml and docs/bmm-workflow-status.yaml
Objective: Identify completed workflows, current phase, and required next steps
Output: Write analysis to bmad/outputs/workflow-status.md

Deliverables:
1. List of completed workflows with file paths
2. Current phase determination
3. Required vs optional next workflows
4. Blocking issues or missing dependencies

Constraints:
- Use project level to determine requirements
- Flag any inconsistencies in status file
任务:分析工作流状态并确定当前阶段
上下文:读取bmad/config.yaml和docs/bmm-workflow-status.yaml
目标:识别已完成的工作流、当前阶段和所需的下一步操作
输出:将分析结果写入bmad/outputs/workflow-status.md

交付物:
1. 带文件路径的已完成工作流列表
2. 当前阶段判定
3. 必填与可选的下一个工作流
4. 阻塞问题或缺失的依赖项

约束:
- 根据项目级别确定要求
- 标记状态文件中的任何不一致之处

Notes for Claude

给Claude的提示

  • This is the entry point for BMAD workflows
  • Always check if project is initialized before operations
  • Maintain phase-based progression (don't skip required phases)
  • Use TodoWrite for multi-step initialization
  • Keep responses focused and actionable
  • Hand off to specialized skills for detailed workflows
  • Update workflow status after completing workflows
  • 这是BMAD工作流的入口点
  • 操作前始终检查项目是否已初始化
  • 保持基于阶段的推进(不要跳过必填阶段)
  • 使用TodoWrite完成多步骤初始化
  • 保持回复聚焦且可操作
  • 将详细工作委托给专业技能
  • 完成工作流后更新工作流状态

Quick Reference

快速参考

  • Detailed routing logic: REFERENCE.md
  • Workflow phases: resources/workflow-phases.md
  • Config template: templates/config.template.yaml
  • Init script: scripts/init-project.sh
  • Status script: scripts/check-status.sh
  • 详细路由逻辑:REFERENCE.md
  • 工作流阶段:resources/workflow-phases.md
  • 配置模板:templates/config.template.yaml
  • 初始化脚本:scripts/init-project.sh
  • 状态脚本:scripts/check-status.sh