# Story Ready Workflow Instructions (SM Agent)
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}
This workflow is run by SM agent AFTER user reviews a drafted story and confirms it's ready for development
Simple workflow: Update story file status to Ready
If {{story_path}} is provided → use it directly; extract story_key from filename or metadata; GOTO mark_ready
MUST read COMPLETE sprint-status.yaml file from start to end to preserve order
Load the FULL file: {{output_folder}}/sprint-status.yaml
Read ALL lines from beginning to end - do not skip any content
Parse the development_status section completely
Find ALL stories (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 "drafted"
Collect up to 10 drafted story keys in order (limit for display purposes)
Count total drafted stories found
HALT
Display available drafted stories:
**Drafted Stories Available ({{drafted_count}} found):**
{{list_of_drafted_story_keys}}
Select the drafted story to mark as Ready (enter story key or number):
Auto-select first story from the list
Resolve selected story_key from user input or auto-selection
Find matching story file in {{story_dir}} using story_key pattern
Read the story file from resolved path
Extract story_id and story_title from the file
Find the "Status:" line (usually at the top)
Update story file: Change Status to "ready-for-dev"
Save the story file
Load the FULL file: {{output_folder}}/sprint-status.yaml
Find development_status key matching {{story_key}}
Verify current status is "drafted" (expected previous state)
Update development_status[{{story_key}}] = "ready-for-dev"
Save file, preserving ALL comments and structure including STATUS DEFINITIONS