diff --git a/src/bmm/agents/sm.agent.yaml b/src/bmm/agents/sm.agent.yaml
index 26430f175..11716df24 100644
--- a/src/bmm/agents/sm.agent.yaml
+++ b/src/bmm/agents/sm.agent.yaml
@@ -24,7 +24,7 @@ agent:
description: "[SP] Sprint Planning: Generate or update the record that will sequence the tasks to complete the full project that the dev agent will follow"
- trigger: CS or fuzzy match on create-story
- workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml"
+ workflow: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story/workflow.md"
description: "[CS] Context Story: Prepare a story with all required context for implementation for the developer agent"
- trigger: ER or fuzzy match on epic-retrospective
diff --git a/src/bmm/module-help.csv b/src/bmm/module-help.csv
index 7d997329c..5872c20dd 100644
--- a/src/bmm/module-help.csv
+++ b/src/bmm/module-help.csv
@@ -24,8 +24,8 @@ bmm,3-solutioning,Create Epics and Stories,CE,30,_bmad/bmm/workflows/3-solutioni
bmm,3-solutioning,Check Implementation Readiness,IR,70,_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md,bmad-bmm-check-implementation-readiness,true,architect,Validate Mode,"Ensure PRD UX Architecture and Epics Stories are aligned",planning_artifacts,"readiness report",
bmm,4-implementation,Sprint Planning,SP,10,_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.md,bmad-bmm-sprint-planning,true,sm,Create Mode,"Generate sprint plan for development tasks - this kicks off the implementation phase by producing a plan the implementation agents will follow in sequence for every story in the plan.",implementation_artifacts,"sprint status",
bmm,4-implementation,Sprint Status,SS,20,_bmad/bmm/workflows/4-implementation/sprint-status/workflow.md,bmad-bmm-sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,,
-bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report",
-bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story,
+bmm,4-implementation,Validate Story,VS,35,_bmad/bmm/workflows/4-implementation/create-story/workflow.md,bmad-bmm-create-story,false,sm,Validate Mode,"Validates story readiness and completeness before development work begins",implementation_artifacts,"story validation report",
+bmm,4-implementation,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.md,bmad-bmm-create-story,true,sm,Create Mode,"Story cycle start: Prepare first found story in the sprint plan that is next, or if the command is run with a specific epic and story designation with context. Once complete, then VS then DS then CR then back to DS if needed or next CS or ER",implementation_artifacts,story,
bmm,4-implementation,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.md,bmad-bmm-dev-story,true,dev,Create Mode,"Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed",,,
bmm,4-implementation,Code Review,CR,50,_bmad/bmm/workflows/4-implementation/code-review/workflow.md,bmad-bmm-code-review,false,dev,Create Mode,"Story cycle: If issues back to DS if approved then next CS or ER if epic complete",,,
bmm,4-implementation,QA Automation Test,QA,45,_bmad/bmm/workflows/qa-generate-e2e-tests/workflow.md,bmad-bmm-qa-automate,false,qa,Create Mode,"Generate automated API and E2E tests for implemented code using the project's existing test framework (detects existing well known in use test frameworks). Use after implementation to add test coverage. NOT for code review or story validation - use CR for that.",implementation_artifacts,"test suite",
diff --git a/src/bmm/workflows/4-implementation/create-story/checklist.md b/src/bmm/workflows/4-implementation/create-story/checklist.md
index d9ed06375..7b8550e2d 100644
--- a/src/bmm/workflows/4-implementation/create-story/checklist.md
+++ b/src/bmm/workflows/4-implementation/create-story/checklist.md
@@ -36,20 +36,20 @@ This is a COMPETITION to create the **ULTIMATE story context** that makes LLM de
- The `{project-root}/_bmad/core/tasks/workflow.xml` framework will automatically:
- Load this checklist file
- Load the newly created story file (`{story_file_path}`)
- - Load workflow variables from `{installed_path}/workflow.yaml`
+ - Load workflow variables from `{installed_path}/workflow.md`
- Execute the validation process
### **When Running in Fresh Context:**
- User should provide the story file path being reviewed
- Load the story file directly
-- Load the corresponding workflow.yaml for variable context
+- Load the corresponding workflow.md for variable context
- Proceed with systematic analysis
### **Required Inputs:**
- **Story file**: The story file to review and improve
-- **Workflow variables**: From workflow.yaml (implementation_artifacts, epics_file, etc.)
+- **Workflow variables**: From workflow.md (implementation_artifacts, epics_file, etc.)
- **Source documents**: Epics, architecture, etc. (discovered or provided)
- **Validation framework**: `validate-workflow.xml` (handles checklist execution)
@@ -61,7 +61,7 @@ You will systematically re-do the entire story creation process, but with a crit
### **Step 1: Load and Understand the Target**
-1. **Load the workflow configuration**: `{installed_path}/workflow.yaml` for variable inclusion
+1. **Load the workflow configuration**: `{installed_path}/workflow.md` for variable inclusion
2. **Load the story file**: `{story_file_path}` (provided by user or discovered)
3. **Load validation framework**: `{project-root}/_bmad/core/tasks/workflow.xml`
4. **Extract metadata**: epic_num, story_num, story_key, story_title from story file
diff --git a/src/bmm/workflows/4-implementation/create-story/instructions.xml b/src/bmm/workflows/4-implementation/create-story/instructions.xml
deleted file mode 100644
index efdc87c0e..000000000
--- a/src/bmm/workflows/4-implementation/create-story/instructions.xml
+++ /dev/null
@@ -1,347 +0,0 @@
-
- The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml
- You MUST have already loaded and processed: {installed_path}/workflow.yaml
- Communicate all responses in {communication_language} and generate all documents in {document_output_language}
-
- 🔥 CRITICAL MISSION: You are creating the ULTIMATE story context engine that prevents LLM developer mistakes, omissions or
- disasters! 🔥
- 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
- 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
- 🚨 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!
- 🔬 UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly
- analyze different artifacts simultaneously and thoroughly
- ❓ SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is
- written
- 🎯 ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents
-
-
-
- Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"
- Set {{epic_num}}, {{story_num}}, {{story_key}} from user input
- GOTO step 2a
-
-
- Check if {{sprint_status}} file exists for auto discover
-
-
-
- Choose option [1], provide epic-story number, path to story docs, or [q] to quit:
-
-
- HALT - No work needed
-
-
-
-
- HALT - User needs to run sprint-planning
-
-
-
- Parse user input: extract epic_num, story_num, story_title
- Set {{epic_num}}, {{story_num}}, {{story_key}} from user input
- GOTO step 2a
-
-
-
- Use user-provided path for story documents
- GOTO step 2a
-
-
-
-
-
- MUST read COMPLETE {sprint_status} file from start to end to preserve order
- Load the FULL file: {{sprint_status}}
- Read ALL lines from beginning to end - do not skip any content
- Parse the development_status section completely
-
- Find the FIRST story (by reading in order from top to bottom) where:
- - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
- - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
- - Status value equals "backlog"
-
-
-
-
- HALT
-
-
- Extract from found story key (e.g., "1-2-user-authentication"):
- - epic_num: first number before dash (e.g., "1")
- - story_num: second number after first dash (e.g., "2")
- - story_title: remainder after second dash (e.g., "user-authentication")
-
- Set {{story_id}} = "{{epic_num}}.{{story_num}}"
- Store story_key for later use (e.g., "1-2-user-authentication")
-
-
- Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern
-
- Load {{sprint_status}} and check epic-{{epic_num}} status
- If epic status is "backlog" → update to "in-progress"
- If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)
- If epic status is "in-progress" → no change needed
-
-
-
-
-
-
- HALT - Cannot proceed
-
-
-
-
-
- HALT - Cannot proceed
-
-
-
-
- GOTO step 2a
-
- Load the FULL file: {{sprint_status}}
- Read ALL lines from beginning to end - do not skip any content
- Parse the development_status section completely
-
- Find the FIRST story (by reading in order from top to bottom) where:
- - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
- - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
- - Status value equals "backlog"
-
-
-
-
- HALT
-
-
- Extract from found story key (e.g., "1-2-user-authentication"):
- - epic_num: first number before dash (e.g., "1")
- - story_num: second number after first dash (e.g., "2")
- - story_title: remainder after second dash (e.g., "user-authentication")
-
- Set {{story_id}} = "{{epic_num}}.{{story_num}}"
- Store story_key for later use (e.g., "1-2-user-authentication")
-
-
- Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern
-
- Load {{sprint_status}} and check epic-{{epic_num}} status
- If epic status is "backlog" → update to "in-progress"
- If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)
- If epic status is "in-progress" → no change needed
-
-
-
-
-
-
- HALT - Cannot proceed
-
-
-
-
-
- HALT - Cannot proceed
-
-
-
-
- GOTO step 2a
-
-
-
- 🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!
-
-
-
- Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content},
- {project_context}
-
-
- From {epics_content}, extract Epic {{epic_num}} complete context: **EPIC ANALYSIS:** - Epic
- objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story
- statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories/epics - Source hints pointing to
- original documents
- Extract our story ({{epic_num}}-{{story_num}}) details: **STORY FOUNDATION:** - User story statement
- (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -
- Business context and value - Success criteria
-
- Find {{previous_story_num}}: scan {implementation_artifacts} for the story file in epic {{epic_num}} with the highest story number less than {{story_num}}
- Load previous story file: {implementation_artifacts}/{{epic_num}}-{{previous_story_num}}-*.md **PREVIOUS STORY INTELLIGENCE:** -
- Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
- patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established Extract
- all learnings that could impact current story implementation
-
-
-
-
- Get last 5 commit titles to understand recent work patterns
- Analyze 1-5 most recent commits for relevance to current story:
- - Files created/modified
- - Code patterns and conventions used
- - Library dependencies added/changed
- - Architecture decisions implemented
- - Testing approaches used
-
- Extract actionable insights for current story implementation
-
-
-
-
- 🏗️ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow! **ARCHITECTURE DOCUMENT ANALYSIS:** Systematically
- analyze architecture content for story-relevant requirements:
-
-
-
- Load complete {architecture_content}
-
-
- Load architecture index and scan all architecture files
- **CRITICAL ARCHITECTURE EXTRACTION:** For
- each architecture section, determine if relevant to this story: - **Technical Stack:** Languages, frameworks, libraries with
- versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint
- patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**
- Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing
- Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build
- processes - **Integration Patterns:** External service integrations, data flows Extract any story-specific requirements that the
- developer MUST follow
- Identify any architectural decisions that override previous patterns
-
-
-
- 🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations! **WEB INTELLIGENCE:** Identify specific
- technical areas that require latest version knowledge:
-
-
- From architecture analysis, identify specific libraries, APIs, or
- frameworks
- For each critical technology, research latest stable version and key changes:
- - Latest API documentation and breaking changes
- - Security vulnerabilities or updates
- - Performance improvements or deprecations
- - Best practices for current version
-
- **EXTERNAL CONTEXT INCLUSION:** Include in story any critical latest information the developer needs:
- - Specific library versions and why chosen
- - API endpoints with parameters and authentication
- - Recent security patches or considerations
- - Performance optimization techniques
- - Migration considerations if upgrading
-
-
-
-
- 📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!
-
- Initialize from template.md:
- {default_output_file}
- story_header
-
-
- story_requirements
-
-
-
- developer_context_section **DEV AGENT GUARDRAILS:**
- technical_requirements
- architecture_compliance
- library_framework_requirements
-
- file_structure_requirements
- testing_requirements
-
-
-
- previous_story_intelligence
-
-
-
-
- git_intelligence_summary
-
-
-
-
- latest_tech_information
-
-
-
- project_context_reference
-
-
-
- story_completion_status
-
-
- Set story Status to: "ready-for-dev"
- Add completion note: "Ultimate
- context engine analysis completed - comprehensive developer guide created"
-
-
-
- Validate the newly created story file {story_file} against {installed_path}/checklist.md and apply any required fixes before finalizing
- Save story document unconditionally
-
-
-
- Update {{sprint_status}}
- Load the FULL file and read all development_status entries
- Find development_status key matching {{story_key}}
- Verify current status is "backlog" (expected previous state)
- Update development_status[{{story_key}}] = "ready-for-dev"
- Update last_updated field to current date
- Save file, preserving ALL comments and structure including STATUS DEFINITIONS
-
-
- Report completion
-
-
-
-
diff --git a/src/bmm/workflows/4-implementation/create-story/workflow.md b/src/bmm/workflows/4-implementation/create-story/workflow.md
new file mode 100644
index 000000000..55556adb6
--- /dev/null
+++ b/src/bmm/workflows/4-implementation/create-story/workflow.md
@@ -0,0 +1,389 @@
+---
+name: create-story
+description: '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]"'
+---
+
+# Create Story Workflow
+
+**Goal:** Create a comprehensive story file that gives the dev agent everything needed for flawless implementation.
+
+**Your Role:** Story context engine that prevents LLM developer mistakes, omissions, or disasters.
+- Communicate all responses in {communication_language} and generate all documents in {document_output_language}
+- 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
+- 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
+- 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!
+- UTILIZE SUBPROCESSES AND SUBAGENTS: Use research subagents, subprocesses or parallel processing if available to thoroughly analyze different artifacts simultaneously and thoroughly
+- SAVE QUESTIONS: If you think of questions or clarifications during analysis, save them for the end after the complete story is written
+- ZERO USER INTERVENTION: Process should be fully automated except for initial epic/story selection or missing documents
+
+---
+
+## INITIALIZATION
+
+### Configuration Loading
+
+Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
+
+- `project_name`, `user_name`
+- `communication_language`, `document_output_language`
+- `user_skill_level`
+- `planning_artifacts`, `implementation_artifacts`
+- `date` as system-generated current datetime
+
+### Paths
+
+- `installed_path` = `{project-root}/_bmad/bmm/workflows/4-implementation/create-story`
+- `template` = `{installed_path}/template.md`
+- `validation` = `{installed_path}/checklist.md`
+- `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
+- `epics_file` = `{planning_artifacts}/epics.md`
+- `prd_file` = `{planning_artifacts}/prd.md`
+- `architecture_file` = `{planning_artifacts}/architecture.md`
+- `ux_file` = `{planning_artifacts}/*ux*.md`
+- `story_title` = "" (will be elicited if not derivable)
+- `project_context` = `**/project-context.md` (load if exists)
+- `default_output_file` = `{implementation_artifacts}/{{story_key}}.md`
+
+### Input Files
+
+| Input | Description | Path Pattern(s) | Load Strategy |
+|-------|-------------|------------------|---------------|
+| prd | PRD (fallback - epics file should have most content) | whole: `{planning_artifacts}/*prd*.md`, sharded: `{planning_artifacts}/*prd*/*.md` | SELECTIVE_LOAD |
+| architecture | Architecture (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}/*architecture*.md`, sharded: `{planning_artifacts}/*architecture*/*.md` | SELECTIVE_LOAD |
+| ux | UX design (fallback - epics file should have relevant sections) | whole: `{planning_artifacts}/*ux*.md`, sharded: `{planning_artifacts}/*ux*/*.md` | SELECTIVE_LOAD |
+| epics | Enhanced epics+stories file with BDD and source hints | whole: `{planning_artifacts}/*epic*.md`, sharded: `{planning_artifacts}/*epic*/*.md` | SELECTIVE_LOAD |
+
+---
+
+## EXECUTION
+
+
+
+
+
+ Parse user-provided story path: extract epic_num, story_num, story_title from format like "1-2-user-auth"
+ Set {{epic_num}}, {{story_num}}, {{story_key}} from user input
+ GOTO step 2a
+
+
+ Check if {{sprint_status}} file exists for auto discover
+
+
+
+ Choose option [1], provide epic-story number, path to story docs, or [q] to quit:
+
+
+ HALT - No work needed
+
+
+
+
+ HALT - User needs to run sprint-planning
+
+
+
+ Parse user input: extract epic_num, story_num, story_title
+ Set {{epic_num}}, {{story_num}}, {{story_key}} from user input
+ GOTO step 2a
+
+
+
+ Use user-provided path for story documents
+ GOTO step 2a
+
+
+
+
+
+ MUST read COMPLETE {sprint_status} file from start to end to preserve order
+ Load the FULL file: {{sprint_status}}
+ Read ALL lines from beginning to end - do not skip any content
+ Parse the development_status section completely
+
+ Find the FIRST story (by reading in order from top to bottom) where:
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
+ - Status value equals "backlog"
+
+
+
+
+ HALT
+
+
+ Extract from found story key (e.g., "1-2-user-authentication"):
+ - epic_num: first number before dash (e.g., "1")
+ - story_num: second number after first dash (e.g., "2")
+ - story_title: remainder after second dash (e.g., "user-authentication")
+
+ Set {{story_id}} = "{{epic_num}}.{{story_num}}"
+ Store story_key for later use (e.g., "1-2-user-authentication")
+
+
+ Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern
+
+ Load {{sprint_status}} and check epic-{{epic_num}} status
+ If epic status is "backlog" → update to "in-progress"
+ If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)
+ If epic status is "in-progress" → no change needed
+
+
+
+
+
+
+ HALT - Cannot proceed
+
+
+
+
+
+ HALT - Cannot proceed
+
+
+
+
+ GOTO step 2a
+
+ Load the FULL file: {{sprint_status}}
+ Read ALL lines from beginning to end - do not skip any content
+ Parse the development_status section completely
+
+ Find the FIRST story (by reading in order from top to bottom) where:
+ - Key matches pattern: number-number-name (e.g., "1-2-user-auth")
+ - NOT an epic key (epic-X) or retrospective (epic-X-retrospective)
+ - Status value equals "backlog"
+
+
+
+
+ HALT
+
+
+ Extract from found story key (e.g., "1-2-user-authentication"):
+ - epic_num: first number before dash (e.g., "1")
+ - story_num: second number after first dash (e.g., "2")
+ - story_title: remainder after second dash (e.g., "user-authentication")
+
+ Set {{story_id}} = "{{epic_num}}.{{story_num}}"
+ Store story_key for later use (e.g., "1-2-user-authentication")
+
+
+ Check if this is the first story in epic {{epic_num}} by looking for {{epic_num}}-1-* pattern
+
+ Load {{sprint_status}} and check epic-{{epic_num}} status
+ If epic status is "backlog" → update to "in-progress"
+ If epic status is "contexted" (legacy status) → update to "in-progress" (backward compatibility)
+ If epic status is "in-progress" → no change needed
+
+
+
+
+
+
+ HALT - Cannot proceed
+
+
+
+
+
+ HALT - Cannot proceed
+
+
+
+
+ GOTO step 2a
+
+
+
+ 🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!
+
+
+
+ Available content: {epics_content}, {prd_content}, {architecture_content}, {ux_content},
+ {project_context}
+
+
+ From {epics_content}, extract Epic {{epic_num}} complete context: **EPIC ANALYSIS:** - Epic
+ objectives and business value - ALL stories in this epic for cross-story context - Our specific story's requirements, user story
+ statement, acceptance criteria - Technical requirements and constraints - Dependencies on other stories/epics - Source hints pointing to
+ original documents
+ Extract our story ({{epic_num}}-{{story_num}}) details: **STORY FOUNDATION:** - User story statement
+ (As a, I want, so that) - Detailed acceptance criteria (already BDD formatted) - Technical requirements specific to this story -
+ Business context and value - Success criteria
+
+ Find {{previous_story_num}}: scan {implementation_artifacts} for the story file in epic {{epic_num}} with the highest story number less than {{story_num}}
+ Load previous story file: {implementation_artifacts}/{{epic_num}}-{{previous_story_num}}-*.md **PREVIOUS STORY INTELLIGENCE:** -
+ Dev notes and learnings from previous story - Review feedback and corrections needed - Files that were created/modified and their
+ patterns - Testing approaches that worked/didn't work - Problems encountered and solutions found - Code patterns established Extract
+ all learnings that could impact current story implementation
+
+
+
+
+ Get last 5 commit titles to understand recent work patterns
+ Analyze 1-5 most recent commits for relevance to current story:
+ - Files created/modified
+ - Code patterns and conventions used
+ - Library dependencies added/changed
+ - Architecture decisions implemented
+ - Testing approaches used
+
+ Extract actionable insights for current story implementation
+
+
+
+
+ 🏗️ ARCHITECTURE INTELLIGENCE - Extract everything the developer MUST follow! **ARCHITECTURE DOCUMENT ANALYSIS:** Systematically
+ analyze architecture content for story-relevant requirements:
+
+
+
+ Load complete {architecture_content}
+
+
+ Load architecture index and scan all architecture files
+ **CRITICAL ARCHITECTURE EXTRACTION:** For
+ each architecture section, determine if relevant to this story: - **Technical Stack:** Languages, frameworks, libraries with
+ versions - **Code Structure:** Folder organization, naming conventions, file patterns - **API Patterns:** Service structure, endpoint
+ patterns, data contracts - **Database Schemas:** Tables, relationships, constraints relevant to story - **Security Requirements:**
+ Authentication patterns, authorization rules - **Performance Requirements:** Caching strategies, optimization patterns - **Testing
+ Standards:** Testing frameworks, coverage expectations, test patterns - **Deployment Patterns:** Environment configurations, build
+ processes - **Integration Patterns:** External service integrations, data flows Extract any story-specific requirements that the
+ developer MUST follow
+ Identify any architectural decisions that override previous patterns
+
+
+
+ 🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations! **WEB INTELLIGENCE:** Identify specific
+ technical areas that require latest version knowledge:
+
+
+ From architecture analysis, identify specific libraries, APIs, or
+ frameworks
+ For each critical technology, research latest stable version and key changes:
+ - Latest API documentation and breaking changes
+ - Security vulnerabilities or updates
+ - Performance improvements or deprecations
+ - Best practices for current version
+
+ **EXTERNAL CONTEXT INCLUSION:** Include in story any critical latest information the developer needs:
+ - Specific library versions and why chosen
+ - API endpoints with parameters and authentication
+ - Recent security patches or considerations
+ - Performance optimization techniques
+ - Migration considerations if upgrading
+
+
+
+
+ 📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!
+
+ Initialize from template.md:
+ {default_output_file}
+ story_header
+
+
+ story_requirements
+
+
+
+ developer_context_section **DEV AGENT GUARDRAILS:**
+ technical_requirements
+ architecture_compliance
+ library_framework_requirements
+
+ file_structure_requirements
+ testing_requirements
+
+
+
+ previous_story_intelligence
+
+
+
+
+ git_intelligence_summary
+
+
+
+
+ latest_tech_information
+
+
+
+ project_context_reference
+
+
+
+ story_completion_status
+
+
+ Set story Status to: "ready-for-dev"
+ Add completion note: "Ultimate
+ context engine analysis completed - comprehensive developer guide created"
+
+
+
+ Validate the newly created story file {story_file} against {installed_path}/checklist.md and apply any required fixes before finalizing
+ Save story document unconditionally
+
+
+
+ Update {{sprint_status}}
+ Load the FULL file and read all development_status entries
+ Find development_status key matching {{story_key}}
+ Verify current status is "backlog" (expected previous state)
+ Update development_status[{{story_key}}] = "ready-for-dev"
+ Update last_updated field to current date
+ Save file, preserving ALL comments and structure including STATUS DEFINITIONS
+
+
+ Report completion
+
+
+
+
diff --git a/src/bmm/workflows/4-implementation/create-story/workflow.yaml b/src/bmm/workflows/4-implementation/create-story/workflow.yaml
deleted file mode 100644
index 972972aff..000000000
--- a/src/bmm/workflows/4-implementation/create-story/workflow.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: create-story
-description: '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]"'
-
-# Critical variables from config
-config_source: "{project-root}/_bmad/bmm/config.yaml"
-user_name: "{config_source}:user_name"
-communication_language: "{config_source}:communication_language"
-document_output_language: "{config_source}:document_output_language"
-user_skill_level: "{config_source}:user_skill_level"
-date: system-generated
-planning_artifacts: "{config_source}:planning_artifacts"
-implementation_artifacts: "{config_source}:implementation_artifacts"
-
-# Workflow components
-installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story"
-template: "{installed_path}/template.md"
-instructions: "{installed_path}/instructions.xml"
-validation: "{installed_path}/checklist.md"
-
-# Variables and inputs
-sprint_status: "{implementation_artifacts}/sprint-status.yaml" # Primary source for story tracking
-epics_file: "{planning_artifacts}/epics.md" # Enhanced epics+stories with BDD and source hints
-prd_file: "{planning_artifacts}/prd.md" # Fallback for requirements (if not in epics file)
-architecture_file: "{planning_artifacts}/architecture.md" # Fallback for constraints (if not in epics file)
-ux_file: "{planning_artifacts}/*ux*.md" # Fallback for UX requirements (if not in epics file)
-story_title: "" # Will be elicited if not derivable
-project_context: "**/project-context.md"
-default_output_file: "{implementation_artifacts}/{{story_key}}.md"
-
-# Smart input file references - Simplified for enhanced approach
-# The epics+stories file should contain everything needed with source hints
-input_file_patterns:
- prd:
- description: "PRD (fallback - epics file should have most content)"
- whole: "{planning_artifacts}/*prd*.md"
- sharded: "{planning_artifacts}/*prd*/*.md"
- load_strategy: "SELECTIVE_LOAD" # Only load if needed
- architecture:
- description: "Architecture (fallback - epics file should have relevant sections)"
- whole: "{planning_artifacts}/*architecture*.md"
- sharded: "{planning_artifacts}/*architecture*/*.md"
- load_strategy: "SELECTIVE_LOAD" # Only load if needed
- ux:
- description: "UX design (fallback - epics file should have relevant sections)"
- whole: "{planning_artifacts}/*ux*.md"
- sharded: "{planning_artifacts}/*ux*/*.md"
- load_strategy: "SELECTIVE_LOAD" # Only load if needed
- epics:
- description: "Enhanced epics+stories file with BDD and source hints"
- whole: "{planning_artifacts}/*epic*.md"
- sharded: "{planning_artifacts}/*epic*/*.md"
- load_strategy: "SELECTIVE_LOAD" # Only load needed epic