[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71K7TDXM4EWP9F5JZS85GYH":3,"skill-same:01M71K7TDXM4EWP9F5JZS85GYH":88},{"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":23,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M71K7TDXM4EWP9F5JZS85GYH","bmad-create-story",null,"Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says \"create the next story\" or \"create story [story identifier]\"","mugsun\u002Fcurdx-flow","mugsun","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F100790155?v=4","01M6KJSAN2W4WRPDFBKTJTDDQ2","Mugsun","01M71K65VJXA4C1KPJAHZ6ZVHC",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"bmad create story","create story","create","bmad","Story","when","later","next","context","use","file","implement","with","it","user","2026-11-10 10:12:30",false,"---\nname: bmad-create-story\ndescription: 'Creates a dedicated story file with all the context the agent will need to implement it later. Use when the user says \"create the next story\" or \"create story [story identifier]\"'\n---\n\n# Create Story Workflow\n\n**Goal:** Create a comprehensive story file that gives the dev agent everything needed for flawless implementation.\n\n**Your Role:** Story context engine that prevents LLM developer mistakes, omissions, or disasters.\n- Communicate all responses in {communication_language} and generate all documents in {document_output_language}\n- Your purpose is NOT to copy from epics - it's to create a comprehensive, optimized story file that gives the DEV agent EVERYTHING needed for flawless implementation\n- COMMON LLM MISTAKES TO PREVENT: reinventing wheels, wrong libraries, wrong file locations, breaking regressions, ignoring UX, vague implementations, lying about completion, not learning from past work\n- EXHAUSTIVE ANALYSIS REQUIRED: You must thoroughly analyze ALL artifacts to extract critical context - do NOT be lazy or skim! This is the most important function in the entire development process!\n- UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly analyze different artifacts simultaneously and thoroughly\n- SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is written\n- ZERO USER INTERVENTION: Process should be fully automated except for initial epic\u002Fstory selection or missing documents\n\n## Conventions\n\n- Bare paths (e.g. `discover-inputs.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- `planning_artifacts`, `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- `sprint_status` = `{implementation_artifacts}\u002Fsprint-status.yaml`\n- `epics_file` = `{planning_artifacts}\u002Fepics.md`\n- `prd_file` = `{planning_artifacts}\u002Fprd.md`\n- `architecture_file` = `{planning_artifacts}\u002Farchitecture.md`\n- `ux_file` = `{planning_artifacts}\u002F*ux*.md`\n- `story_title` = \"\" (will be elicited if not derivable)\n- `default_output_file` = `{implementation_artifacts}\u002F{{story_key}}.md`\n\n## Input Files\n\n| Input | Description | Path Pattern(s) | Load Strategy |\n|-------|-------------|------------------|---------------|\n| prd | PRD (fallback - epics file should have most content) | whole: `{planning_artifacts}\u002F*prd*.md`, sharded: `{planning_artifacts}\u002F*prd*\u002F*.md` | SELECTIVE_LOAD |\n| architecture | Architecture (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}\u002F*architecture*.md`, sharded: `{planning_artifacts}\u002F*architecture*\u002F*.md` | SELECTIVE_LOAD |\n| ux | UX design (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}\u002F*ux*.md`, sharded: `{planning_artifacts}\u002F*ux*\u002F*.md` | SELECTIVE_LOAD |\n| epics | Enhanced epics+stories file with BDD and source hints | whole: `{planning_artifacts}\u002F*epic*.md`, sharded: `{planning_artifacts}\u002F*epic*\u002F*.md` | SELECTIVE_LOAD |\n\n## Execution\n\n\u003Cworkflow>\n\n\u003Cstep n=\"1\" goal=\"Determine target story\">\n  \u003Ccheck if=\"{{story_path}} is provided by user or user provided the epic and story number such as 2-4 or 1.6 or epic 1 story 5\">\n    \u003Caction>Parse user-provided story path: extract epic_num, story_num, story_title from format like \"1-2-user-auth\"\u003C\u002Faction>\n    \u003Caction>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input\u003C\u002Faction>\n    \u003Caction>GOTO step 2a\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003Caction>Check if {{sprint_status}} file exists for auto discover\u003C\u002Faction>\n  \u003Ccheck if=\"sprint status file does NOT exist\">\n    \u003Coutput>🚫 No sprint status file found and no story specified\u003C\u002Foutput>\n    \u003Coutput>\n      **Required Options:**\n      1. Run `sprint-planning` to initialize sprint tracking (recommended)\n      2. Provide specific epic-story number to create (e.g., \"1-2-user-auth\")\n      3. Provide path to story documents if sprint status doesn't exist yet\n    \u003C\u002Foutput>\n    \u003Cask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:\u003C\u002Fask>\n\n    \u003Ccheck if=\"user chooses 'q'\">\n      \u003Caction>HALT - No work needed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user chooses '1'\">\n      \u003Coutput>Run sprint-planning workflow first to create sprint-status.yaml\u003C\u002Foutput>\n      \u003Caction>HALT - User needs to run sprint-planning\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user provides epic-story number\">\n      \u003Caction>Parse user input: extract epic_num, story_num, story_title\u003C\u002Faction>\n      \u003Caction>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input\u003C\u002Faction>\n      \u003Caction>GOTO step 2a\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user provides story docs path\">\n      \u003Caction>Use user-provided path for story documents\u003C\u002Faction>\n      \u003Caction>GOTO step 2a\u003C\u002Faction>\n    \u003C\u002Fcheck>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Auto-discover from sprint status only if no user input -->\n  \u003Ccheck if=\"no user input provided\">\n    \u003Ccritical>MUST read COMPLETE {sprint_status} 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\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 \"backlog\"\n    \u003C\u002Faction>\n\n    \u003Ccheck if=\"no backlog story found\">\n      \u003Coutput>📋 No backlog stories found in sprint-status.yaml\n\n        All stories are either already created, in progress, or done.\n\n        **Options:**\n        1. Run sprint-planning to refresh story tracking\n        2. Load PM agent and run correct-course to add more stories\n        3. Check if current sprint is complete and run retrospective\n      \u003C\u002Foutput>\n      \u003Caction>HALT\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Extract from found story key (e.g., \"1-2-user-authentication\"):\n      - epic_num: first number before dash (e.g., \"1\")\n      - story_num: second number after first dash (e.g., \"2\")\n      - story_title: remainder after second dash (e.g., \"user-authentication\")\n    \u003C\u002Faction>\n    \u003Caction>Set {{story_id}} = \"{{epic_num}}.{{story_num}}\"\u003C\u002Faction>\n    \u003Caction>Store story_key for later use (e.g., \"1-2-user-authentication\")\u003C\u002Faction>\n\n    \u003C!-- Mark epic as in-progress if this is first story -->\n    \u003Caction>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern\u003C\u002Faction>\n    \u003Ccheck if=\"this is first story in epic {{epic_num}}\">\n      \u003Caction>Load {{sprint_status}} and check epic-{{epic_num}} status\u003C\u002Faction>\n      \u003Caction>If epic status is \"backlog\" → update to \"in-progress\"\u003C\u002Faction>\n      \u003Caction>If epic status is \"contexted\" (legacy status) → update to \"in-progress\" (backward compatibility)\u003C\u002Faction>\n      \u003Caction>If epic status is \"in-progress\" → no change needed\u003C\u002Faction>\n      \u003Ccheck if=\"epic status is 'done'\">\n        \u003Coutput>🚫 ERROR: Cannot create story in completed epic\u003C\u002Foutput>\n        \u003Coutput>Epic {{epic_num}} is marked as 'done'. All stories are complete.\u003C\u002Foutput>\n        \u003Coutput>If you need to add more work, either:\u003C\u002Foutput>\n        \u003Coutput>1. Manually change epic status back to 'in-progress' in sprint-status.yaml\u003C\u002Foutput>\n        \u003Coutput>2. Create a new epic for additional work\u003C\u002Foutput>\n        \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n      \u003C\u002Fcheck>\n      \u003Ccheck if=\"epic status is not one of: backlog, contexted, in-progress, done\">\n        \u003Coutput>🚫 ERROR: Invalid epic status '{{epic_status}}'\u003C\u002Foutput>\n        \u003Coutput>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done\u003C\u002Foutput>\n        \u003Coutput>Please fix sprint-status.yaml manually or run sprint-planning to regenerate\u003C\u002Foutput>\n        \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n      \u003C\u002Fcheck>\n      \u003Coutput>📊 Epic {{epic_num}} status updated to in-progress\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Caction>GOTO step 2a\u003C\u002Faction>\n  \u003C\u002Fcheck>\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\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 \"backlog\"\n  \u003C\u002Faction>\n\n  \u003Ccheck if=\"no backlog story found\">\n    \u003Coutput>No backlog stories found in sprint-status.yaml\n\n      All stories are either already created, in progress, or done.\n\n      **Options:**\n      1. Run sprint-planning to refresh story tracking\n      2. Load PM agent and run correct-course to add more stories\n      3. Check if current sprint is complete and run retrospective\n    \u003C\u002Foutput>\n    \u003Caction>HALT\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003Caction>Extract from found story key (e.g., \"1-2-user-authentication\"):\n    - epic_num: first number before dash (e.g., \"1\")\n    - story_num: second number after first dash (e.g., \"2\")\n    - story_title: remainder after second dash (e.g., \"user-authentication\")\n  \u003C\u002Faction>\n  \u003Caction>Set {{story_id}} = \"{{epic_num}}.{{story_num}}\"\u003C\u002Faction>\n  \u003Caction>Store story_key for later use (e.g., \"1-2-user-authentication\")\u003C\u002Faction>\n\n  \u003C!-- Mark epic as in-progress if this is first story -->\n  \u003Caction>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern\u003C\u002Faction>\n  \u003Ccheck if=\"this is first story in epic {{epic_num}}\">\n    \u003Caction>Load {{sprint_status}} and check epic-{{epic_num}} status\u003C\u002Faction>\n    \u003Caction>If epic status is \"backlog\" → update to \"in-progress\"\u003C\u002Faction>\n    \u003Caction>If epic status is \"contexted\" (legacy status) → update to \"in-progress\" (backward compatibility)\u003C\u002Faction>\n    \u003Caction>If epic status is \"in-progress\" → no change needed\u003C\u002Faction>\n    \u003Ccheck if=\"epic status is 'done'\">\n      \u003Coutput>ERROR: Cannot create story in completed epic\u003C\u002Foutput>\n      \u003Coutput>Epic {{epic_num}} is marked as 'done'. All stories are complete.\u003C\u002Foutput>\n      \u003Coutput>If you need to add more work, either:\u003C\u002Foutput>\n      \u003Coutput>1. Manually change epic status back to 'in-progress' in sprint-status.yaml\u003C\u002Foutput>\n      \u003Coutput>2. Create a new epic for additional work\u003C\u002Foutput>\n      \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Ccheck if=\"epic status is not one of: backlog, contexted, in-progress, done\">\n      \u003Coutput>ERROR: Invalid epic status '{{epic_status}}'\u003C\u002Foutput>\n      \u003Coutput>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done\u003C\u002Foutput>\n      \u003Coutput>Please fix sprint-status.yaml manually or run sprint-planning to regenerate\u003C\u002Foutput>\n      \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Coutput>Epic {{epic_num}} status updated to in-progress\u003C\u002Foutput>\n  \u003C\u002Fcheck>\n\n  \u003Caction>GOTO step 2a\u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"2\" goal=\"Load and analyze core artifacts\">\n  \u003Ccritical>🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer mistakes!\u003C\u002Fcritical>\n\n  \u003C!-- Load all available content through discovery protocol -->\n  \u003Caction>Read fully and follow `.\u002Fdiscover-inputs.md` to load all input files\u003C\u002Faction>\n  \u003Cnote>Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content}, plus the project-context facts loaded during activation via `persistent_facts`.\u003C\u002Fnote>\n\n  \u003C!-- Analyze epics file for story foundation -->\n  \u003Caction>From {epics_content}, extract Epic {{epic_num}} complete context:\u003C\u002Faction> **EPIC ANALYSIS:** - Epic\n  objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story\n  statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories\u002Fepics - Source hints pointing to\n  original documents \u003C!-- Extract specific story requirements -->\n  \u003Caction>Extract our story ({{epic_num}}-{{story_num}}) details:\u003C\u002Faction> **STORY FOUNDATION:** - User story statement\n  (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -\n  Business context and value - Success criteria \u003C!-- Previous story analysis for context continuity -->\n  \u003Ccheck if=\"story_num > 1\">\n    \u003Caction>Find {{previous_story_num}}: scan {implementation_artifacts} for the story file in epic {{epic_num}} with the highest story number less than {{story_num}}\u003C\u002Faction>\n    \u003Caction>Load previous story file: {implementation_artifacts}\u002F{{epic_num}}-{{previous_story_num}}-*.md\u003C\u002Faction> **PREVIOUS STORY INTELLIGENCE:** -\n  Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created\u002Fmodified and their\n  patterns - Testing approaches that worked\u002Fdidn't work - Problems encountered and solutions found - Code patterns established \u003Caction>Extract\n  all learnings that could impact current story implementation\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Git intelligence for previous work patterns -->\n  \u003Ccheck\n    if=\"previous story exists AND git repository detected\">\n    \u003Caction>Get last 5 commit titles to understand recent work patterns\u003C\u002Faction>\n    \u003Caction>Analyze 1-5 most recent commits for relevance to current story:\n      - Files created\u002Fmodified\n      - Code patterns and conventions used\n      - Library dependencies added\u002Fchanged\n      - Architecture decisions implemented\n      - Testing approaches used\n    \u003C\u002Faction>\n    \u003Caction>Extract actionable insights for current story implementation\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"3\" goal=\"Architecture analysis for developer guardrails\">\n  \u003Ccritical>🏗️ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow!\u003C\u002Fcritical> **ARCHITECTURE DOCUMENT ANALYSIS:** \u003Caction>Systematically\n  analyze architecture content for story-relevant requirements:\u003C\u002Faction>\n\n  \u003C!-- Load architecture - single file or sharded -->\n  \u003Ccheck if=\"architecture file is single file\">\n    \u003Caction>Load complete {architecture_content}\u003C\u002Faction>\n  \u003C\u002Fcheck>\n  \u003Ccheck if=\"architecture is sharded to folder\">\n    \u003Caction>Load architecture index and scan all architecture files\u003C\u002Faction>\n  \u003C\u002Fcheck> **CRITICAL ARCHITECTURE EXTRACTION:** \u003Caction>For\n  each architecture section, determine if relevant to this story:\u003C\u002Faction> - **Technical Stack:** Languages, frameworks, libraries with\n  versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint\n  patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**\n  Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing\n  Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build\n  processes - **Integration Patterns:** External service integrations, data flows \u003Caction>Extract any story-specific requirements that the\n  developer MUST follow\u003C\u002Faction>\n  \u003Caction>Identify any architectural decisions that override previous patterns\u003C\u002Faction>\n\n  \u003C!-- Read existing code being modified — non-negotiable -->\n  \u003Ccritical>📂 READ FILES BEING MODIFIED — skipping this is the primary cause of implementation failures and review cycles\u003C\u002Fcritical>\n  \u003Caction>From the architecture directory structure, identify every file marked UPDATE (not NEW) that this story will touch\u003C\u002Faction>\n  \u003Caction>Read each relevant UPDATE file completely. For each one, document in dev notes:\n    - Current state: what it does today (state machine, API calls, data shapes, existing behaviors)\n    - What this story changes: the specific sections or behaviors being modified\n    - What must be preserved: existing interactions and behaviors the story must not break\n  \u003C\u002Faction>\n  \u003Ccritical>A story implementation must leave the system working end-to-end — not just satisfy its stated ACs.\n  If a behavior is required for the feature to work correctly in the existing system, it is a requirement\n  whether or not it is explicitly written in the story. The dev agent owns this.\u003C\u002Fcritical>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"4\" goal=\"Web research for latest technical specifics\">\n  \u003Ccritical>🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!\u003C\u002Fcritical> **WEB INTELLIGENCE:** \u003Caction>Identify specific\n  technical areas that require latest version knowledge:\u003C\u002Faction>\n\n  \u003C!-- Check for libraries\u002Fframeworks mentioned in architecture -->\n  \u003Caction>From architecture analysis, identify specific libraries, APIs, or\n  frameworks\u003C\u002Faction>\n  \u003Caction>For each critical technology, research latest stable version and key changes:\n    - Latest API documentation and breaking changes\n    - Security vulnerabilities or updates\n    - Performance improvements or deprecations\n    - Best practices for current version\n  \u003C\u002Faction>\n  **EXTERNAL CONTEXT INCLUSION:** \u003Caction>Include in story any critical latest information the developer needs:\n    - Specific library versions and why chosen\n    - API endpoints with parameters and authentication\n    - Recent security patches or considerations\n    - Performance optimization techniques\n    - Migration considerations if upgrading\n  \u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"5\" goal=\"Create comprehensive story file\">\n  \u003Ccritical>📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!\u003C\u002Fcritical>\n\n  \u003Caction>Initialize from template.md:\n  {default_output_file}\u003C\u002Faction>\n  \u003Ctemplate-output file=\"{default_output_file}\">story_header\u003C\u002Ftemplate-output>\n\n  \u003C!-- Story foundation from epics analysis -->\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">story_requirements\u003C\u002Ftemplate-output>\n\n  \u003C!-- Developer context section - MOST IMPORTANT PART -->\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  developer_context_section\u003C\u002Ftemplate-output> **DEV AGENT GUARDRAILS:** \u003Ctemplate-output file=\"{default_output_file}\">\n  technical_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">architecture_compliance\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">library_framework_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  file_structure_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">testing_requirements\u003C\u002Ftemplate-output>\n\n  \u003C!-- Previous story intelligence -->\n  \u003Ccheck\n    if=\"previous story learnings available\">\n    \u003Ctemplate-output file=\"{default_output_file}\">previous_story_intelligence\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Git intelligence -->\n  \u003Ccheck\n    if=\"git analysis completed\">\n    \u003Ctemplate-output file=\"{default_output_file}\">git_intelligence_summary\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Latest technical specifics -->\n  \u003Ccheck if=\"web research completed\">\n    \u003Ctemplate-output file=\"{default_output_file}\">latest_tech_information\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Project context reference -->\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">project_context_reference\u003C\u002Ftemplate-output>\n\n  \u003C!-- Final status update -->\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  story_completion_status\u003C\u002Ftemplate-output>\n\n  \u003C!-- CRITICAL: Set status to ready-for-dev -->\n  \u003Caction>Set story Status to: \"ready-for-dev\"\u003C\u002Faction>\n  \u003Caction>Add completion note: \"Ultimate\n  context engine analysis completed - comprehensive developer guide created\"\u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"6\" goal=\"Update sprint status and finalize\">\n  \u003Caction>Validate the newly created story file {default_output_file} against `.\u002Fchecklist.md` and apply any required fixes before finalizing\u003C\u002Faction>\n  \u003Caction>Save story document unconditionally\u003C\u002Faction>\n\n  \u003C!-- Update sprint status -->\n  \u003Ccheck if=\"sprint status file exists\">\n    \u003Caction>Update {{sprint_status}}\u003C\u002Faction>\n    \u003Caction>Load the FULL file and read all development_status entries\u003C\u002Faction>\n    \u003Caction>Find development_status key matching {{story_key}}\u003C\u002Faction>\n    \u003Caction>Verify current status is \"backlog\" (expected previous state)\u003C\u002Faction>\n    \u003Caction>Update development_status[{{story_key}}] = \"ready-for-dev\"\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  \u003C\u002Fcheck>\n\n  \u003Caction>Report completion\u003C\u002Faction>\n  \u003Coutput>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!**\n\n    **Story Details:**\n    - Story ID: {{story_id}}\n    - Story Key: {{story_key}}\n    - File: {{story_file}}\n    - Status: ready-for-dev\n\n    **Next Steps:**\n    1. Review the comprehensive story in {{story_file}}\n    2. Run dev agents `dev-story` for optimized implementation\n    3. Run `code-review` when complete (auto-marks done)\n    4. Optional: If Test Architect module installed, run `\u002Fbmad:tea:automate` after `dev-story` to generate guardrail tests\n\n    **The developer now has everything needed for flawless implementation!**\n  \u003C\u002Foutput>\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","# Create Story Workflow\n\n**Goal:** Create a comprehensive story file that gives the dev agent everything needed for flawless implementation.\n\n**Your Role:** Story context engine that prevents LLM developer mistakes, omissions, or disasters.\n- Communicate all responses in {communication_language} and generate all documents in {document_output_language}\n- Your purpose is NOT to copy from epics - it's to create a comprehensive, optimized story file that gives the DEV agent EVERYTHING needed for flawless implementation\n- COMMON LLM MISTAKES TO PREVENT: reinventing wheels, wrong libraries, wrong file locations, breaking regressions, ignoring UX, vague implementations, lying about completion, not learning from past work\n- EXHAUSTIVE ANALYSIS REQUIRED: You must thoroughly analyze ALL artifacts to extract critical context - do NOT be lazy or skim! This is the most important function in the entire development process!\n- UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly analyze different artifacts simultaneously and thoroughly\n- SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is written\n- ZERO USER INTERVENTION: Process should be fully automated except for initial epic\u002Fstory selection or missing documents\n\n## Conventions\n\n- Bare paths (e.g. `discover-inputs.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- `planning_artifacts`, `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- `sprint_status` = `{implementation_artifacts}\u002Fsprint-status.yaml`\n- `epics_file` = `{planning_artifacts}\u002Fepics.md`\n- `prd_file` = `{planning_artifacts}\u002Fprd.md`\n- `architecture_file` = `{planning_artifacts}\u002Farchitecture.md`\n- `ux_file` = `{planning_artifacts}\u002F*ux*.md`\n- `story_title` = \"\" (will be elicited if not derivable)\n- `default_output_file` = `{implementation_artifacts}\u002F{{story_key}}.md`\n\n## Input Files\n\n| Input | Description | Path Pattern(s) | Load Strategy |\n|-------|-------------|------------------|---------------|\n| prd | PRD (fallback - epics file should have most content) | whole: `{planning_artifacts}\u002F*prd*.md`, sharded: `{planning_artifacts}\u002F*prd*\u002F*.md` | SELECTIVE_LOAD |\n| architecture | Architecture (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}\u002F*architecture*.md`, sharded: `{planning_artifacts}\u002F*architecture*\u002F*.md` | SELECTIVE_LOAD |\n| ux | UX design (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}\u002F*ux*.md`, sharded: `{planning_artifacts}\u002F*ux*\u002F*.md` | SELECTIVE_LOAD |\n| epics | Enhanced epics+stories file with BDD and source hints | whole: `{planning_artifacts}\u002F*epic*.md`, sharded: `{planning_artifacts}\u002F*epic*\u002F*.md` | SELECTIVE_LOAD |\n\n## Execution\n\n\u003Cworkflow>\n\n\u003Cstep n=\"1\" goal=\"Determine target story\">\n  \u003Ccheck if=\"{{story_path}} is provided by user or user provided the epic and story number such as 2-4 or 1.6 or epic 1 story 5\">\n    \u003Caction>Parse user-provided story path: extract epic_num, story_num, story_title from format like \"1-2-user-auth\"\u003C\u002Faction>\n    \u003Caction>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input\u003C\u002Faction>\n    \u003Caction>GOTO step 2a\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003Caction>Check if {{sprint_status}} file exists for auto discover\u003C\u002Faction>\n  \u003Ccheck if=\"sprint status file does NOT exist\">\n    \u003Coutput>🚫 No sprint status file found and no story specified\u003C\u002Foutput>\n    \u003Coutput>\n      **Required Options:**\n      1. Run `sprint-planning` to initialize sprint tracking (recommended)\n      2. Provide specific epic-story number to create (e.g., \"1-2-user-auth\")\n      3. Provide path to story documents if sprint status doesn't exist yet\n    \u003C\u002Foutput>\n    \u003Cask>Choose option [1], provide epic-story number, path to story docs, or [q] to quit:\u003C\u002Fask>\n\n    \u003Ccheck if=\"user chooses 'q'\">\n      \u003Caction>HALT - No work needed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user chooses '1'\">\n      \u003Coutput>Run sprint-planning workflow first to create sprint-status.yaml\u003C\u002Foutput>\n      \u003Caction>HALT - User needs to run sprint-planning\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user provides epic-story number\">\n      \u003Caction>Parse user input: extract epic_num, story_num, story_title\u003C\u002Faction>\n      \u003Caction>Set {{epic_num}}, {{story_num}}, {{story_key}} from user input\u003C\u002Faction>\n      \u003Caction>GOTO step 2a\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Ccheck if=\"user provides story docs path\">\n      \u003Caction>Use user-provided path for story documents\u003C\u002Faction>\n      \u003Caction>GOTO step 2a\u003C\u002Faction>\n    \u003C\u002Fcheck>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Auto-discover from sprint status only if no user input -->\n  \u003Ccheck if=\"no user input provided\">\n    \u003Ccritical>MUST read COMPLETE {sprint_status} 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\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 \"backlog\"\n    \u003C\u002Faction>\n\n    \u003Ccheck if=\"no backlog story found\">\n      \u003Coutput>📋 No backlog stories found in sprint-status.yaml\n\n        All stories are either already created, in progress, or done.\n\n        **Options:**\n        1. Run sprint-planning to refresh story tracking\n        2. Load PM agent and run correct-course to add more stories\n        3. Check if current sprint is complete and run retrospective\n      \u003C\u002Foutput>\n      \u003Caction>HALT\u003C\u002Faction>\n    \u003C\u002Fcheck>\n\n    \u003Caction>Extract from found story key (e.g., \"1-2-user-authentication\"):\n      - epic_num: first number before dash (e.g., \"1\")\n      - story_num: second number after first dash (e.g., \"2\")\n      - story_title: remainder after second dash (e.g., \"user-authentication\")\n    \u003C\u002Faction>\n    \u003Caction>Set {{story_id}} = \"{{epic_num}}.{{story_num}}\"\u003C\u002Faction>\n    \u003Caction>Store story_key for later use (e.g., \"1-2-user-authentication\")\u003C\u002Faction>\n\n    \u003C!-- Mark epic as in-progress if this is first story -->\n    \u003Caction>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern\u003C\u002Faction>\n    \u003Ccheck if=\"this is first story in epic {{epic_num}}\">\n      \u003Caction>Load {{sprint_status}} and check epic-{{epic_num}} status\u003C\u002Faction>\n      \u003Caction>If epic status is \"backlog\" → update to \"in-progress\"\u003C\u002Faction>\n      \u003Caction>If epic status is \"contexted\" (legacy status) → update to \"in-progress\" (backward compatibility)\u003C\u002Faction>\n      \u003Caction>If epic status is \"in-progress\" → no change needed\u003C\u002Faction>\n      \u003Ccheck if=\"epic status is 'done'\">\n        \u003Coutput>🚫 ERROR: Cannot create story in completed epic\u003C\u002Foutput>\n        \u003Coutput>Epic {{epic_num}} is marked as 'done'. All stories are complete.\u003C\u002Foutput>\n        \u003Coutput>If you need to add more work, either:\u003C\u002Foutput>\n        \u003Coutput>1. Manually change epic status back to 'in-progress' in sprint-status.yaml\u003C\u002Foutput>\n        \u003Coutput>2. Create a new epic for additional work\u003C\u002Foutput>\n        \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n      \u003C\u002Fcheck>\n      \u003Ccheck if=\"epic status is not one of: backlog, contexted, in-progress, done\">\n        \u003Coutput>🚫 ERROR: Invalid epic status '{{epic_status}}'\u003C\u002Foutput>\n        \u003Coutput>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done\u003C\u002Foutput>\n        \u003Coutput>Please fix sprint-status.yaml manually or run sprint-planning to regenerate\u003C\u002Foutput>\n        \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n      \u003C\u002Fcheck>\n      \u003Coutput>📊 Epic {{epic_num}} status updated to in-progress\u003C\u002Foutput>\n    \u003C\u002Fcheck>\n\n    \u003Caction>GOTO step 2a\u003C\u002Faction>\n  \u003C\u002Fcheck>\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\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 \"backlog\"\n  \u003C\u002Faction>\n\n  \u003Ccheck if=\"no backlog story found\">\n    \u003Coutput>No backlog stories found in sprint-status.yaml\n\n      All stories are either already created, in progress, or done.\n\n      **Options:**\n      1. Run sprint-planning to refresh story tracking\n      2. Load PM agent and run correct-course to add more stories\n      3. Check if current sprint is complete and run retrospective\n    \u003C\u002Foutput>\n    \u003Caction>HALT\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003Caction>Extract from found story key (e.g., \"1-2-user-authentication\"):\n    - epic_num: first number before dash (e.g., \"1\")\n    - story_num: second number after first dash (e.g., \"2\")\n    - story_title: remainder after second dash (e.g., \"user-authentication\")\n  \u003C\u002Faction>\n  \u003Caction>Set {{story_id}} = \"{{epic_num}}.{{story_num}}\"\u003C\u002Faction>\n  \u003Caction>Store story_key for later use (e.g., \"1-2-user-authentication\")\u003C\u002Faction>\n\n  \u003C!-- Mark epic as in-progress if this is first story -->\n  \u003Caction>Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern\u003C\u002Faction>\n  \u003Ccheck if=\"this is first story in epic {{epic_num}}\">\n    \u003Caction>Load {{sprint_status}} and check epic-{{epic_num}} status\u003C\u002Faction>\n    \u003Caction>If epic status is \"backlog\" → update to \"in-progress\"\u003C\u002Faction>\n    \u003Caction>If epic status is \"contexted\" (legacy status) → update to \"in-progress\" (backward compatibility)\u003C\u002Faction>\n    \u003Caction>If epic status is \"in-progress\" → no change needed\u003C\u002Faction>\n    \u003Ccheck if=\"epic status is 'done'\">\n      \u003Coutput>ERROR: Cannot create story in completed epic\u003C\u002Foutput>\n      \u003Coutput>Epic {{epic_num}} is marked as 'done'. All stories are complete.\u003C\u002Foutput>\n      \u003Coutput>If you need to add more work, either:\u003C\u002Foutput>\n      \u003Coutput>1. Manually change epic status back to 'in-progress' in sprint-status.yaml\u003C\u002Foutput>\n      \u003Coutput>2. Create a new epic for additional work\u003C\u002Foutput>\n      \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Ccheck if=\"epic status is not one of: backlog, contexted, in-progress, done\">\n      \u003Coutput>ERROR: Invalid epic status '{{epic_status}}'\u003C\u002Foutput>\n      \u003Coutput>Epic {{epic_num}} has invalid status. Expected: backlog, in-progress, or done\u003C\u002Foutput>\n      \u003Coutput>Please fix sprint-status.yaml manually or run sprint-planning to regenerate\u003C\u002Foutput>\n      \u003Caction>HALT - Cannot proceed\u003C\u002Faction>\n    \u003C\u002Fcheck>\n    \u003Coutput>Epic {{epic_num}} status updated to in-progress\u003C\u002Foutput>\n  \u003C\u002Fcheck>\n\n  \u003Caction>GOTO step 2a\u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"2\" goal=\"Load and analyze core artifacts\">\n  \u003Ccritical>🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer mistakes!\u003C\u002Fcritical>\n\n  \u003C!-- Load all available content through discovery protocol -->\n  \u003Caction>Read fully and follow `.\u002Fdiscover-inputs.md` to load all input files\u003C\u002Faction>\n  \u003Cnote>Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content}, plus the project-context facts loaded during activation via `persistent_facts`.\u003C\u002Fnote>\n\n  \u003C!-- Analyze epics file for story foundation -->\n  \u003Caction>From {epics_content}, extract Epic {{epic_num}} complete context:\u003C\u002Faction> **EPIC ANALYSIS:** - Epic\n  objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story\n  statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories\u002Fepics - Source hints pointing to\n  original documents \u003C!-- Extract specific story requirements -->\n  \u003Caction>Extract our story ({{epic_num}}-{{story_num}}) details:\u003C\u002Faction> **STORY FOUNDATION:** - User story statement\n  (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -\n  Business context and value - Success criteria \u003C!-- Previous story analysis for context continuity -->\n  \u003Ccheck if=\"story_num > 1\">\n    \u003Caction>Find {{previous_story_num}}: scan {implementation_artifacts} for the story file in epic {{epic_num}} with the highest story number less than {{story_num}}\u003C\u002Faction>\n    \u003Caction>Load previous story file: {implementation_artifacts}\u002F{{epic_num}}-{{previous_story_num}}-*.md\u003C\u002Faction> **PREVIOUS STORY INTELLIGENCE:** -\n  Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created\u002Fmodified and their\n  patterns - Testing approaches that worked\u002Fdidn't work - Problems encountered and solutions found - Code patterns established \u003Caction>Extract\n  all learnings that could impact current story implementation\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Git intelligence for previous work patterns -->\n  \u003Ccheck\n    if=\"previous story exists AND git repository detected\">\n    \u003Caction>Get last 5 commit titles to understand recent work patterns\u003C\u002Faction>\n    \u003Caction>Analyze 1-5 most recent commits for relevance to current story:\n      - Files created\u002Fmodified\n      - Code patterns and conventions used\n      - Library dependencies added\u002Fchanged\n      - Architecture decisions implemented\n      - Testing approaches used\n    \u003C\u002Faction>\n    \u003Caction>Extract actionable insights for current story implementation\u003C\u002Faction>\n  \u003C\u002Fcheck>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"3\" goal=\"Architecture analysis for developer guardrails\">\n  \u003Ccritical>🏗️ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow!\u003C\u002Fcritical> **ARCHITECTURE DOCUMENT ANALYSIS:** \u003Caction>Systematically\n  analyze architecture content for story-relevant requirements:\u003C\u002Faction>\n\n  \u003C!-- Load architecture - single file or sharded -->\n  \u003Ccheck if=\"architecture file is single file\">\n    \u003Caction>Load complete {architecture_content}\u003C\u002Faction>\n  \u003C\u002Fcheck>\n  \u003Ccheck if=\"architecture is sharded to folder\">\n    \u003Caction>Load architecture index and scan all architecture files\u003C\u002Faction>\n  \u003C\u002Fcheck> **CRITICAL ARCHITECTURE EXTRACTION:** \u003Caction>For\n  each architecture section, determine if relevant to this story:\u003C\u002Faction> - **Technical Stack:** Languages, frameworks, libraries with\n  versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint\n  patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**\n  Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing\n  Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build\n  processes - **Integration Patterns:** External service integrations, data flows \u003Caction>Extract any story-specific requirements that the\n  developer MUST follow\u003C\u002Faction>\n  \u003Caction>Identify any architectural decisions that override previous patterns\u003C\u002Faction>\n\n  \u003C!-- Read existing code being modified — non-negotiable -->\n  \u003Ccritical>📂 READ FILES BEING MODIFIED — skipping this is the primary cause of implementation failures and review cycles\u003C\u002Fcritical>\n  \u003Caction>From the architecture directory structure, identify every file marked UPDATE (not NEW) that this story will touch\u003C\u002Faction>\n  \u003Caction>Read each relevant UPDATE file completely. For each one, document in dev notes:\n    - Current state: what it does today (state machine, API calls, data shapes, existing behaviors)\n    - What this story changes: the specific sections or behaviors being modified\n    - What must be preserved: existing interactions and behaviors the story must not break\n  \u003C\u002Faction>\n  \u003Ccritical>A story implementation must leave the system working end-to-end — not just satisfy its stated ACs.\n  If a behavior is required for the feature to work correctly in the existing system, it is a requirement\n  whether or not it is explicitly written in the story. The dev agent owns this.\u003C\u002Fcritical>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"4\" goal=\"Web research for latest technical specifics\">\n  \u003Ccritical>🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!\u003C\u002Fcritical> **WEB INTELLIGENCE:** \u003Caction>Identify specific\n  technical areas that require latest version knowledge:\u003C\u002Faction>\n\n  \u003C!-- Check for libraries\u002Fframeworks mentioned in architecture -->\n  \u003Caction>From architecture analysis, identify specific libraries, APIs, or\n  frameworks\u003C\u002Faction>\n  \u003Caction>For each critical technology, research latest stable version and key changes:\n    - Latest API documentation and breaking changes\n    - Security vulnerabilities or updates\n    - Performance improvements or deprecations\n    - Best practices for current version\n  \u003C\u002Faction>\n  **EXTERNAL CONTEXT INCLUSION:** \u003Caction>Include in story any critical latest information the developer needs:\n    - Specific library versions and why chosen\n    - API endpoints with parameters and authentication\n    - Recent security patches or considerations\n    - Performance optimization techniques\n    - Migration considerations if upgrading\n  \u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"5\" goal=\"Create comprehensive story file\">\n  \u003Ccritical>📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!\u003C\u002Fcritical>\n\n  \u003Caction>Initialize from template.md:\n  {default_output_file}\u003C\u002Faction>\n  \u003Ctemplate-output file=\"{default_output_file}\">story_header\u003C\u002Ftemplate-output>\n\n  \u003C!-- Story foundation from epics analysis -->\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">story_requirements\u003C\u002Ftemplate-output>\n\n  \u003C!-- Developer context section - MOST IMPORTANT PART -->\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  developer_context_section\u003C\u002Ftemplate-output> **DEV AGENT GUARDRAILS:** \u003Ctemplate-output file=\"{default_output_file}\">\n  technical_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">architecture_compliance\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">library_framework_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  file_structure_requirements\u003C\u002Ftemplate-output>\n  \u003Ctemplate-output file=\"{default_output_file}\">testing_requirements\u003C\u002Ftemplate-output>\n\n  \u003C!-- Previous story intelligence -->\n  \u003Ccheck\n    if=\"previous story learnings available\">\n    \u003Ctemplate-output file=\"{default_output_file}\">previous_story_intelligence\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Git intelligence -->\n  \u003Ccheck\n    if=\"git analysis completed\">\n    \u003Ctemplate-output file=\"{default_output_file}\">git_intelligence_summary\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Latest technical specifics -->\n  \u003Ccheck if=\"web research completed\">\n    \u003Ctemplate-output file=\"{default_output_file}\">latest_tech_information\u003C\u002Ftemplate-output>\n  \u003C\u002Fcheck>\n\n  \u003C!-- Project context reference -->\n  \u003Ctemplate-output\n    file=\"{default_output_file}\">project_context_reference\u003C\u002Ftemplate-output>\n\n  \u003C!-- Final status update -->\n  \u003Ctemplate-output file=\"{default_output_file}\">\n  story_completion_status\u003C\u002Ftemplate-output>\n\n  \u003C!-- CRITICAL: Set status to ready-for-dev -->\n  \u003Caction>Set story Status to: \"ready-for-dev\"\u003C\u002Faction>\n  \u003Caction>Add completion note: \"Ultimate\n  context engine analysis completed - comprehensive developer guide created\"\u003C\u002Faction>\n\u003C\u002Fstep>\n\n\u003Cstep n=\"6\" goal=\"Update sprint status and finalize\">\n  \u003Caction>Validate the newly created story file {default_output_file} against `.\u002Fchecklist.md` and apply any required fixes before finalizing\u003C\u002Faction>\n  \u003Caction>Save story document unconditionally\u003C\u002Faction>\n\n  \u003C!-- Update sprint status -->\n  \u003Ccheck if=\"sprint status file exists\">\n    \u003Caction>Update {{sprint_status}}\u003C\u002Faction>\n    \u003Caction>Load the FULL file and read all development_status entries\u003C\u002Faction>\n    \u003Caction>Find development_status key matching {{story_key}}\u003C\u002Faction>\n    \u003Caction>Verify current status is \"backlog\" (expected previous state)\u003C\u002Faction>\n    \u003Caction>Update development_status[{{story_key}}] = \"ready-for-dev\"\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  \u003C\u002Fcheck>\n\n  \u003Caction>Report completion\u003C\u002Faction>\n  \u003Coutput>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!**\n\n    **Story Details:**\n    - Story ID: {{story_id}}\n    - Story Key: {{story_key}}\n    - File: {{story_file}}\n    - Status: ready-for-dev\n\n    **Next Steps:**\n    1. Review the comprehensive story in {{story_file}}\n    2. Run dev agents `dev-story` for optimized implementation\n    3. Run `code-review` when complete (auto-marks done)\n    4. Optional: If Test Architect module installed, run `\u002Fbmad:tea:automate` after `dev-story` to generate guardrail tests\n\n    **The developer now has everything needed for flawless implementation!**\n  \u003C\u002Foutput>\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},"main","7357746802ae7a84cafa93b9dbffd138817b0290",".agents\u002Fskills\u002Fbmad-create-story",0,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow","https:\u002F\u002Fcurdx.org","https:\u002F\u002Fgithub.com\u002Fmugsun","📮 bydongxin@gmail.com","🧑‍💻 AI Builder & Software Engineer\r\n🚀 Turning ideas into software.          \r\n\r\n","2026-08-19 15:19:29",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add mugsun\u002Fcurdx-flow --skill bmad-create-story",{"tool":60,"command":61},"bunx","bunx skills add mugsun\u002Fcurdx-flow --skill bmad-create-story",{"tool":63,"command":64},"pnpm","pnpm dlx skills add mugsun\u002Fcurdx-flow --skill bmad-create-story","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002FSKILL.md",true,[68,74,80,84],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"checklist.md","REFERENCE","参考文档",14349,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002Fchecklist.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"customize.toml","OTHER","其他",1643,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002Fcustomize.toml",{"path":81,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":82,"sourceHtmlUrl":83},"discover-inputs.md",3911,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002Fdiscover-inputs.md",{"path":85,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":86,"sourceHtmlUrl":87},"template.md",948,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbmad-create-story\u002Ftemplate.md",[89,98,116,133,147,158],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":96,"publishedAt":39},"01M71KDR5EJP6G4VWFCHNJ35PT","help","Fixture help skill","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fruntime-readiness\u002Fclaude-code-plugin-like\u002Fskills\u002Fhelp\u002FSKILL.md",[95],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[91,97],"fixture",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":39},"01M71KDNAVB000W3MZB1W7CMD8","verification-before-completion","Use when checking fixes, phase exits, completion evidence, or mock-heavy tests before claiming success.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[105,106,107,108,29,109,110,111,112,113,33,114,115],"verification","verification before completion","only","false","tasks","phase","evidence","fixes","tests","mock","state",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":39},"01M71KDKFE975GFYRDC21H1NEE","triage","Use when a large feature should be decomposed into dependency-aware specs.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Ftriage\u002FSKILL.md",[122],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[118,124,125,126,127,128,129,130,131,29,33,132],"goal","true","feature","write","read","dependency","name","Bash","EPIC",{"skillNo":134,"name":109,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":139,"publishedAt":39},"01M71KDH7XFQJPKYZ0H9JDNSA5","Use when a spec has design.md and needs implementation tasks.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Ftasks\u002FSKILL.md",[138],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[109,140,141,130,142,33,143,144,145,29,131,128,127,146,125],"implementation","spec","task","standard","design","auto","edit",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":39},"01M71KDEV9G51MCXDQWPJH7QST","switch","Use when changing the active spec by name or path.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fswitch\u002FSKILL.md",[153],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[149,131,155,125,33,29,156,130,128,141,127,157],"by name","active","path",{"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":165,"publishedAt":39},"01M71KDDJFRV09YZ08B3WJ39SC","status","Use when inspecting curdx-flow specs, active state, progress, or index status.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fstatus\u002FSKILL.md",[164],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[160,125,33,29,131,115,166,156,167,128,168,169],"progress","update","flow","index"]