bmad-story-pipeline
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBMAD Story Pipeline
BMAD用户故事流水线
Complete the delivery pipeline for story using configurable workflow.
{ARGUMENT}使用可配置工作流完成用户故事 的交付流水线。
{ARGUMENT}Pre-step: Determine Story Number
预步骤:确定用户故事编号
If is empty or not provided:
{ARGUMENT}- Read (or
_bmad-output/implementation-artifacts/sprint-status.yaml) to find storiesdocs/sprint/sprint-status.yaml - Find the first story with status "todo" or "in-progress"
- Use that story number as
{STORY_ID} - If no story found, ask user to specify story number
The story number format is typically (e.g., , ).
X-Y1-12-3如果 为空或未提供:
{ARGUMENT}- 读取 (或
_bmad-output/implementation-artifacts/sprint-status.yaml)查找用户故事docs/sprint/sprint-status.yaml - 找到第一个状态为 "todo" 或 "in-progress" 的用户故事
- 将该用户故事编号作为
{STORY_ID} - 如果未找到用户故事,请用户指定用户故事编号
用户故事编号格式通常为 (例如 、)。
X-Y1-12-3Execution Strategy
执行策略
- Read workflow steps from references/workflow-steps.md
- Execute each step sequentially using Task tool (general-purpose agent)
- Output progress after each step
- After pipeline, update status to done
- 从 references/workflow-steps.md 读取工作流步骤
- 使用Task工具(通用Agent)依次执行每个步骤
- 每个步骤执行完成后输出进度
- 流水线执行结束后,将状态更新为done
Workflow Steps
工作流步骤
Read and execute steps from references/workflow-steps.md.
For each step defined there, you MUST use the Task tool to execute in a subagent:
Task(
subagent_type: "general-purpose",
description: "<Step description>",
prompt: "Execute the command: <COMMAND_WITH_STORY_ID>
Return: 1) Step completion status 2) Key outputs 3) Any issues to note"
)读取并执行 references/workflow-steps.md 中的步骤。
对于其中定义的每个步骤,你必须使用 Task工具 在子Agent中执行:
Task(
subagent_type: "general-purpose",
description: "<Step description>",
prompt: "Execute the command: <COMMAND_WITH_STORY_ID>
Return: 1) Step completion status 2) Key outputs 3) Any issues to note"
)Example Invocations
调用示例
Step 1 - Create Story:
Task(
subagent_type: "general-purpose",
description: "Create user story {STORY_ID}",
prompt: "Execute /bmad-bmm-create-story {STORY_ID} yolo to create story file. Return: 1) Story ID and Title 2) Created files 3) Any issues"
)Step 2 - ATDD Tests:
Task(
subagent_type: "general-purpose",
description: "Generate ATDD tests for {STORY_ID}",
prompt: "Execute /bmad-tea-testarch-atdd {STORY_ID} yolo to generate acceptance tests. Return: 1) ATDD checklist 2) Test files created 3) Any issues"
)Step 3 - Development:
Task(
subagent_type: "general-purpose",
description: "Develop user story {STORY_ID}",
prompt: "Execute /bmad-bmm-dev-story {STORY_ID} yolo to implement story code. Return: 1) Modified files 2) Summary of changes 3) Any issues"
)Step 4 - Code Review:
Task(
subagent_type: "general-purpose",
description: "Code review for {STORY_ID}",
prompt: "Execute /bmad-bmm-code-review {STORY_ID} yolo for adversarial review. Return: 1) Conclusion (pass/needs-fix) 2) Issues by severity 3) Any blocking issues"
)Step 5 - Trace Coverage:
Task(
subagent_type: "general-purpose",
description: "Trace test coverage for {STORY_ID}",
prompt: "Execute /bmad-tea-testarch-trace {STORY_ID} yolo for traceability matrix. Return: 1) Coverage percentage 2) Gate decision 3) Any gaps"
)步骤1 - 创建用户故事:
Task(
subagent_type: "general-purpose",
description: "Create user story {STORY_ID}",
prompt: "Execute /bmad-bmm-create-story {STORY_ID} yolo to create story file. Return: 1) Story ID and Title 2) Created files 3) Any issues"
)步骤2 - ATDD测试:
Task(
subagent_type: "general-purpose",
description: "Generate ATDD tests for {STORY_ID}",
prompt: "Execute /bmad-tea-testarch-atdd {STORY_ID} yolo to generate acceptance tests. Return: 1) ATDD checklist 2) Test files created 3) Any issues"
)步骤3 - 开发:
Task(
subagent_type: "general-purpose",
description: "Develop user story {STORY_ID}",
prompt: "Execute /bmad-bmm-dev-story {STORY_ID} yolo to implement story code. Return: 1) Modified files 2) Summary of changes 3) Any issues"
)步骤4 - 代码评审:
Task(
subagent_type: "general-purpose",
description: "Code review for {STORY_ID}",
prompt: "Execute /bmad-bmm-code-review {STORY_ID} yolo for adversarial review. Return: 1) Conclusion (pass/needs-fix) 2) Issues by severity 3) Any blocking issues"
)步骤5 - 测试覆盖率追踪:
Task(
subagent_type: "general-purpose",
description: "Trace test coverage for {STORY_ID}",
prompt: "Execute /bmad-tea-testarch-trace {STORY_ID} yolo for traceability matrix. Return: 1) Coverage percentage 2) Gate decision 3) Any gaps"
)Execution Flow
执行流程
For each step:
- Replace with the actual story number in the prompt
{STORY_ID} - Call Task tool with the step's description and prompt
- Wait for completion and capture result
- Output progress:
[X/5] Step Name - Status - If step fails, stop and report error
每个步骤:
- 在提示词中将 替换为实际的用户故事编号
{STORY_ID} - 传入该步骤的描述和提示词调用Task工具
- 等待执行完成并捕获结果
- 输出进度:
[X/5] 步骤名称 - 状态 - 如果步骤执行失败,停止执行并上报错误
Progress Display
进度展示
After each step, output progress:
📊 Pipeline Progress: [X/5] ████████░░░░ 40%
✅ Step X: <Step Name>
Result: <Brief result summary>每个步骤执行完成后,输出进度:
📊 流水线进度: [X/5] ████████░░░░ 40%
✅ 步骤X: <步骤名称>
结果: <结果简要说明>Error Handling
错误处理
If any step fails:
- Stop executing subsequent steps
- Output error information:
❌ Pipeline Failed at Step X: <Step Name> Error: <Error details> 💡 Suggested actions: - Check the story file for issues - Run the failed step manually: <command> - Fix the issue and restart pipeline - Do NOT proceed to next steps
如果任何步骤执行失败:
- 停止执行后续步骤
- 输出错误信息:
❌ 流水线在步骤X失败: <步骤名称> 错误: <错误详情> 💡 建议操作: - 检查用户故事文件是否存在问题 - 手动执行失败步骤: <command> - 修复问题后重启流水线 - 不要继续执行后续步骤
Post-Pipeline: Update Status
流水线结束后:更新状态
After ALL steps complete successfully:
-
Update sprint-status.yaml:
- Find the story entry
- Change status from to
in-progressdone
-
Update story document (if exists):
- Change to
Status:done - Mark all tasks with ✅
- Change
Output final summary:
🎉 Pipeline Complete!
Story: {STORY_ID}
Status: done
📋 Steps completed: 5/5
✅ Create User Story
✅ Generate ATDD Tests
✅ Development
✅ Code Review
✅ Trace Test Coverage所有步骤全部成功执行完成后:
-
更新sprint-status.yaml:
- 找到对应的用户故事条目
- 将状态从 改为
in-progressdone
-
更新用户故事文档(如果存在):
- 将 改为
Status:done - 用✅标记所有任务
- 将
输出最终总结:
🎉 流水线执行完成!
用户故事: {STORY_ID}
状态: done
📋 已完成步骤: 5/5
✅ 创建用户故事
✅ 生成ATDD测试
✅ 开发
✅ 代码评审
✅ 测试覆盖率追踪Configuration
配置
To customize the pipeline workflow, edit:
references/workflow-steps.md
Changes supported:
- Add/remove steps
- Modify step commands
- Reorder steps
- Change descriptions
如需自定义流水线工作流,请编辑:
references/workflow-steps.md
支持的修改:
- 新增/删除步骤
- 修改步骤命令
- 调整步骤顺序
- 修改描述