The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml
You MUST have already loaded and processed: {installed_path}/workflow.yaml
Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}
Generate all documents in {document_output_language}
Only modify the story file in these areas: Tasks/Subtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List,
Change Log, and Status
Execute ALL steps in exact order; do NOT skip steps
Absolutely DO NOT stop because of "milestones", "significant progress", or "session boundaries". Continue in a single execution
until the story is COMPLETE (all ACs satisfied and all tasks/subtasks checked) UNLESS a HALT condition is triggered or the USER gives
other instruction.
Do NOT schedule a "next session" or request review pauses unless a HALT condition applies. Only Step 6 decides completion.
User skill level ({user_skill_level}) affects conversation style ONLY, not code updates.
Use {{story_path}} directly
Read COMPLETE story file
Extract story_key from filename or metadata
anchor with id task_check
MUST read COMPLETE sprint-status.yaml file from start to end to preserve order
Load the FULL file: {{sprint_status}}
Read ALL lines from beginning to end - do not skip any content
Parse the development_status section completely to understand story order
Find the FIRST story (by reading in order from top to bottom) where:
- Key matches pattern: number-number-name (e.g., "1-2-user-auth")
- NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
- Status value equals "ready-for-dev"
Choose option [1], [2], [3], or [4], or specify story file path:
HALT - Run create-story to create next story
HALT - Run validate-create-story to improve existing stories
Provide the story file path to develop:
Store user-provided story path as {{story_path}}
Display detailed sprint status analysis
HALT - User can review sprint status and provide story path
Store user-provided story path as {{story_path}}
Search {story_dir} for stories directly
Find stories with "ready-for-dev" status in files
Look for story files matching pattern: *-*-*.md
Read each candidate story file to check Status section
What would you like to do? Choose option [1], [2], or [3]:
HALT - Run create-story to create next story
HALT - Run validate-create-story to improve existing stories
It's unclear what story you want developed. Please provide the full path to the story file:
Store user-provided story path as {{story_path}}
Continue with provided story file
Use discovered story file and extract story_key
Store the found story_key (e.g., "1-2-user-authentication") for later status updates
Find matching story file in {story_dir} using story_key pattern: {{story_key}}.md
Read COMPLETE story file from discovered path
Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status
Load comprehensive context from story file's Dev Notes section
Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications
Use enhanced story context to inform implementation decisions and approaches
Identify first incomplete task (unchecked [ ]) in Tasks/Subtasks
Completion sequence
HALT: "Cannot develop story without access to story file"
ASK user to clarify or HALT
Load all available context to inform implementation
Load {project_context} for coding standards and project-wide patterns (if exists)
Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status
Load comprehensive context from story file's Dev Notes section
Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications
Use enhanced story context to inform implementation decisions and approaches
Determine if this is a fresh start or continuation after code review
Check if "Senior Developer Review (AI)" section exists in the story file
Check if "Review Follow-ups (AI)" subsection exists under Tasks/Subtasks
Set review_continuation = true
Extract from "Senior Developer Review (AI)" section:
- Review outcome (Approve/Changes Requested/Blocked)
- Review date
- Total action items with checkboxes (count checked vs unchecked)
- Severity breakdown (High/Med/Low counts)
Count unchecked [ ] review follow-up tasks in "Review Follow-ups (AI)" subsection
Store list of unchecked review items as {{pending_review_items}}
Set review_continuation = false
Set {{pending_review_items}} = empty
Load the FULL file: {{sprint_status}}
Read all development_status entries to find {{story_key}}
Get current status value for development_status[{{story_key}}]
Update the story in the sprint status report to = "in-progress"
Store {{current_sprint_status}} for later use
Set {{current_sprint_status}} = "no-sprint-tracking"
FOLLOW THE STORY FILE TASKS/SUBTASKS SEQUENCE EXACTLY AS WRITTEN - NO DEVIATION
Review the current task/subtask from the story file - this is your authoritative implementation guide
Plan implementation following red-green-refactor cycle
Write FAILING tests first for the task/subtask functionality
Confirm tests fail before implementation - this validates test correctness
Implement MINIMAL code to make tests pass
Run tests to confirm they now pass
Handle error conditions and edge cases as specified in task/subtask
Improve code structure while keeping tests green
Ensure code follows architecture patterns and coding standards from Dev Notes
Document technical approach and decisions in Dev Agent Record â Implementation Plan
HALT: "Additional dependencies need user approval"
HALT and request guidance
HALT: "Cannot proceed without necessary configuration files"
NEVER implement anything not mapped to a specific task/subtask in the story file
NEVER proceed to next task until current task/subtask is complete AND tests pass
Execute continuously without pausing until all tasks/subtasks are complete or explicit HALT condition
Do NOT propose to pause for review until Step 9 completion gates are satisfied
Create unit tests for business logic and core functionality introduced/changed by the task
Add integration tests for component interactions specified in story requirements
Include end-to-end tests for critical user flows when story requirements demand them
Cover edge cases and error handling scenarios identified in story Dev Notes
Determine how to run tests for this repo (infer test framework from project structure)
Run all existing tests to ensure no regressions
Run the new tests to verify implementation correctness
Run linting and code quality checks if configured in project
Validate implementation meets ALL story acceptance criteria; enforce quantitative thresholds explicitly
STOP and fix before continuing - identify breaking changes immediately
STOP and fix before continuing - ensure implementation correctness
NEVER mark a task complete unless ALL conditions are met - NO LYING OR CHEATING
Verify ALL tests for this task/subtask ACTUALLY EXIST and PASS 100%
Confirm implementation matches EXACTLY what the task/subtask specifies - no extra features
Validate that ALL acceptance criteria related to this task are satisfied
Run full test suite to ensure NO regressions introduced
Extract review item details (severity, description, related AC/file)
Add to resolution tracking list: {{resolved_review_items}}
Mark task checkbox [x] in "Tasks/Subtasks â Review Follow-ups (AI)" section
Find matching action item in "Senior Developer Review (AI) â Action Items" section by matching description
Mark that action item checkbox [x] as resolved
Add to Dev Agent Record â Completion Notes: "â
Resolved review finding [{{severity}}]: {{description}}"
ONLY THEN mark the task (and subtasks) checkbox with [x]
Update File List section with ALL new, modified, or deleted files (paths relative to repo root)
Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested
DO NOT mark task complete - fix issues first
HALT if unable to fix validation failures
Count total resolved review items in this session
Add Change Log entry: "Addressed code review findings - {{resolved_count}} items resolved (Date: {{date}})"
Save the story file
Determine if more incomplete tasks remain
Next task
Completion
Verify ALL tasks and subtasks are marked [x] (re-scan the story document now)
Run the full regression suite (do not skip)
Confirm File List includes every changed file
Execute enhanced definition-of-done validation
Update the story Status to: "Ready for Review"
Validate definition-of-done checklist with essential requirements:
- All tasks/subtasks marked complete with [x]
- Implementation satisfies every Acceptance Criterion
- Unit tests for core functionality added/updated
- Integration tests for component interactions added when required
- End-to-end tests for critical flows added when story demands them
- All tests pass (no regressions, new tests successful)
- Code quality checks pass (linting, static analysis if configured)
- File List includes every new/modified/deleted file (relative paths)
- Dev Agent Record contains implementation notes
- Change Log includes summary of changes
- Only permitted story sections were modified
Load the FULL file: {sprint_status}
Find development_status key matching {{story_key}}
Verify current status is "in-progress" (expected previous state)
Update development_status[{{story_key}}] = "review"
Save file, preserving ALL comments and structure including STATUS DEFINITIONS
HALT - Complete remaining tasks before marking ready for review
HALT - Fix regression issues before completing
HALT - Update File List with all changed files
HALT - Address DoD failures before completing
Execute the enhanced definition-of-done checklist using the validation framework
Prepare a concise summary in Dev Agent Record â Completion Notes
Communicate to {user_name} that story implementation is complete and ready for review
Summarize key accomplishments: story ID, story key, title, key changes made, tests added, files modified
Provide the story file path and current status (now "Ready for Review")
Based on {user_skill_level}, ask if user needs any explanations about:
- What was implemented and how it works
- Why certain technical decisions were made
- How to test or verify the changes
- Any patterns, libraries, or approaches used
- Anything else they'd like clarified
Provide clear, contextual explanations tailored to {user_skill_level}
Use examples and references to specific code when helpful
Once explanations are complete (or user indicates no questions), suggest logical next steps
Recommended next steps (flexible based on project setup):
- Review the implemented story and test the changes
- Verify all acceptance criteria are met
- Ensure deployment readiness if applicable
- Run `code-review` workflow for peer review
Suggest checking {sprint_status} to see project progress
Remain flexible - allow user to choose their own path or ask for other assistance