refactor: shift create-story to requirements-focused planning

- Remove codebase scanning from planning phase
- Mark generated tasks as DRAFT
- Add notation that tasks will be validated at dev-time
- Focus on requirements analysis and architecture context
- Simplify workflow by deferring gap analysis to execution

Applies to both BMM and BMGD modules
This commit is contained in:
Jonah Schulte 2025-12-26 14:01:42 -05:00
parent c15ad174ed
commit 62eb2626d9
4 changed files with 77 additions and 94 deletions

View File

@ -119,7 +119,8 @@
</step> </step>
<step n="2" goal="Load and analyze core artifacts"> <step n="2" goal="Load and analyze core artifacts">
<critical>🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!</critical> <critical>📋 REQUIREMENTS ANALYSIS - Extract complete context for story planning</critical>
<note>🎯 Focus: Requirements, acceptance criteria, and dependencies. Gap analysis happens at dev-time.</note>
<!-- Load all available content through discovery protocol --> <!-- Load all available content through discovery protocol -->
<invoke-protocol <invoke-protocol
@ -142,18 +143,17 @@
all learnings that could impact current story implementation</action> all learnings that could impact current story implementation</action>
</check> </check>
<!-- Git intelligence for previous work patterns --> <!-- Git intelligence for previous work patterns (context only, not gap analysis) -->
<check <check
if="previous story exists AND git repository detected"> if="previous story exists AND git repository detected">
<action>Get last 5 commit titles to understand recent work patterns</action> <action>Get last 5 commit titles to understand recent work patterns</action>
<action>Analyze 1-5 most recent commits for relevance to current story: <action>Analyze 1-5 most recent commits for context:
- Files created/modified
- Code patterns and conventions used - Code patterns and conventions used
- Library dependencies added/changed - Library dependencies added/changed
- Architecture decisions implemented - Architecture decisions implemented
- Testing approaches used - Testing approaches used
</action> </action>
<action>Extract actionable insights for current story implementation</action> <note>This provides context for requirements, not codebase gap analysis (happens at dev-time)</note>
</check> </check>
</step> </step>
@ -178,30 +178,9 @@
<action>Identify any architectural decisions that override previous patterns</action> <action>Identify any architectural decisions that override previous patterns</action>
</step> </step>
<step n="4" goal="Web research for latest technical specifics"> <step n="4" goal="Create story file with draft implementation tasks">
<critical>🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!</critical> **WEB INTELLIGENCE:** <action>Identify specific <critical>📝 CREATE STORY FILE - Requirements foundation with draft tasks for dev-time validation</critical>
technical areas that require latest version knowledge:</action> <note>⚠️ Tasks generated here are DRAFT based on requirements analysis. They will be validated and refined against actual codebase at dev-time.</note>
<!-- Check for libraries/frameworks mentioned in architecture -->
<action>From architecture analysis, identify specific libraries, APIs, or
frameworks</action>
<action>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
</action>
**EXTERNAL CONTEXT INCLUSION:** <action>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
</action>
</step>
<step n="5" goal="Create comprehensive story file">
<critical>📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!</critical>
<action>Initialize from template.md: <action>Initialize from template.md:
{default_output_file}</action> {default_output_file}</action>
@ -234,26 +213,26 @@
<template-output file="{default_output_file}">git_intelligence_summary</template-output> <template-output file="{default_output_file}">git_intelligence_summary</template-output>
</check> </check>
<!-- Latest technical specifics -->
<check if="web research completed">
<template-output file="{default_output_file}">latest_tech_information</template-output>
</check>
<!-- Project context reference --> <!-- Project context reference -->
<template-output <template-output
file="{default_output_file}">project_context_reference</template-output> file="{default_output_file}">project_context_reference</template-output>
<!-- DRAFT TASKS NOTATION -->
<action>Add clear notation to Tasks/Subtasks section:
"⚠️ DRAFT TASKS - Generated from requirements analysis.
Will be validated and refined against actual codebase when dev-story runs."
</action>
<!-- Final status update --> <!-- Final status update -->
<template-output file="{default_output_file}"> <template-output file="{default_output_file}">
story_completion_status</template-output> story_completion_status</template-output>
<!-- CRITICAL: Set status to ready-for-dev --> <!-- CRITICAL: Set status to ready-for-dev -->
<action>Set story Status to: "ready-for-dev"</action> <action>Set story Status to: "ready-for-dev"</action>
<action>Add completion note: "Ultimate <action>Add completion note: "Story planning complete with requirements analysis and draft implementation tasks"</action>
context engine analysis completed - comprehensive developer guide created"</action>
</step> </step>
<step n="6" goal="Update sprint status and finalize"> <step n="5" goal="Update sprint status and finalize">
<invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task> <invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task>
<action>Save story document unconditionally</action> <action>Save story document unconditionally</action>
@ -268,7 +247,7 @@
</check> </check>
<action>Report completion</action> <action>Report completion</action>
<output>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!** <output>**🎯 BMad Method STORY CREATED, {user_name}!**
**Story Details:** **Story Details:**
- Story ID: {{story_id}} - Story ID: {{story_id}}
@ -276,22 +255,25 @@
- File: {{story_file}} - File: {{story_file}}
- Status: ready-for-dev - Status: ready-for-dev
**Next Steps:** **What Was Created:**
1. Review the comprehensive story in {{story_file}} - ✅ Complete requirements analysis from epics/PRD/architecture
2. **Optional Quality Competition:** Run the scrum masters `*validate-create-story` to have a fresh LLM systematically review and - ✅ Acceptance criteria and success metrics
improve the story context - ✅ DRAFT implementation tasks (based on requirements)
3. Run dev agents `dev-story` for optimized implementation - ✅ Developer context and architecture guardrails
4. Run `code-review` when complete (auto-marks done)
**Quality Competition Option:** The `*validate-create-story` command runs the story context through an independent LLM in fresh **Next Steps:**
context that will: 1. Review the story in {{story_file}}
2. **Optional Quality Competition:** Run `*validate-create-story` to have a fresh LLM review and improve the story
3. Run `dev-story` - will perform gap analysis and refine tasks against actual codebase
4. Run `code-review` when implementation complete
**Note:** Tasks are DRAFT and will be validated against current codebase when dev-story runs.
**Quality Competition Option:** The `*validate-create-story` command runs the story through an independent LLM that will:
- Systematically re-analyze all source documents - Systematically re-analyze all source documents
- Identify any misses, omissions, or improvements - Identify any misses, omissions, or improvements
- Compete to create a more comprehensive story context
- Present findings interactively for your approval - Present findings interactively for your approval
- Apply improvements to create the ultimate developer implementation guide - Apply improvements to enhance the story before development
**The developer now has everything needed for flawless implementation!**
</output> </output>
</step> </step>

