instructions.md 6.7 KB

Workflow Init - Initialize BMM Project

The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/workflow-status/init/workflow.yaml This workflow initializes a BMM project by determining project level, type, and creating the workflow path configuration.

Check if {workflow_path} exists

<output>项目已初始化!工作流路径配置文件已存在于: {workflow_path}</output>
<ask>是否要重新初始化项目?(y/n)</ask>
<check if="user response == 'n'">
  <action>Exit workflow</action>
</check>

确定项目级别 (Project Level)

BMM 框架支持以下项目级别:

Level 1 - Analysis (分析阶段)

  • 市场研究、技术调研、领域分析
  • 产出:Product Brief、Research Reports

Level 2 - Planning (规划阶段)

  • PRD、UX Design
  • 产出:PRD Document、UX Design Specification

Level 3 - Solutioning (解决方案阶段)

  • Architecture、Epics & Stories
  • 产出:Architecture Document、Epics & Stories

Level 4 - Implementation (实施阶段)

  • Sprint Planning、Development、Code Review
  • 产出:Sprint Status、Story Files、Code Changes

请输入项目级别 (1-4): Validate input is 1, 2, 3, or 4
<output>无效的级别,请输入 1-4 之间的数字</output>
<goto step="2"/>

Set {{level}} to user input

确定项目类型 (Project Type)

请选择项目类型:

1 - Greenfield (全新项目)

  • 从零开始的新项目
  • 无遗留代码约束

2 - Brownfield (现有项目)

  • 在现有代码库基础上开发
  • 需要考虑现有架构和模式

3 - Migration (迁移项目)

  • 从其他框架/平台迁移
  • 需要保持功能等价

4 - Enhancement (增强项目)

  • 对现有项目进行功能增强
  • 基于现有架构扩展

请输入项目类型 (1-4): Validate input is 1, 2, 3, or 4
<output>无效的类型,请输入 1-4 之间的数字</output>
<goto step="3"/>

Set {{type}} to user input

Determine workflow path based on level and type

工作流路径配置

根据项目级别和类型,推荐的工作流路径:

<output>

Level 1 - Analysis Phase 推荐工作流:

  1. create-product-brief - 创建产品简介
  2. research - 进行市场/技术/领域调研
  3. Set workflow_mode = "analysis"

<output>

Level 2 - Planning Phase 推荐工作流:

  1. create-prd - 创建产品需求文档
  2. create-ux-design - 设计 UX 模式
  3. Set workflow_mode = "planning"

<output>

Level 3 - Solutioning Phase 推荐工作流:

  1. create-architecture - 创建架构文档
  2. create-epics-and-stories - 分解 Epic 和 Story
  3. check-implementation-readiness - 检查实施准备情况
  4. Set workflow_mode = "solutioning"

<output>

Level 4 - Implementation Phase 推荐工作流:

  1. sprint-planning - Sprint 规划
  2. create-story - 创建 Story
  3. dev-story - 开发 Story
  4. code-review - 代码审查
  5. sprint-status - Sprint 状态查询
  6. Set workflow_mode = "implementation"

确认此工作流路径?(y/n/edit)

<goto step="2"/>

BMM Workflow Path Configuration

Generated: {{date}}

Project: {project-root}

project_level: {{level}} project_type: {{type}} workflow_mode: {{workflow_mode}}

Recommended workflows for this project level

recommended_workflows:

<template-output>
  • create-product-brief
  • research

<template-output>
  • create-prd
  • create-ux-design

<template-output>
  • create-architecture
  • create-epics-and-stories
  • check-implementation-readiness

<template-output>
  • sprint-planning
  • create-story
  • dev-story
  • code-review
  • sprint-status
  • retrospective
  • correct-course

Level descriptions:

Level 1 (analysis): Market research, technical research, domain analysis

Level 2 (planning): PRD, UX Design

Level 3 (solutioning): Architecture, Epics & Stories

Level 4 (implementation): Sprint Planning, Development, Code Review

Type descriptions:

1 (greenfield): New project from scratch

2 (brownfield): Existing codebase, consider existing patterns

3 (migration): Migrating from another framework/platform

4 (enhancement): Extending existing functionality

Write template output to: {workflow_path}

初始化完成

工作流路径配置已保存到: {workflow_path}

项目级别: Level {{level}} 项目类型: Type {{type}} ({{project_type}}) 工作流模式: {{workflow_mode}}

下一步建议:

<output>
  • 运行 /bmad:bmm:workflows:create-product-brief 创建产品简介
  • 运行 /bmad:bmm:workflows:research 进行调研

<output>
  • 运行 /bmad:bmm:workflows:create-prd 创建产品需求文档
  • 运行 /bmad:bmm:workflows:create-ux-design 设计 UX

<output>
  • 运行 /bmad:bmm:workflows:create-architecture 创建架构文档
  • 运行 /bmad:bmm:workflows:create-epics-and-stories 分解 Epic 和 Story

<output>
  • 运行 /bmad:bmm:workflows:sprint-planning 进行 Sprint 规划
  • 运行 /bmad:bmm:workflows:sprint-status 查看当前状态

Report workflow completion