Files
alibabacloud-eci/bmad/bmm/workflows/4-implementation/code-review/workflow.yaml
D8D Developer 5b88851852 bmadV6
2025-11-06 06:58:55 +00:00

75 lines
3.0 KiB
YAML

# Review Story Workflow
name: code-review
description: "Perform a Senior Developer code review on a completed story flagged Ready for Review, leveraging story-context, epic tech-spec, repo docs, MCP servers for latest best-practices, and web search as fallback. Appends structured review notes to the story."
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"
user_skill_level: "{config_source}:user_skill_level"
document_output_language: "{config_source}:document_output_language"
date: system-generated
# Workflow components
installed_path: "{project-root}/bmad/bmm/workflows/4-implementation/code-review"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# This is an action workflow (no output template document)
template: false
# Variables (can be provided by caller)
variables:
story_path: "" # Optional: Explicit path to story file. If not provided, finds first story with status "review"
story_dir: "{config_source}:dev_story_location" # Directory containing story files
tech_spec_search_dir: "{project-root}/docs"
tech_spec_glob_template: "tech-spec-epic-{{epic_num}}*.md"
arch_docs_search_dirs: |
- "{project-root}/docs"
- "{output_folder}"
arch_docs_file_names: |
- architecture.md
enable_mcp_doc_search: true # Prefer enabled MCP servers for doc/best-practice lookup
enable_web_fallback: true # Fallback to web search/read-url if MCP not available
# Persistence controls for review action items and notes
persist_action_items: true
# Valid targets: story_tasks, story_review_section, backlog_file, epic_followups
persist_targets: |
- story_review_section
- story_tasks
- backlog_file
- epic_followups
backlog_file: "{project-root}/docs/backlog.md"
update_epic_followups: true
epic_followups_section_title: "Post-Review Follow-ups"
# Recommended inputs
recommended_inputs:
- story: "Path to the story file (auto-discovered if omitted - finds first story with status 'review')"
- tech_spec: "Epic technical specification document (auto-discovered)"
- story_context_file: "Story context file (.context.xml) (auto-discovered)"
# Smart input file references - handles both whole docs and sharded docs
# Priority: Whole document first, then sharded version
# Strategy: SELECTIVE LOAD - only load the specific epic needed for this story review
input_file_patterns:
architecture:
whole: "{output_folder}/*architecture*.md"
sharded: "{output_folder}/*architecture*/index.md"
ux_design:
whole: "{output_folder}/*ux*.md"
sharded: "{output_folder}/*ux*/index.md"
epics:
whole: "{output_folder}/*epic*.md"
sharded_index: "{output_folder}/*epic*/index.md"
sharded_single: "{output_folder}/*epic*/epic-{{epic_num}}.md"
document_project:
sharded: "{output_folder}/docs/index.md"
standalone: true