View File

@ -16,11 +16,19 @@ so that {{benefit}}.
## Tasks / Subtasks ## Tasks / Subtasks
⚠️ **DRAFT TASKS** - Generated from requirements analysis. Will be validated and refined against actual codebase when dev-story runs.
- [ ] Task 1 (AC: #) - [ ] Task 1 (AC: #)
- [ ] Subtask 1.1 - [ ] Subtask 1.1
- [ ] Task 2 (AC: #) - [ ] Task 2 (AC: #)
- [ ] Subtask 2.1 - [ ] Subtask 2.1
## Gap Analysis
_This section will be populated by dev-story when gap analysis runs._
---
## Dev Notes ## Dev Notes
- Relevant architecture patterns and constraints - Relevant architecture patterns and constraints

View File

@ -175,7 +175,8 @@
</step> </step>
<step n="2" goal="Load and analyze core artifacts"> <step n="2" goal="Load and analyze core artifacts">
<critical>🔬 EXHAUSTIVE ARTIFACT ANALYSIS - This is where you prevent future developer fuckups!</critical> <critical>📋 REQUIREMENTS ANALYSIS - Extract complete context for story planning</critical>
<note>🎯 Focus: Requirements, acceptance criteria, and dependencies. Gap analysis happens at dev-time.</note>
<!-- Load all available content through discovery protocol --> <!-- Load all available content through discovery protocol -->
<invoke-protocol <invoke-protocol
@ -198,18 +199,17 @@
all learnings that could impact current story implementation</action> all learnings that could impact current story implementation</action>
</check> </check>
<!-- Git intelligence for previous work patterns --> <!-- Git intelligence for previous work patterns (context only, not gap analysis) -->
<check <check
if="previous story exists AND git repository detected"> if="previous story exists AND git repository detected">
<action>Get last 5 commit titles to understand recent work patterns</action> <action>Get last 5 commit titles to understand recent work patterns</action>
<action>Analyze 1-5 most recent commits for relevance to current story: <action>Analyze 1-5 most recent commits for context:
- Files created/modified
- Code patterns and conventions used - Code patterns and conventions used
- Library dependencies added/changed - Library dependencies added/changed
- Architecture decisions implemented - Architecture decisions implemented
- Testing approaches used - Testing approaches used
</action> </action>
<action>Extract actionable insights for current story implementation</action> <note>This provides context for requirements, not codebase gap analysis (happens at dev-time)</note>
</check> </check>
</step> </step>
@ -234,30 +234,9 @@
<action>Identify any architectural decisions that override previous patterns</action> <action>Identify any architectural decisions that override previous patterns</action>
</step> </step>
<step n="4" goal="Web research for latest technical specifics"> <step n="4" goal="Create story file with draft implementation tasks">
<critical>🌐 ENSURE LATEST TECH KNOWLEDGE - Prevent outdated implementations!</critical> **WEB INTELLIGENCE:** <action>Identify specific <critical>📝 CREATE STORY FILE - Requirements foundation with draft tasks for dev-time validation</critical>
technical areas that require latest version knowledge:</action> <note>⚠️ Tasks generated here are DRAFT based on requirements analysis. They will be validated and refined against actual codebase at dev-time.</note>
<!-- Check for libraries/frameworks mentioned in architecture -->
<action>From architecture analysis, identify specific libraries, APIs, or
frameworks</action>
<action>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
</action>
**EXTERNAL CONTEXT INCLUSION:** <action>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
</action>
</step>
<step n="5" goal="Create comprehensive story file">
<critical>📝 CREATE ULTIMATE STORY FILE - The developer's master implementation guide!</critical>
<action>Initialize from template.md: <action>Initialize from template.md:
{default_output_file}</action> {default_output_file}</action>
@ -267,7 +246,7 @@
<template-output <template-output
file="{default_output_file}">story_requirements</template-output> file="{default_output_file}">story_requirements</template-output>
<!-- Developer context section - MOST IMPORTANT PART --> <!-- Developer context section -->
<template-output file="{default_output_file}"> <template-output file="{default_output_file}">
developer_context_section</template-output> **DEV AGENT GUARDRAILS:** <template-output file="{default_output_file}"> developer_context_section</template-output> **DEV AGENT GUARDRAILS:** <template-output file="{default_output_file}">
technical_requirements</template-output> technical_requirements</template-output>
@ -290,26 +269,26 @@
<template-output file="{default_output_file}">git_intelligence_summary</template-output> <template-output file="{default_output_file}">git_intelligence_summary</template-output>
</check> </check>
<!-- Latest technical specifics -->
<check if="web research completed">
<template-output file="{default_output_file}">latest_tech_information</template-output>
</check>
<!-- Project context reference --> <!-- Project context reference -->
<template-output <template-output
file="{default_output_file}">project_context_reference</template-output> file="{default_output_file}">project_context_reference</template-output>
<!-- DRAFT TASKS NOTATION -->
<action>Add clear notation to Tasks/Subtasks section:
"⚠️ DRAFT TASKS - Generated from requirements analysis.
Will be validated and refined against actual codebase when dev-story runs."
</action>
<!-- Final status update --> <!-- Final status update -->
<template-output file="{default_output_file}"> <template-output file="{default_output_file}">
story_completion_status</template-output> story_completion_status</template-output>
<!-- CRITICAL: Set status to ready-for-dev --> <!-- CRITICAL: Set status to ready-for-dev -->
<action>Set story Status to: "ready-for-dev"</action> <action>Set story Status to: "ready-for-dev"</action>
<action>Add completion note: "Ultimate <action>Add completion note: "Story planning complete with requirements analysis and draft implementation tasks"</action>
context engine analysis completed - comprehensive developer guide created"</action>
</step> </step>
<step n="6" goal="Update sprint status and finalize"> <step n="5" goal="Update sprint status and finalize">
<invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task> <invoke-task>Validate against checklist at {installed_path}/checklist.md using _bmad/core/tasks/validate-workflow.xml</invoke-task>
<action>Save story document unconditionally</action> <action>Save story document unconditionally</action>
@ -324,7 +303,7 @@
</check> </check>
<action>Report completion</action> <action>Report completion</action>
<output>**🎯 ULTIMATE BMad Method STORY CONTEXT CREATED, {user_name}!** <output>**🎯 BMad Method STORY CREATED, {user_name}!**
**Story Details:** **Story Details:**
- Story ID: {{story_id}} - Story ID: {{story_id}}
@ -332,12 +311,18 @@
- File: {{story_file}} - File: {{story_file}}
- Status: ready-for-dev - Status: ready-for-dev
**Next Steps:** **What Was Created:**
1. Review the comprehensive story in {{story_file}} - ✅ Complete requirements analysis from epics/PRD/architecture
2. Run dev agents `dev-story` for optimized implementation - ✅ Acceptance criteria and success metrics
3. Run `code-review` when complete (auto-marks done) - ✅ DRAFT implementation tasks (based on requirements)
- ✅ Developer context and architecture guardrails
**The developer now has everything needed for flawless implementation!** **Next Steps:**
1. Review the story in {{story_file}}
2. Run `dev-story` - will perform gap analysis and refine tasks against actual codebase
3. Run `code-review` when implementation complete
**Note:** Tasks are DRAFT and will be validated against current codebase when dev-story runs.
</output> </output>
</step> </step>

View File

@ -16,11 +16,19 @@ so that {{benefit}}.
## Tasks / Subtasks ## Tasks / Subtasks
⚠️ **DRAFT TASKS** - Generated from requirements analysis. Will be validated and refined against actual codebase when dev-story runs.
- [ ] Task 1 (AC: #) - [ ] Task 1 (AC: #)
- [ ] Subtask 1.1 - [ ] Subtask 1.1
- [ ] Task 2 (AC: #) - [ ] Task 2 (AC: #)
- [ ] Subtask 2.1 - [ ] Subtask 2.1
## Gap Analysis
_This section will be populated by dev-story when gap analysis runs._
---
## Dev Notes ## Dev Notes
- Relevant architecture patterns and constraints - Relevant architecture patterns and constraints