[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6WZ78NMWAWTMDFSQEZP1PT9":3,"skill-same:01M6WZ78NMWAWTMDFSQEZP1PT9":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6WZ78NMWAWTMDFSQEZP1PT9","bmad-dev-story",null,"Execute story implementation following a context filled story spec file. Use when the user says \"dev this story [story file]\" or \"implement the next story in the sprint plan\"","huangjia2019\u002Fsdd-in-action","huangjia2019","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F48795276?v=4","01M6RVB2A5TS40SQTN843K74XF","Jia Huang (黄佳)","01M6RVB2DWAKV004CDR8A4QXCY",172,"MIT","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"dev","bmad dev story","bmad","Story","bmad dev","sprint plan","when","sprint","next","implementation","use","spec","execute","user","context","plan","file","implement","2026-11-10 10:12:30",false,"---\nname: bmad-dev-story\ndescription: 'Execute story implementation following a context filled story spec file. Use when the user says \"dev this story [story file]\" or \"implement the next story in the sprint plan\"'\n---\n\n# Dev Story Workflow\n\n**Goal:** Execute story implementation following a context filled story spec file.\n\n**Your Role:** Developer implementing the story.\n- Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}\n- Generate all documents in {document_output_language}\n- Only modify the story file in these areas: Tasks\u002FSubtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status\n- Execute ALL steps in exact order; do NOT skip steps\n- 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\u002Fsubtasks checked) UNLESS a HALT condition is triggered or the USER gives other instruction.\n- Do NOT schedule a \"next session\" or request review pauses unless a HALT condition applies. Only Step 9 decides completion.\n- User skill level ({user_skill_level}) affects conversation style ONLY, not code updates.\n\n## Conventions\n\n- Bare paths (e.g. `steps\u002Fstep-01-init.md`) resolve from the skill root.\n- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).\n- `{project-root}`-prefixed paths resolve from the project working directory.\n- `{skill-name}` resolves to the skill directory's basename.\n\n## On Activation\n\n### Step 1: Resolve the Workflow Block\n\nRun: `python3 {project-root}\u002F_bmad\u002Fscripts\u002Fresolve_customization.py --skill {skill-root} --key workflow`\n\n**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:\n\n1. `{skill-root}\u002Fcustomize.toml` — defaults\n2. `{project-root}\u002F_bmad\u002Fcustom\u002F{skill-name}.toml` — team overrides\n3. `{project-root}\u002F_bmad\u002Fcustom\u002F{skill-name}.user.toml` — personal overrides\n\nAny missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.\n\n### Step 2: Execute Prepend Steps\n\nExecute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.\n\n### Step 3: Load Persistent Facts\n\nTreat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.\n\n### Step 4: Load Config\n\nLoad config from `{project-root}\u002F_bmad\u002Fbmm\u002Fconfig.yaml` and resolve:\n\n- `project_name`, `user_name`\n- `communication_language`, `document_output_language`\n- `user_skill_level`\n- `implementation_artifacts`\n- `date` as system-generated current datetime\n\n### Step 5: Greet the User\n\nGreet `{user_name}`, speaking in `{communication_language}`.\n\n### Step 6: Execute Append Steps\n\nExecute each entry in `{workflow.activation_steps_append}` in order.\n\nActivation is complete. Begin the workflow below.\n\n## Paths\n\n- `story_file` = `` (explicit story path; auto-discovered if empty)\n- `sprint_status` = `{implementation_artifacts}\u002Fsprint-status.yaml`\n\n## Execution\n\n\u003Cworkflow>\n  \u003Ccritical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}\u003C\u002Fcritical>\n  \u003Ccritical>Generate all documents in {document_output_language}\u003C\u002Fcritical>\n  \u003Ccritical>Only modify the story file in these areas: Tasks\u002FSubtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List,\n    Change Log, and Status\u003C\u002Fcritical>\n  \u003Ccritical>Execute ALL steps in exact order; do NOT skip steps\u003C\u002Fcritical>\n  \u003Ccritical>Absolutely DO NOT stop because of \"milestones\", \"significant progress\", or \"session boundaries\". Continue in a single execution\n    until the story is COMPLETE (all ACs satisfied and all tasks\u002Fsubtasks checked) UNLESS a HALT condition is triggered or the USER gives\n    other instruction.\u003C\u002Fcritical>\n  \u003Ccritical>Do NOT schedule a \"next session\" or request review pauses unless a HALT condition applies. Only Step 9 decides completion.\u003C\u002Fcritical>\n  \u003Ccritical>User skill level ({user_skill_level}) affects conversation style ONLY, not code updates.\u003C\u002Fcritical>\n\n  \u003Cstep n=\"1\" goal=\"Find next ready story and load it\" tag=\"sprint-status\">\n    \u003Ccheck if=\"{{story_path}} is provided\">\n      \u003Caction>Use {{story_path}} directly\u003C\u002Faction>\n      \u003Caction>Read COMPLETE story file\u003C\u002Faction>\n      \u003Caction>Extract story_key from filename or metadata\u003C\u002Faction>\n      \u003Cgoto anchor=\"task_check\" \u002F>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Sprint-based story discovery -->\n    \u003Ccheck if=\"{{sprint_status}} file exists\">\n      \u003Ccritical>MUST read COMPLETE sprint-status.yaml file from start to end to preserve order\u003C\u002Fcritical>\n      \u003Caction>Load the FULL file: {{sprint_status}}\u003C\u002Faction>\n      \u003Caction>Read ALL lines from beginning to end - do not skip any content\u003C\u002Faction>\n      \u003Caction>Parse the development_status section completely to understand story order\u003C\u002Faction>\n\n      \u003Caction>Find the FIRST story (by reading in order from top to bottom) where:\n        - Key matches pattern: number-number-name (e.g., \"1-2-user-auth\")\n        - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)\n        - Status value equals \"ready-for-dev\"\n      \u003C\u002Faction>\n\n      \u003Ccheck if=\"no ready-for-dev or in-progress story found\">\n        \u003Coutput>? No ready-for-dev stories found in sprint-status.yaml\n\n          **Current Sprint Status:** {{sprint_status_summary}}\n\n          **What would you like to do?**\n          1. Run `create-story` to create next story from epics with comprehensive context\n          2. Run `*validate-create-story` to improve existing stories before development (recommended quality check)\n          3. Specify a particular story file to develop (provide full path)\n          4. Check {{sprint_status}} file to see current sprint status\n\n          ? **Tip:** Stories in `ready-for-dev` may not have been validated. Consider running `validate-create-story` first for a quality\n          check.\n        \u003C\u002Foutput>\n        \u003Cask>Choose option [1], [2], [3], or [4], or specify story file path:\u003C\u002Fask>\n\n        \u003Ccheck if=\"user chooses '1'\">\n          \u003Caction>HALT - Run create-story to create next story\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '2'\">\n          \u003Caction>HALT - Run validate-create-story to improve existing stories\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '3'\">\n          \u003Cask>Provide the story file path to develop:\u003C\u002Fask>\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Cgoto anchor=\"task_check\" \u002F>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '4'\">\n          \u003Coutput>Loading {{sprint_status}} for detailed status review...\u003C\u002Foutput>\n          \u003Caction>Display detailed sprint status analysis\u003C\u002Faction>\n          \u003Caction>HALT - User can review sprint status and provide story path\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user provides story file path\">\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Cgoto anchor=\"task_check\" \u002F>\n        \u003C\u002Fcheck>\n      \u003C\u002Fcheck>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Non-sprint story discovery -->\n    \u003Ccheck if=\"{{sprint_status}} file does NOT exist\">\n      \u003Caction>Search {implementation_artifacts} for stories directly\u003C\u002Faction>\n      \u003Caction>Find stories with \"ready-for-dev\" status in files\u003C\u002Faction>\n      \u003Caction>Look for story files matching pattern: *-*-*.md\u003C\u002Faction>\n      \u003Caction>Read each candidate story file to check Status section\u003C\u002Faction>\n\n      \u003Ccheck if=\"no ready-for-dev stories found in story files\">\n        \u003Coutput>? No ready-for-dev stories found\n\n          **Available Options:**\n          1. Run `create-story` to create next story from epics with comprehensive context\n          2. Run `*validate-create-story` to improve existing stories\n          3. Specify which story to develop\n        \u003C\u002Foutput>\n        \u003Cask>What would you like to do? Choose option [1], [2], or [3]:\u003C\u002Fask>\n\n        \u003Ccheck if=\"user chooses '1'\">\n          \u003Caction>HALT - Run create-story to create next story\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '2'\">\n          \u003Caction>HALT - Run validate-create-story to improve existing stories\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '3'\">\n          \u003Cask>It's unclear what story you want developed. Please provide the full path to the story file:\u003C\u002Fask>\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Caction>Continue with provided story file\u003C\u002Faction>\n        \u003C\u002Fcheck>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"ready-for-dev story found in files\">\n        \u003Caction>Use discovered story file and extract story_key\u003C\u002Faction>\n      \u003C\u002Fcheck>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Store the found story_key (e.g., \"1-2-user-authentication\") for later status updates\u003C\u002Faction>\n    \u003Caction>Find matching story file in {implementation_artifacts} using story_key pattern: {{story_key}}.md\u003C\u002Faction>\n    \u003Caction>Read COMPLETE story file from discovered path\u003C\u002Faction>\n\n    \u003Canchor id=\"task_check\" \u002F>\n\n    \u003Caction>Parse sections: Story, Acceptance Criteria, Tasks\u002FSubtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status\u003C\u002Faction>\n\n    \u003Caction>Load comprehensive context from story file's Dev Notes section\u003C\u002Faction>\n    \u003Caction>Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications\u003C\u002Faction>\n    \u003Caction>Use enhanced story context to inform implementation decisions and approaches\u003C\u002Faction>\n\n    \u003Caction>Identify first incomplete task (unchecked [ ]) in Tasks\u002FSubtasks\u003C\u002Faction>\n\n    \u003Caction if=\"no incomplete tasks\">\n      \u003Cgoto step=\"9\">Completion sequence\u003C\u002Fgoto>\n    \u003C\u002Faction>\n    \u003Caction if=\"story file inaccessible\">HALT: \"Cannot develop story without access to story file\"\u003C\u002Faction>\n    \u003Caction if=\"incomplete task or subtask requirements ambiguous\">ASK user to clarify or HALT\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"2\" goal=\"Load project context and story information\">\n    \u003Ccritical>Load all available context to inform implementation\u003C\u002Fcritical>\n\n    \u003Caction>Load {project_context} for coding standards and project-wide patterns (if exists)\u003C\u002Faction>\n    \u003Caction>Parse sections: Story, Acceptance Criteria, Tasks\u002FSubtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status\u003C\u002Faction>\n    \u003Caction>Load comprehensive context from story file's Dev Notes section\u003C\u002Faction>\n    \u003Caction>Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications\u003C\u002Faction>\n    \u003Caction>Use enhanced story context to inform implementation decisions and approaches\u003C\u002Faction>\n    \u003Coutput>✅ **Context Loaded**\n      Story and project context available for implementation\n    \u003C\u002Foutput>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"3\" goal=\"Detect review continuation and extract review context\">\n    \u003Ccritical>Determine if this is a fresh start or continuation after code review\u003C\u002Fcritical>\n\n    \u003Caction>Check if \"Senior Developer Review (AI)\" section exists in the story file\u003C\u002Faction>\n    \u003Caction>Check if \"Review Follow-ups (AI)\" subsection exists under Tasks\u002FSubtasks\u003C\u002Faction>\n\n    \u003Ccheck if=\"Senior Developer Review section exists\">\n      \u003Caction>Set review_continuation = true\u003C\u002Faction>\n      \u003Caction>Extract from \"Senior Developer Review (AI)\" section:\n        - Review outcome (Approve\u002FChanges Requested\u002FBlocked)\n        - Review date\n        - Total action items with checkboxes (count checked vs unchecked)\n        - Severity breakdown (High\u002FMed\u002FLow counts)\n      \u003C\u002Faction>\n      \u003Caction>Count unchecked [ ] review follow-up tasks in \"Review Follow-ups (AI)\" subsection\u003C\u002Faction>\n      \u003Caction>Store list of unchecked review items as {{pending_review_items}}\u003C\u002Faction>\n\n      \u003Coutput>⏯️ **Resuming Story After Code Review** ({{review_date}})\n\n        **Review Outcome:** {{review_outcome}}\n        **Action Items:** {{unchecked_review_count}} remaining to address\n        **Priorities:** {{high_count}} High, {{med_count}} Medium, {{low_count}} Low\n\n        **Strategy:** Will prioritize review follow-up tasks (marked [AI-Review]) before continuing with regular tasks.\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"Senior Developer Review section does NOT exist\">\n      \u003Caction>Set review_continuation = false\u003C\u002Faction>\n      \u003Caction>Set {{pending_review_items}} = empty\u003C\u002Faction>\n\n      \u003Coutput>? **Starting Fresh Implementation**\n\n        Story: {{story_key}}\n        Story Status: {{current_status}}\n        First incomplete task: {{first_task_description}}\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"4\" goal=\"Mark story in-progress\" tag=\"sprint-status\">\n    \u003Ccheck if=\"{{sprint_status}} file exists\">\n      \u003Caction>Load the FULL file: {{sprint_status}}\u003C\u002Faction>\n      \u003Caction>Read all development_status entries to find {{story_key}}\u003C\u002Faction>\n      \u003Caction>Get current status value for development_status[{{story_key}}]\u003C\u002Faction>\n\n      \u003Ccheck if=\"current status == 'ready-for-dev' OR review_continuation == true\">\n        \u003Caction>Update the story in the sprint status report to = \"in-progress\"\u003C\u002Faction>\n        \u003Caction>Update last_updated field to current date\u003C\u002Faction>\n        \u003Coutput>? Starting work on story {{story_key}}\n          Status updated: ready-for-dev → in-progress\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"current status == 'in-progress'\">\n        \u003Coutput>⏯️ Resuming work on story {{story_key}}\n          Story is already marked in-progress\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"current status is neither ready-for-dev nor in-progress\">\n        \u003Coutput>⚠️ Unexpected story status: {{current_status}}\n          Expected ready-for-dev or in-progress. Continuing anyway...\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Caction>Store {{current_sprint_status}} for later use\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"{{sprint_status}} file does NOT exist\">\n      \u003Coutput>ℹ️ No sprint status file exists - story progress will be tracked in story file only\u003C\u002Foutput>\n      \u003Caction>Set {{current_sprint_status}} = \"no-sprint-tracking\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"5\" goal=\"Implement task following red-green-refactor cycle\">\n    \u003Ccritical>FOLLOW THE STORY FILE TASKS\u002FSUBTASKS SEQUENCE EXACTLY AS WRITTEN - NO DEVIATION\u003C\u002Fcritical>\n\n    \u003Caction>Review the current task\u002Fsubtask from the story file - this is your authoritative implementation guide\u003C\u002Faction>\n    \u003Caction>Plan implementation following red-green-refactor cycle\u003C\u002Faction>\n\n    \u003C!-- RED PHASE -->\n    \u003Caction>Write FAILING tests first for the task\u002Fsubtask functionality\u003C\u002Faction>\n    \u003Caction>Confirm tests fail before implementation - this validates test correctness\u003C\u002Faction>\n\n    \u003C!-- GREEN PHASE -->\n    \u003Caction>Implement MINIMAL code to make tests pass\u003C\u002Faction>\n    \u003Caction>Run tests to confirm they now pass\u003C\u002Faction>\n    \u003Caction>Handle error conditions and edge cases as specified in task\u002Fsubtask\u003C\u002Faction>\n\n    \u003C!-- REFACTOR PHASE -->\n    \u003Caction>Improve code structure while keeping tests green\u003C\u002Faction>\n    \u003Caction>Ensure code follows architecture patterns and coding standards from Dev Notes\u003C\u002Faction>\n\n    \u003Caction>Document technical approach and decisions in Dev Agent Record → Implementation Plan\u003C\u002Faction>\n\n    \u003Caction if=\"new dependencies required beyond story specifications\">HALT: \"Additional dependencies need user approval\"\u003C\u002Faction>\n    \u003Caction if=\"3 consecutive implementation failures occur\">HALT and request guidance\u003C\u002Faction>\n    \u003Caction if=\"required configuration is missing\">HALT: \"Cannot proceed without necessary configuration files\"\u003C\u002Faction>\n\n    \u003Ccritical>NEVER implement anything not mapped to a specific task\u002Fsubtask in the story file\u003C\u002Fcritical>\n    \u003Ccritical>NEVER proceed to next task until current task\u002Fsubtask is complete AND tests pass\u003C\u002Fcritical>\n    \u003Ccritical>Execute continuously without pausing until all tasks\u002Fsubtasks are complete or explicit HALT condition\u003C\u002Fcritical>\n    \u003Ccritical>Do NOT propose to pause for review until Step 9 completion gates are satisfied\u003C\u002Fcritical>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"6\" goal=\"Author comprehensive tests\">\n    \u003Caction>Create unit tests for business logic and core functionality introduced\u002Fchanged by the task\u003C\u002Faction>\n    \u003Caction>Add integration tests for component interactions specified in story requirements\u003C\u002Faction>\n    \u003Caction>Include end-to-end tests for critical user flows when story requirements demand them\u003C\u002Faction>\n    \u003Caction>Cover edge cases and error handling scenarios identified in story Dev Notes\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"7\" goal=\"Run validations and tests\">\n    \u003Caction>Determine how to run tests for this repo (infer test framework from project structure)\u003C\u002Faction>\n    \u003Caction>Run all existing tests to ensure no regressions\u003C\u002Faction>\n    \u003Caction>Run the new tests to verify implementation correctness\u003C\u002Faction>\n    \u003Caction>Run linting and code quality checks if configured in project\u003C\u002Faction>\n    \u003Caction>Validate implementation meets ALL story acceptance criteria; enforce quantitative thresholds explicitly\u003C\u002Faction>\n    \u003Caction if=\"regression tests fail\">STOP and fix before continuing - identify breaking changes immediately\u003C\u002Faction>\n    \u003Caction if=\"new tests fail\">STOP and fix before continuing - ensure implementation correctness\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"8\" goal=\"Validate and mark task complete ONLY when fully done\">\n    \u003Ccritical>NEVER mark a task complete unless ALL conditions are met - NO LYING OR CHEATING\u003C\u002Fcritical>\n\n    \u003C!-- VALIDATION GATES -->\n    \u003Caction>Verify ALL tests for this task\u002Fsubtask ACTUALLY EXIST and PASS 100%\u003C\u002Faction>\n    \u003Caction>Confirm implementation matches EXACTLY what the task\u002Fsubtask specifies - no extra features\u003C\u002Faction>\n    \u003Caction>Validate that ALL acceptance criteria related to this task are satisfied\u003C\u002Faction>\n    \u003Caction>Run full test suite to ensure NO regressions introduced\u003C\u002Faction>\n\n    \u003C!-- REVIEW FOLLOW-UP HANDLING -->\n    \u003Ccheck if=\"task is review follow-up (has [AI-Review] prefix)\">\n      \u003Caction>Extract review item details (severity, description, related AC\u002Ffile)\u003C\u002Faction>\n      \u003Caction>Add to resolution tracking list: {{resolved_review_items}}\u003C\u002Faction>\n\n      \u003C!-- Mark task in Review Follow-ups section -->\n      \u003Caction>Mark task checkbox [x] in \"Tasks\u002FSubtasks → Review Follow-ups (AI)\" section\u003C\u002Faction>\n\n      \u003C!-- CRITICAL: Also mark corresponding action item in review section -->\n      \u003Caction>Find matching action item in \"Senior Developer Review (AI) → Action Items\" section by matching description\u003C\u002Faction>\n      \u003Caction>Mark that action item checkbox [x] as resolved\u003C\u002Faction>\n\n      \u003Caction>Add to Dev Agent Record → Completion Notes: \"✅ Resolved review finding [{{severity}}]: {{description}}\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003C!-- ONLY MARK COMPLETE IF ALL VALIDATION PASS -->\n    \u003Ccheck if=\"ALL validation gates pass AND tests ACTUALLY exist and pass\">\n      \u003Caction>ONLY THEN mark the task (and subtasks) checkbox with [x]\u003C\u002Faction>\n      \u003Caction>Update File List section with ALL new, modified, or deleted files (paths relative to repo root)\u003C\u002Faction>\n      \u003Caction>Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"ANY validation fails\">\n      \u003Caction>DO NOT mark task complete - fix issues first\u003C\u002Faction>\n      \u003Caction>HALT if unable to fix validation failures\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"review_continuation == true and {{resolved_review_items}} is not empty\">\n      \u003Caction>Count total resolved review items in this session\u003C\u002Faction>\n      \u003Caction>Add Change Log entry: \"Addressed code review findings - {{resolved_count}} items resolved (Date: {{date}})\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Save the story file\u003C\u002Faction>\n    \u003Caction>Determine if more incomplete tasks remain\u003C\u002Faction>\n    \u003Caction if=\"more tasks remain\">\n      \u003Cgoto step=\"5\">Next task\u003C\u002Fgoto>\n    \u003C\u002Faction>\n    \u003Caction if=\"no tasks remain\">\n      \u003Cgoto step=\"9\">Completion\u003C\u002Fgoto>\n    \u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"9\" goal=\"Story completion and mark for review\" tag=\"sprint-status\">\n    \u003Caction>Verify ALL tasks and subtasks are marked [x] (re-scan the story document now)\u003C\u002Faction>\n    \u003Caction>Run the full regression suite (do not skip)\u003C\u002Faction>\n    \u003Caction>Confirm File List includes every changed file\u003C\u002Faction>\n    \u003Caction>Execute enhanced definition-of-done validation\u003C\u002Faction>\n    \u003Caction>Update the story Status to: \"review\"\u003C\u002Faction>\n\n    \u003C!-- Enhanced Definition of Done Validation -->\n    \u003Caction>Validate definition-of-done checklist with essential requirements:\n      - All tasks\u002Fsubtasks marked complete with [x]\n      - Implementation satisfies every Acceptance Criterion\n      - Unit tests for core functionality added\u002Fupdated\n      - Integration tests for component interactions added when required\n      - End-to-end tests for critical flows added when story demands them\n      - All tests pass (no regressions, new tests successful)\n      - Code quality checks pass (linting, static analysis if configured)\n      - File List includes every new\u002Fmodified\u002Fdeleted file (relative paths)\n      - Dev Agent Record contains implementation notes\n      - Change Log includes summary of changes\n      - Only permitted story sections were modified\n    \u003C\u002Faction>\n\n    \u003C!-- Mark story ready for review - sprint status conditional -->\n    \u003Ccheck if=\"{sprint_status} file exists AND {{current_sprint_status}} != 'no-sprint-tracking'\">\n      \u003Caction>Load the FULL file: {sprint_status}\u003C\u002Faction>\n      \u003Caction>Find development_status key matching {{story_key}}\u003C\u002Faction>\n      \u003Caction>Verify current status is \"in-progress\" (expected previous state)\u003C\u002Faction>\n      \u003Caction>Update development_status[{{story_key}}] = \"review\"\u003C\u002Faction>\n      \u003Caction>Update last_updated field to current date\u003C\u002Faction>\n      \u003Caction>Save file, preserving ALL comments and structure including STATUS DEFINITIONS\u003C\u002Faction>\n      \u003Coutput>✅ Story status updated to \"review\" in sprint-status.yaml\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"{sprint_status} file does NOT exist OR {{current_sprint_status}} == 'no-sprint-tracking'\">\n      \u003Coutput>ℹ️ Story status updated to \"review\" in story file (no sprint tracking configured)\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"story key not found in sprint status\">\n      \u003Coutput>⚠️ Story file updated, but sprint-status update failed: {{story_key}} not found\n\n        Story status is set to \"review\" in file, but sprint-status.yaml may be out of sync.\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Final validation gates -->\n    \u003Caction if=\"any task is incomplete\">HALT - Complete remaining tasks before marking ready for review\u003C\u002Faction>\n    \u003Caction if=\"regression failures exist\">HALT - Fix regression issues before completing\u003C\u002Faction>\n    \u003Caction if=\"File List is incomplete\">HALT - Update File List with all changed files\u003C\u002Faction>\n    \u003Caction if=\"definition-of-done validation fails\">HALT - Address DoD failures before completing\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"10\" goal=\"Completion communication and user support\">\n    \u003Caction>Execute the enhanced definition-of-done checklist using the validation framework\u003C\u002Faction>\n    \u003Caction>Prepare a concise summary in Dev Agent Record → Completion Notes\u003C\u002Faction>\n\n    \u003Caction>Communicate to {user_name} that story implementation is complete and ready for review\u003C\u002Faction>\n    \u003Caction>Summarize key accomplishments: story ID, story key, title, key changes made, tests added, files modified\u003C\u002Faction>\n    \u003Caction>Provide the story file path and current status (now \"review\")\u003C\u002Faction>\n\n    \u003Caction>Based on {user_skill_level}, ask if user needs any explanations about:\n      - What was implemented and how it works\n      - Why certain technical decisions were made\n      - How to test or verify the changes\n      - Any patterns, libraries, or approaches used\n      - Anything else they'd like clarified\n    \u003C\u002Faction>\n\n    \u003Ccheck if=\"user asks for explanations\">\n      \u003Caction>Provide clear, contextual explanations tailored to {user_skill_level}\u003C\u002Faction>\n      \u003Caction>Use examples and references to specific code when helpful\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Once explanations are complete (or user indicates no questions), suggest logical next steps\u003C\u002Faction>\n    \u003Caction>Recommended next steps (flexible based on project setup):\n      - Review the implemented story and test the changes\n      - Verify all acceptance criteria are met\n      - Ensure deployment readiness if applicable\n      - Run `code-review` workflow for peer review\n      - Optional: If Test Architect module installed, run `\u002Fbmad:tea:automate` to expand guardrail tests\n    \u003C\u002Faction>\n\n    \u003Coutput>? **Tip:** For best results, run `code-review` using a **different** LLM than the one that implemented this story.\u003C\u002Foutput>\n    \u003Ccheck if=\"{sprint_status} file exists\">\n      \u003Caction>Suggest checking {sprint_status} to see project progress\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Caction>Remain flexible - allow user to choose their own path or ask for other assistance\u003C\u002Faction>\n  \u003Caction>Run: `python3 {project-root}\u002F_bmad\u002Fscripts\u002Fresolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n\u003C\u002Fworkflow>\n","# Dev Story Workflow\n\n**Goal:** Execute story implementation following a context filled story spec file.\n\n**Your Role:** Developer implementing the story.\n- Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}\n- Generate all documents in {document_output_language}\n- Only modify the story file in these areas: Tasks\u002FSubtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List, Change Log, and Status\n- Execute ALL steps in exact order; do NOT skip steps\n- 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\u002Fsubtasks checked) UNLESS a HALT condition is triggered or the USER gives other instruction.\n- Do NOT schedule a \"next session\" or request review pauses unless a HALT condition applies. Only Step 9 decides completion.\n- User skill level ({user_skill_level}) affects conversation style ONLY, not code updates.\n\n## Conventions\n\n- Bare paths (e.g. `steps\u002Fstep-01-init.md`) resolve from the skill root.\n- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).\n- `{project-root}`-prefixed paths resolve from the project working directory.\n- `{skill-name}` resolves to the skill directory's basename.\n\n## On Activation\n\n### Step 1: Resolve the Workflow Block\n\nRun: `python3 {project-root}\u002F_bmad\u002Fscripts\u002Fresolve_customization.py --skill {skill-root} --key workflow`\n\n**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:\n\n1. `{skill-root}\u002Fcustomize.toml` — defaults\n2. `{project-root}\u002F_bmad\u002Fcustom\u002F{skill-name}.toml` — team overrides\n3. `{project-root}\u002F_bmad\u002Fcustom\u002F{skill-name}.user.toml` — personal overrides\n\nAny missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.\n\n### Step 2: Execute Prepend Steps\n\nExecute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.\n\n### Step 3: Load Persistent Facts\n\nTreat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.\n\n### Step 4: Load Config\n\nLoad config from `{project-root}\u002F_bmad\u002Fbmm\u002Fconfig.yaml` and resolve:\n\n- `project_name`, `user_name`\n- `communication_language`, `document_output_language`\n- `user_skill_level`\n- `implementation_artifacts`\n- `date` as system-generated current datetime\n\n### Step 5: Greet the User\n\nGreet `{user_name}`, speaking in `{communication_language}`.\n\n### Step 6: Execute Append Steps\n\nExecute each entry in `{workflow.activation_steps_append}` in order.\n\nActivation is complete. Begin the workflow below.\n\n## Paths\n\n- `story_file` = `` (explicit story path; auto-discovered if empty)\n- `sprint_status` = `{implementation_artifacts}\u002Fsprint-status.yaml`\n\n## Execution\n\n\u003Cworkflow>\n  \u003Ccritical>Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level}\u003C\u002Fcritical>\n  \u003Ccritical>Generate all documents in {document_output_language}\u003C\u002Fcritical>\n  \u003Ccritical>Only modify the story file in these areas: Tasks\u002FSubtasks checkboxes, Dev Agent Record (Debug Log, Completion Notes), File List,\n    Change Log, and Status\u003C\u002Fcritical>\n  \u003Ccritical>Execute ALL steps in exact order; do NOT skip steps\u003C\u002Fcritical>\n  \u003Ccritical>Absolutely DO NOT stop because of \"milestones\", \"significant progress\", or \"session boundaries\". Continue in a single execution\n    until the story is COMPLETE (all ACs satisfied and all tasks\u002Fsubtasks checked) UNLESS a HALT condition is triggered or the USER gives\n    other instruction.\u003C\u002Fcritical>\n  \u003Ccritical>Do NOT schedule a \"next session\" or request review pauses unless a HALT condition applies. Only Step 9 decides completion.\u003C\u002Fcritical>\n  \u003Ccritical>User skill level ({user_skill_level}) affects conversation style ONLY, not code updates.\u003C\u002Fcritical>\n\n  \u003Cstep n=\"1\" goal=\"Find next ready story and load it\" tag=\"sprint-status\">\n    \u003Ccheck if=\"{{story_path}} is provided\">\n      \u003Caction>Use {{story_path}} directly\u003C\u002Faction>\n      \u003Caction>Read COMPLETE story file\u003C\u002Faction>\n      \u003Caction>Extract story_key from filename or metadata\u003C\u002Faction>\n      \u003Cgoto anchor=\"task_check\" \u002F>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Sprint-based story discovery -->\n    \u003Ccheck if=\"{{sprint_status}} file exists\">\n      \u003Ccritical>MUST read COMPLETE sprint-status.yaml file from start to end to preserve order\u003C\u002Fcritical>\n      \u003Caction>Load the FULL file: {{sprint_status}}\u003C\u002Faction>\n      \u003Caction>Read ALL lines from beginning to end - do not skip any content\u003C\u002Faction>\n      \u003Caction>Parse the development_status section completely to understand story order\u003C\u002Faction>\n\n      \u003Caction>Find the FIRST story (by reading in order from top to bottom) where:\n        - Key matches pattern: number-number-name (e.g., \"1-2-user-auth\")\n        - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)\n        - Status value equals \"ready-for-dev\"\n      \u003C\u002Faction>\n\n      \u003Ccheck if=\"no ready-for-dev or in-progress story found\">\n        \u003Coutput>? No ready-for-dev stories found in sprint-status.yaml\n\n          **Current Sprint Status:** {{sprint_status_summary}}\n\n          **What would you like to do?**\n          1. Run `create-story` to create next story from epics with comprehensive context\n          2. Run `*validate-create-story` to improve existing stories before development (recommended quality check)\n          3. Specify a particular story file to develop (provide full path)\n          4. Check {{sprint_status}} file to see current sprint status\n\n          ? **Tip:** Stories in `ready-for-dev` may not have been validated. Consider running `validate-create-story` first for a quality\n          check.\n        \u003C\u002Foutput>\n        \u003Cask>Choose option [1], [2], [3], or [4], or specify story file path:\u003C\u002Fask>\n\n        \u003Ccheck if=\"user chooses '1'\">\n          \u003Caction>HALT - Run create-story to create next story\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '2'\">\n          \u003Caction>HALT - Run validate-create-story to improve existing stories\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '3'\">\n          \u003Cask>Provide the story file path to develop:\u003C\u002Fask>\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Cgoto anchor=\"task_check\" \u002F>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '4'\">\n          \u003Coutput>Loading {{sprint_status}} for detailed status review...\u003C\u002Foutput>\n          \u003Caction>Display detailed sprint status analysis\u003C\u002Faction>\n          \u003Caction>HALT - User can review sprint status and provide story path\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user provides story file path\">\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Cgoto anchor=\"task_check\" \u002F>\n        \u003C\u002Fcheck>\n      \u003C\u002Fcheck>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Non-sprint story discovery -->\n    \u003Ccheck if=\"{{sprint_status}} file does NOT exist\">\n      \u003Caction>Search {implementation_artifacts} for stories directly\u003C\u002Faction>\n      \u003Caction>Find stories with \"ready-for-dev\" status in files\u003C\u002Faction>\n      \u003Caction>Look for story files matching pattern: *-*-*.md\u003C\u002Faction>\n      \u003Caction>Read each candidate story file to check Status section\u003C\u002Faction>\n\n      \u003Ccheck if=\"no ready-for-dev stories found in story files\">\n        \u003Coutput>? No ready-for-dev stories found\n\n          **Available Options:**\n          1. Run `create-story` to create next story from epics with comprehensive context\n          2. Run `*validate-create-story` to improve existing stories\n          3. Specify which story to develop\n        \u003C\u002Foutput>\n        \u003Cask>What would you like to do? Choose option [1], [2], or [3]:\u003C\u002Fask>\n\n        \u003Ccheck if=\"user chooses '1'\">\n          \u003Caction>HALT - Run create-story to create next story\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '2'\">\n          \u003Caction>HALT - Run validate-create-story to improve existing stories\u003C\u002Faction>\n        \u003C\u002Fcheck>\n\n        \u003Ccheck if=\"user chooses '3'\">\n          \u003Cask>It's unclear what story you want developed. Please provide the full path to the story file:\u003C\u002Fask>\n          \u003Caction>Store user-provided story path as {{story_path}}\u003C\u002Faction>\n          \u003Caction>Continue with provided story file\u003C\u002Faction>\n        \u003C\u002Fcheck>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"ready-for-dev story found in files\">\n        \u003Caction>Use discovered story file and extract story_key\u003C\u002Faction>\n      \u003C\u002Fcheck>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Store the found story_key (e.g., \"1-2-user-authentication\") for later status updates\u003C\u002Faction>\n    \u003Caction>Find matching story file in {implementation_artifacts} using story_key pattern: {{story_key}}.md\u003C\u002Faction>\n    \u003Caction>Read COMPLETE story file from discovered path\u003C\u002Faction>\n\n    \u003Canchor id=\"task_check\" \u002F>\n\n    \u003Caction>Parse sections: Story, Acceptance Criteria, Tasks\u002FSubtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status\u003C\u002Faction>\n\n    \u003Caction>Load comprehensive context from story file's Dev Notes section\u003C\u002Faction>\n    \u003Caction>Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications\u003C\u002Faction>\n    \u003Caction>Use enhanced story context to inform implementation decisions and approaches\u003C\u002Faction>\n\n    \u003Caction>Identify first incomplete task (unchecked [ ]) in Tasks\u002FSubtasks\u003C\u002Faction>\n\n    \u003Caction if=\"no incomplete tasks\">\n      \u003Cgoto step=\"9\">Completion sequence\u003C\u002Fgoto>\n    \u003C\u002Faction>\n    \u003Caction if=\"story file inaccessible\">HALT: \"Cannot develop story without access to story file\"\u003C\u002Faction>\n    \u003Caction if=\"incomplete task or subtask requirements ambiguous\">ASK user to clarify or HALT\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"2\" goal=\"Load project context and story information\">\n    \u003Ccritical>Load all available context to inform implementation\u003C\u002Fcritical>\n\n    \u003Caction>Load {project_context} for coding standards and project-wide patterns (if exists)\u003C\u002Faction>\n    \u003Caction>Parse sections: Story, Acceptance Criteria, Tasks\u002FSubtasks, Dev Notes, Dev Agent Record, File List, Change Log, Status\u003C\u002Faction>\n    \u003Caction>Load comprehensive context from story file's Dev Notes section\u003C\u002Faction>\n    \u003Caction>Extract developer guidance from Dev Notes: architecture requirements, previous learnings, technical specifications\u003C\u002Faction>\n    \u003Caction>Use enhanced story context to inform implementation decisions and approaches\u003C\u002Faction>\n    \u003Coutput>✅ **Context Loaded**\n      Story and project context available for implementation\n    \u003C\u002Foutput>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"3\" goal=\"Detect review continuation and extract review context\">\n    \u003Ccritical>Determine if this is a fresh start or continuation after code review\u003C\u002Fcritical>\n\n    \u003Caction>Check if \"Senior Developer Review (AI)\" section exists in the story file\u003C\u002Faction>\n    \u003Caction>Check if \"Review Follow-ups (AI)\" subsection exists under Tasks\u002FSubtasks\u003C\u002Faction>\n\n    \u003Ccheck if=\"Senior Developer Review section exists\">\n      \u003Caction>Set review_continuation = true\u003C\u002Faction>\n      \u003Caction>Extract from \"Senior Developer Review (AI)\" section:\n        - Review outcome (Approve\u002FChanges Requested\u002FBlocked)\n        - Review date\n        - Total action items with checkboxes (count checked vs unchecked)\n        - Severity breakdown (High\u002FMed\u002FLow counts)\n      \u003C\u002Faction>\n      \u003Caction>Count unchecked [ ] review follow-up tasks in \"Review Follow-ups (AI)\" subsection\u003C\u002Faction>\n      \u003Caction>Store list of unchecked review items as {{pending_review_items}}\u003C\u002Faction>\n\n      \u003Coutput>⏯️ **Resuming Story After Code Review** ({{review_date}})\n\n        **Review Outcome:** {{review_outcome}}\n        **Action Items:** {{unchecked_review_count}} remaining to address\n        **Priorities:** {{high_count}} High, {{med_count}} Medium, {{low_count}} Low\n\n        **Strategy:** Will prioritize review follow-up tasks (marked [AI-Review]) before continuing with regular tasks.\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"Senior Developer Review section does NOT exist\">\n      \u003Caction>Set review_continuation = false\u003C\u002Faction>\n      \u003Caction>Set {{pending_review_items}} = empty\u003C\u002Faction>\n\n      \u003Coutput>? **Starting Fresh Implementation**\n\n        Story: {{story_key}}\n        Story Status: {{current_status}}\n        First incomplete task: {{first_task_description}}\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"4\" goal=\"Mark story in-progress\" tag=\"sprint-status\">\n    \u003Ccheck if=\"{{sprint_status}} file exists\">\n      \u003Caction>Load the FULL file: {{sprint_status}}\u003C\u002Faction>\n      \u003Caction>Read all development_status entries to find {{story_key}}\u003C\u002Faction>\n      \u003Caction>Get current status value for development_status[{{story_key}}]\u003C\u002Faction>\n\n      \u003Ccheck if=\"current status == 'ready-for-dev' OR review_continuation == true\">\n        \u003Caction>Update the story in the sprint status report to = \"in-progress\"\u003C\u002Faction>\n        \u003Caction>Update last_updated field to current date\u003C\u002Faction>\n        \u003Coutput>? Starting work on story {{story_key}}\n          Status updated: ready-for-dev → in-progress\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"current status == 'in-progress'\">\n        \u003Coutput>⏯️ Resuming work on story {{story_key}}\n          Story is already marked in-progress\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Ccheck if=\"current status is neither ready-for-dev nor in-progress\">\n        \u003Coutput>⚠️ Unexpected story status: {{current_status}}\n          Expected ready-for-dev or in-progress. Continuing anyway...\n        \u003C\u002Foutput>\n      \u003C\u002Fcheck>\n\n      \u003Caction>Store {{current_sprint_status}} for later use\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"{{sprint_status}} file does NOT exist\">\n      \u003Coutput>ℹ️ No sprint status file exists - story progress will be tracked in story file only\u003C\u002Foutput>\n      \u003Caction>Set {{current_sprint_status}} = \"no-sprint-tracking\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"5\" goal=\"Implement task following red-green-refactor cycle\">\n    \u003Ccritical>FOLLOW THE STORY FILE TASKS\u002FSUBTASKS SEQUENCE EXACTLY AS WRITTEN - NO DEVIATION\u003C\u002Fcritical>\n\n    \u003Caction>Review the current task\u002Fsubtask from the story file - this is your authoritative implementation guide\u003C\u002Faction>\n    \u003Caction>Plan implementation following red-green-refactor cycle\u003C\u002Faction>\n\n    \u003C!-- RED PHASE -->\n    \u003Caction>Write FAILING tests first for the task\u002Fsubtask functionality\u003C\u002Faction>\n    \u003Caction>Confirm tests fail before implementation - this validates test correctness\u003C\u002Faction>\n\n    \u003C!-- GREEN PHASE -->\n    \u003Caction>Implement MINIMAL code to make tests pass\u003C\u002Faction>\n    \u003Caction>Run tests to confirm they now pass\u003C\u002Faction>\n    \u003Caction>Handle error conditions and edge cases as specified in task\u002Fsubtask\u003C\u002Faction>\n\n    \u003C!-- REFACTOR PHASE -->\n    \u003Caction>Improve code structure while keeping tests green\u003C\u002Faction>\n    \u003Caction>Ensure code follows architecture patterns and coding standards from Dev Notes\u003C\u002Faction>\n\n    \u003Caction>Document technical approach and decisions in Dev Agent Record → Implementation Plan\u003C\u002Faction>\n\n    \u003Caction if=\"new dependencies required beyond story specifications\">HALT: \"Additional dependencies need user approval\"\u003C\u002Faction>\n    \u003Caction if=\"3 consecutive implementation failures occur\">HALT and request guidance\u003C\u002Faction>\n    \u003Caction if=\"required configuration is missing\">HALT: \"Cannot proceed without necessary configuration files\"\u003C\u002Faction>\n\n    \u003Ccritical>NEVER implement anything not mapped to a specific task\u002Fsubtask in the story file\u003C\u002Fcritical>\n    \u003Ccritical>NEVER proceed to next task until current task\u002Fsubtask is complete AND tests pass\u003C\u002Fcritical>\n    \u003Ccritical>Execute continuously without pausing until all tasks\u002Fsubtasks are complete or explicit HALT condition\u003C\u002Fcritical>\n    \u003Ccritical>Do NOT propose to pause for review until Step 9 completion gates are satisfied\u003C\u002Fcritical>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"6\" goal=\"Author comprehensive tests\">\n    \u003Caction>Create unit tests for business logic and core functionality introduced\u002Fchanged by the task\u003C\u002Faction>\n    \u003Caction>Add integration tests for component interactions specified in story requirements\u003C\u002Faction>\n    \u003Caction>Include end-to-end tests for critical user flows when story requirements demand them\u003C\u002Faction>\n    \u003Caction>Cover edge cases and error handling scenarios identified in story Dev Notes\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"7\" goal=\"Run validations and tests\">\n    \u003Caction>Determine how to run tests for this repo (infer test framework from project structure)\u003C\u002Faction>\n    \u003Caction>Run all existing tests to ensure no regressions\u003C\u002Faction>\n    \u003Caction>Run the new tests to verify implementation correctness\u003C\u002Faction>\n    \u003Caction>Run linting and code quality checks if configured in project\u003C\u002Faction>\n    \u003Caction>Validate implementation meets ALL story acceptance criteria; enforce quantitative thresholds explicitly\u003C\u002Faction>\n    \u003Caction if=\"regression tests fail\">STOP and fix before continuing - identify breaking changes immediately\u003C\u002Faction>\n    \u003Caction if=\"new tests fail\">STOP and fix before continuing - ensure implementation correctness\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"8\" goal=\"Validate and mark task complete ONLY when fully done\">\n    \u003Ccritical>NEVER mark a task complete unless ALL conditions are met - NO LYING OR CHEATING\u003C\u002Fcritical>\n\n    \u003C!-- VALIDATION GATES -->\n    \u003Caction>Verify ALL tests for this task\u002Fsubtask ACTUALLY EXIST and PASS 100%\u003C\u002Faction>\n    \u003Caction>Confirm implementation matches EXACTLY what the task\u002Fsubtask specifies - no extra features\u003C\u002Faction>\n    \u003Caction>Validate that ALL acceptance criteria related to this task are satisfied\u003C\u002Faction>\n    \u003Caction>Run full test suite to ensure NO regressions introduced\u003C\u002Faction>\n\n    \u003C!-- REVIEW FOLLOW-UP HANDLING -->\n    \u003Ccheck if=\"task is review follow-up (has [AI-Review] prefix)\">\n      \u003Caction>Extract review item details (severity, description, related AC\u002Ffile)\u003C\u002Faction>\n      \u003Caction>Add to resolution tracking list: {{resolved_review_items}}\u003C\u002Faction>\n\n      \u003C!-- Mark task in Review Follow-ups section -->\n      \u003Caction>Mark task checkbox [x] in \"Tasks\u002FSubtasks → Review Follow-ups (AI)\" section\u003C\u002Faction>\n\n      \u003C!-- CRITICAL: Also mark corresponding action item in review section -->\n      \u003Caction>Find matching action item in \"Senior Developer Review (AI) → Action Items\" section by matching description\u003C\u002Faction>\n      \u003Caction>Mark that action item checkbox [x] as resolved\u003C\u002Faction>\n\n      \u003Caction>Add to Dev Agent Record → Completion Notes: \"✅ Resolved review finding [{{severity}}]: {{description}}\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003C!-- ONLY MARK COMPLETE IF ALL VALIDATION PASS -->\n    \u003Ccheck if=\"ALL validation gates pass AND tests ACTUALLY exist and pass\">\n      \u003Caction>ONLY THEN mark the task (and subtasks) checkbox with [x]\u003C\u002Faction>\n      \u003Caction>Update File List section with ALL new, modified, or deleted files (paths relative to repo root)\u003C\u002Faction>\n      \u003Caction>Add completion notes to Dev Agent Record summarizing what was ACTUALLY implemented and tested\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"ANY validation fails\">\n      \u003Caction>DO NOT mark task complete - fix issues first\u003C\u002Faction>\n      \u003Caction>HALT if unable to fix validation failures\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"review_continuation == true and {{resolved_review_items}} is not empty\">\n      \u003Caction>Count total resolved review items in this session\u003C\u002Faction>\n      \u003Caction>Add Change Log entry: \"Addressed code review findings - {{resolved_count}} items resolved (Date: {{date}})\"\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Save the story file\u003C\u002Faction>\n    \u003Caction>Determine if more incomplete tasks remain\u003C\u002Faction>\n    \u003Caction if=\"more tasks remain\">\n      \u003Cgoto step=\"5\">Next task\u003C\u002Fgoto>\n    \u003C\u002Faction>\n    \u003Caction if=\"no tasks remain\">\n      \u003Cgoto step=\"9\">Completion\u003C\u002Fgoto>\n    \u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"9\" goal=\"Story completion and mark for review\" tag=\"sprint-status\">\n    \u003Caction>Verify ALL tasks and subtasks are marked [x] (re-scan the story document now)\u003C\u002Faction>\n    \u003Caction>Run the full regression suite (do not skip)\u003C\u002Faction>\n    \u003Caction>Confirm File List includes every changed file\u003C\u002Faction>\n    \u003Caction>Execute enhanced definition-of-done validation\u003C\u002Faction>\n    \u003Caction>Update the story Status to: \"review\"\u003C\u002Faction>\n\n    \u003C!-- Enhanced Definition of Done Validation -->\n    \u003Caction>Validate definition-of-done checklist with essential requirements:\n      - All tasks\u002Fsubtasks marked complete with [x]\n      - Implementation satisfies every Acceptance Criterion\n      - Unit tests for core functionality added\u002Fupdated\n      - Integration tests for component interactions added when required\n      - End-to-end tests for critical flows added when story demands them\n      - All tests pass (no regressions, new tests successful)\n      - Code quality checks pass (linting, static analysis if configured)\n      - File List includes every new\u002Fmodified\u002Fdeleted file (relative paths)\n      - Dev Agent Record contains implementation notes\n      - Change Log includes summary of changes\n      - Only permitted story sections were modified\n    \u003C\u002Faction>\n\n    \u003C!-- Mark story ready for review - sprint status conditional -->\n    \u003Ccheck if=\"{sprint_status} file exists AND {{current_sprint_status}} != 'no-sprint-tracking'\">\n      \u003Caction>Load the FULL file: {sprint_status}\u003C\u002Faction>\n      \u003Caction>Find development_status key matching {{story_key}}\u003C\u002Faction>\n      \u003Caction>Verify current status is \"in-progress\" (expected previous state)\u003C\u002Faction>\n      \u003Caction>Update development_status[{{story_key}}] = \"review\"\u003C\u002Faction>\n      \u003Caction>Update last_updated field to current date\u003C\u002Faction>\n      \u003Caction>Save file, preserving ALL comments and structure including STATUS DEFINITIONS\u003C\u002Faction>\n      \u003Coutput>✅ Story status updated to \"review\" in sprint-status.yaml\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"{sprint_status} file does NOT exist OR {{current_sprint_status}} == 'no-sprint-tracking'\">\n      \u003Coutput>ℹ️ Story status updated to \"review\" in story file (no sprint tracking configured)\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"story key not found in sprint status\">\n      \u003Coutput>⚠️ Story file updated, but sprint-status update failed: {{story_key}} not found\n\n        Story status is set to \"review\" in file, but sprint-status.yaml may be out of sync.\n      \u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003C!-- Final validation gates -->\n    \u003Caction if=\"any task is incomplete\">HALT - Complete remaining tasks before marking ready for review\u003C\u002Faction>\n    \u003Caction if=\"regression failures exist\">HALT - Fix regression issues before completing\u003C\u002Faction>\n    \u003Caction if=\"File List is incomplete\">HALT - Update File List with all changed files\u003C\u002Faction>\n    \u003Caction if=\"definition-of-done validation fails\">HALT - Address DoD failures before completing\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n  \u003Cstep n=\"10\" goal=\"Completion communication and user support\">\n    \u003Caction>Execute the enhanced definition-of-done checklist using the validation framework\u003C\u002Faction>\n    \u003Caction>Prepare a concise summary in Dev Agent Record → Completion Notes\u003C\u002Faction>\n\n    \u003Caction>Communicate to {user_name} that story implementation is complete and ready for review\u003C\u002Faction>\n    \u003Caction>Summarize key accomplishments: story ID, story key, title, key changes made, tests added, files modified\u003C\u002Faction>\n    \u003Caction>Provide the story file path and current status (now \"review\")\u003C\u002Faction>\n\n    \u003Caction>Based on {user_skill_level}, ask if user needs any explanations about:\n      - What was implemented and how it works\n      - Why certain technical decisions were made\n      - How to test or verify the changes\n      - Any patterns, libraries, or approaches used\n      - Anything else they'd like clarified\n    \u003C\u002Faction>\n\n    \u003Ccheck if=\"user asks for explanations\">\n      \u003Caction>Provide clear, contextual explanations tailored to {user_skill_level}\u003C\u002Faction>\n      \u003Caction>Use examples and references to specific code when helpful\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Once explanations are complete (or user indicates no questions), suggest logical next steps\u003C\u002Faction>\n    \u003Caction>Recommended next steps (flexible based on project setup):\n      - Review the implemented story and test the changes\n      - Verify all acceptance criteria are met\n      - Ensure deployment readiness if applicable\n      - Run `code-review` workflow for peer review\n      - Optional: If Test Architect module installed, run `\u002Fbmad:tea:automate` to expand guardrail tests\n    \u003C\u002Faction>\n\n    \u003Coutput>? **Tip:** For best results, run `code-review` using a **different** LLM than the one that implemented this story.\u003C\u002Foutput>\n    \u003Ccheck if=\"{sprint_status} file exists\">\n      \u003Caction>Suggest checking {sprint_status} to see project progress\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Caction>Remain flexible - allow user to choose their own path or ask for other assistance\u003C\u002Faction>\n  \u003Caction>Run: `python3 {project-root}\u002F_bmad\u002Fscripts\u002Fresolve_customization.py --skill {skill-root} --key workflow.on_complete` — if the resolved value is non-empty, follow it as the final terminal instruction before exiting.\u003C\u002Faction>\n  \u003C\u002Fstep>\n\n\u003C\u002Fworkflow>\n",{"name":5,"description":7},"master","7ccc24b38f7cae09897ace41ebae14780250ac86","week3\u002Fcode\u002F.claude\u002Fskills\u002Fbmad-dev-story",60,"https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action","https:\u002F\u002Fgithub.com\u002Fhuangjia2019","https:\u002F\u002Fkage-ai.com","AI researcher at A*STAR | Author of Designing AI Agents (Manning) | Co-founder of ADPS","2026-08-25 16:05:09",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add huangjia2019\u002Fsdd-in-action --skill bmad-dev-story",{"tool":57,"command":58},"bunx","bunx skills add huangjia2019\u002Fsdd-in-action --skill bmad-dev-story",{"tool":60,"command":61},"pnpm","pnpm dlx skills add huangjia2019\u002Fsdd-in-action --skill bmad-dev-story","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"checklist.md","REFERENCE","参考文档",4389,"https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002Fchecklist.md",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"customize.toml","OTHER","其他",1613,"https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.claude\u002Fskills\u002Fbmad-dev-story\u002Fcustomize.toml",[78,97,111,128,143,158],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":37},"01M6WZBHKBA02YT2SHSACNJR91","openspec-verify-change","Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-verify-change\u002FSKILL.md",[],[85,86,87,88,89,25,90,91,92,93,28,29,32,94,95,96],"change","openspec verify change","verify","verify change","openspec","validate","complete","verify implementation","coherent","correct","artifacts","cli",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":37},"01M6WZBEQRPC45MDYVPMG17X89","openspec-sync-specs","Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-sync-specs\u002FSKILL.md",[],[104,105,89,85,30,96,106,25,107,108,109,110,29,32],"openspec sync specs","sync","update","changes","with","main","delta",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":37},"01M6WZBA2QKBW10Z1ZYA4K2AV9","openspec-propose","Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-propose\u002FSKILL.md",[],[118,89,25,28,119,91,120,121,122,108,123,124,125,32,95,126,85,96,127,29],"openspec propose","build","describe","for","ready","get","proposal","generated","tasks","design",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":37},"01M6WZB3J0FJQJ0WSW9EK6447P","openspec-onboard","Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-onboard\u002FSKILL.md",[],[135,136,89,108,137,121,91,138,139,140,141,142,96],"openspec onboard","onboard","codebase","cycle","narration","work","onboarding","workflow",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":37},"01M6WZAZX6QSAV79619M68K8N1","openspec-new-change","Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-new-change\u002FSKILL.md",[],[85,89,150,151,152,29,153,154,32,155,156,142,96,157,25,108],"openspec new change","structured","artifact","new feature","fix","start","create","feature",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":37},"01M6WZAX8300NEPY3T1J8FRS3C","openspec-ff-change","Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.","https:\u002F\u002Fgithub.com\u002Fhuangjia2019\u002Fsdd-in-action\u002Fblob\u002Fmaster\u002Fweek3\u002Fcode\u002F.opencode\u002Fskills\u002Fopenspec-ff-change\u002FSKILL.md",[],[85,165,89,96,25,121,166,152,28,29,32,167,95,156],"openspec ff change","creation","fast"]