# Develop Story - Workflow Instructions
```xml
The workflow execution engine is governed by: {project_root}/bmad/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
If {{run_until_complete}} == true, run non-interactively: do not pause between steps unless a HALT condition is reached or explicit user approval is required for unapproved dependencies.
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) or a HALT condition is triggered.
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
task_check
Query sprint-status for ready stories:
action: get_next_story
filter_status: ready-for-dev
HALT
Use {{result_story_key}} to find story file in {{story_dir}}
Read COMPLETE story file from discovered path
Store {{result_story_key}} for later status updates
Parse sections: Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status
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
action: get_story_status
story_key: {{result_story_key}}
action: update_story_status
story_key: {{result_story_key}}
new_status: in-progress
validate: true
Review acceptance criteria and dev notes for the selected task
Plan implementation steps and edge cases; write down a brief plan in Dev Agent Record → Debug Log
Implement the task COMPLETELY including all subtasks, following architecture patterns and coding standards in this repo
Handle error conditions and edge cases appropriately
ASK user for approval before adding
HALT and request guidance
HALT: "Cannot proceed without necessary configuration files"
Do not stop after partial progress; continue iterating tasks until all ACs are satisfied or a HALT condition triggers
Do NOT propose to pause for review, standups, or validation until Step 6 gates are satisfied
Create unit tests for business logic and core functionality introduced/changed by the task
Add integration tests for component interactions where applicable
Include end-to-end tests for critical user flows if applicable
Cover edge cases and error handling scenarios noted in the plan
Determine how to run tests for this repo (infer or use {{run_tests_command}} if provided)
Run all existing tests to ensure no regressions
Run the new tests to verify implementation correctness
Run linting and code quality checks if configured
Validate implementation meets ALL story acceptance criteria; if ACs include quantitative thresholds (e.g., test pass rate), ensure they are met before marking complete
STOP and fix before continuing
STOP and fix before continuing
ONLY mark the task (and subtasks) checkbox with [x] if ALL tests pass and validation succeeds
Update File List section with any new, modified, or deleted files (paths relative to repo root)
Add completion notes to Dev Agent Record if significant changes were made (summarize intent, approach, and any follow-ups)
Append a brief entry to Change Log describing the change
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 story definition-of-done checklist, if the story includes one
Update the story Status to: Ready for Review
action: update_story_status
story_key: {{result_story_key}}
new_status: review
validate: true
Return to step 1 to complete remaining work (Do NOT finish with partial progress)
STOP and resolve before completing
Update it before completing
Optionally run the workflow validation task against the story using {project-root}/bmad/core/tasks/validate-workflow.xml
Prepare a concise summary in Dev Agent Record → Completion Notes
Communicate that the story is Ready for Review
```