From bacbcc3487559af559a83623d81f97144b96053f Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Tue, 27 Jan 2026 03:29:47 -0500 Subject: [PATCH] feat(workflows): add greenfield create-story workflow Add /bmad_bmm_create-story workflow for net-new features with zero existing implementation. Separates greenfield story generation (fast, no codebase scanning) from brownfield gap analysis workflow. Changes: - Create workflow files in src/modules/bmm and src/bmm locations - Update module-help.csv with both workflow entries - Clarify create-story vs create-story-with-gap-analysis usage - Bump version to 6.1.0-Beta.3 Greenfield workflow skips codebase scanning and marks all tasks incomplete, saving time and tokens for net-new feature development. --- package.json | 2 +- src/bmm/module-help.csv | 3 +- .../4-implementation/create-story/workflow.md | 270 ++++++++++++++++++ .../create-story/workflow.yaml | 33 +++ .../4-implementation/create-story/workflow.md | 270 ++++++++++++++++++ .../create-story/workflow.yaml | 33 +++ 6 files changed, 609 insertions(+), 2 deletions(-) create mode 100644 src/bmm/workflows/4-implementation/create-story/workflow.md create mode 100644 src/bmm/workflows/4-implementation/create-story/workflow.yaml create mode 100644 src/modules/bmm/workflows/4-implementation/create-story/workflow.md create mode 100644 src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml diff --git a/package.json b/package.json index fe8821bf..982066a2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@jonahschulte/bmad-method", - "version": "6.1.0-Beta.2", + "version": "6.1.0-Beta.3", "description": "Breakthrough Method of Agile AI-driven Development (Enhanced with TDD, intelligent multi-agent review, and production-hardened enforcement)", "keywords": [ "agile", diff --git a/src/bmm/module-help.csv b/src/bmm/module-help.csv index 323cd77d..6ea9f679 100644 --- a/src/bmm/module-help.csv +++ b/src/bmm/module-help.csv @@ -25,7 +25,8 @@ bmm,3-solutioning,Test Design,TD,50,_bmad/bmm/workflows/testarch/test-design/wor 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.yaml,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.yaml,bmad_bmm_sprint-status,false,sm,Create Mode,"Anytime: Summarize sprint status and route to next workflow",,, -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,Create Story,CS,30,_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml,bmad_bmm_create-story,true,sm,Create Mode,"Story cycle start: Create greenfield story for net-new features with zero existing implementation (no codebase scanning). 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,Create Story with Gap Analysis,CSG,32,_bmad/bmm/workflows/4-implementation/create-story-with-gap-analysis/workflow.yaml,bmad_bmm_create-story-with-gap-analysis,false,sm,Create Mode,"Regenerate story with VERIFIED codebase gap analysis - for brownfield stories with potential existing implementation. Uses Glob/Read tools to verify what exists.",implementation_artifacts,story, 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,Dev Story,DS,40,_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml,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.yaml,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",,, 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 00000000..dc7b74b9 --- /dev/null +++ b/src/bmm/workflows/4-implementation/create-story/workflow.md @@ -0,0 +1,270 @@ +# Create Story v3.0 - Greenfield Story Generation + + +Generate story for net-new features with zero existing implementation. +No codebase scanning—all tasks assumed incomplete (greenfield). +Focused on clear requirements and implementation guidance. + + + +**Fast Story Generation for New Features** + +1. Load PRD, epic, and architecture context +2. Generate clear user story with acceptance criteria +3. All tasks marked incomplete (greenfield assumption) +4. No codebase scanning—saves time for net-new work +5. Ready for immediate implementation + + + +name: create-story +version: 3.0.0 + +task_status: + incomplete: "[ ]" # All tasks for greenfield stories + +defaults: + update_sprint_status: true + create_report: false + + + +@patterns/verification.md +@patterns/hospital-grade.md + + + + + +**Identify story and load context** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +📝 GREENFIELD STORY GENERATION +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**Ask user for story:** +``` +Which story should I create? + +Provide: +- Story number (e.g., "1.9" or "1-9") +- OR epic number and story description + +Your choice: +``` + +**Parse input:** +- Extract epic_num, story_num +- Determine story file path + +**Load epic context:** +```bash +Read: {{planning_artifacts}}/epics.md +``` + +Extract: +- Epic business objectives +- Technical constraints +- Dependencies + +**Load architecture context (if exists):** +```bash +Read: {{planning_artifacts}}/architecture.md +``` + +Extract: +- Technical architecture patterns +- Technology stack +- Integration patterns + +**Load PRD context:** +```bash +Read: {{planning_artifacts}}/prd.md +``` + +Extract relevant sections: +- User personas +- Feature requirements +- Non-functional requirements + +``` +✅ Context Loaded + +Story: {{epic_num}}.{{story_num}} +Epic: {{epic_title}} +Architecture: {{architecture_notes}} + +[C] Continue to Story Generation +``` + + + +**Generate greenfield story** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +📝 GENERATING STORY +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**Story structure:** +All tasks marked `[ ]` (incomplete) since this is greenfield. + +**Write story file:** +```bash +Write: {{story_dir}}/story-{{epic_num}}.{{story_num}}.md +``` + +**Story template:** +```markdown +# Story {{epic_num}}.{{story_num}}: {{title}} + +## 📊 Metadata +- **Epic**: {{epic_num}} - {{epic_title}} +- **Priority**: {{priority}} +- **Estimate**: {{estimate}} +- **Dependencies**: {{dependencies}} +- **Created**: {{date}} + +## 📖 User Story +As a {{persona}} +I want {{capability}} +So that {{benefit}} + +## ✅ Acceptance Criteria +1. **{{criterion_1}}** + - {{detail_1a}} + - {{detail_1b}} + +2. **{{criterion_2}}** + - {{detail_2a}} + - {{detail_2b}} + +## 🔨 Implementation Tasks +### Frontend +- [ ] {{frontend_task_1}} +- [ ] {{frontend_task_2}} + +### Backend +- [ ] {{backend_task_1}} +- [ ] {{backend_task_2}} + +### Testing +- [ ] {{testing_task_1}} +- [ ] {{testing_task_2}} + +## 📋 Technical Notes +### Architecture +{{architecture_guidance}} + +### Dependencies +{{dependency_notes}} + +### API Contracts +{{api_contract_notes}} + +## 🧪 Testing Strategy +### Unit Tests +{{unit_test_strategy}} + +### Integration Tests +{{integration_test_strategy}} + +### E2E Tests +{{e2e_test_strategy}} + +## 🎯 Definition of Done +- [ ] All acceptance criteria met +- [ ] Unit tests written and passing +- [ ] Integration tests written and passing +- [ ] Code reviewed and approved +- [ ] Documentation updated +- [ ] Deployed to staging environment +- [ ] Product owner acceptance + +## 📝 Dev Notes +{{additional_context}} +``` + +**Validate generated story:** +```bash +# Check 7 sections exist +grep "^## " {{story_file}} | wc -l +# Should be 7 or more + +# Check metadata section exists +grep "## 📊 Metadata" {{story_file}} +``` + + + +**Update sprint-status.yaml** + +```bash +Read: {{sprint_status}} + +# Add story to sprint status with "ready-for-dev" status +# Preserve comments and structure + +Write: {{sprint_status}} +``` + + + +**Report completion** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +✅ GREENFIELD STORY CREATED +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Story: {{epic_num}}.{{story_num}} - {{title}} +File: {{story_file}} +Sections: 7/7 ✅ + +All tasks marked incomplete (greenfield). +Ready for implementation. + +Next Steps: +1. Review story for accuracy +2. Use /story-pipeline or /super-dev-pipeline to implement +3. All context loaded and ready + +[N] Create next story +[Q] Quit +[R] Review generated story +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**If [N]:** Loop back to initialize with next story. +**If [R]:** Display story content, then show menu. + + + + + +```bash +# Create new greenfield story +/create-story +> Which story? 20.1 + +# With explicit story number +/create-story epic=20 story=1 +``` + + + +**Epic not found:** HALT with clear error. +**PRD not found:** Warn but continue with available context. +**Architecture doc not found:** Warn but continue with epic context. +**Write fails:** Report error, display generated content. + + + +- [ ] Epic and PRD context loaded +- [ ] Story generated with all 7+ sections +- [ ] All tasks marked incomplete (greenfield) +- [ ] Story written to correct path +- [ ] Sprint status updated (if enabled) + diff --git a/src/bmm/workflows/4-implementation/create-story/workflow.yaml b/src/bmm/workflows/4-implementation/create-story/workflow.yaml new file mode 100644 index 00000000..5cce162d --- /dev/null +++ b/src/bmm/workflows/4-implementation/create-story/workflow.yaml @@ -0,0 +1,33 @@ +name: create-story +description: "Create story for greenfield features with zero existing implementation (no codebase scanning)" +author: "Jonah Schulte" + +# Critical variables from config +config_source: "{project-root}/_bmad/bmm/config.yaml" +user_name: "{config_source}:user_name" +communication_language: "{config_source}:communication_language" +date: system-generated +planning_artifacts: "{config_source}:planning_artifacts" +implementation_artifacts: "{config_source}:implementation_artifacts" +output_folder: "{implementation_artifacts}" +story_dir: "{implementation_artifacts}" + +# Workflow components +installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story" +instructions: "{installed_path}/workflow.md" + +# Variables +variables: + 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" + +# Project context +project_context: "**/project-context.md" + +default_output_file: "{story_dir}/{{story_key}}.md" + +standalone: true + +web_bundle: false diff --git a/src/modules/bmm/workflows/4-implementation/create-story/workflow.md b/src/modules/bmm/workflows/4-implementation/create-story/workflow.md new file mode 100644 index 00000000..dc7b74b9 --- /dev/null +++ b/src/modules/bmm/workflows/4-implementation/create-story/workflow.md @@ -0,0 +1,270 @@ +# Create Story v3.0 - Greenfield Story Generation + + +Generate story for net-new features with zero existing implementation. +No codebase scanning—all tasks assumed incomplete (greenfield). +Focused on clear requirements and implementation guidance. + + + +**Fast Story Generation for New Features** + +1. Load PRD, epic, and architecture context +2. Generate clear user story with acceptance criteria +3. All tasks marked incomplete (greenfield assumption) +4. No codebase scanning—saves time for net-new work +5. Ready for immediate implementation + + + +name: create-story +version: 3.0.0 + +task_status: + incomplete: "[ ]" # All tasks for greenfield stories + +defaults: + update_sprint_status: true + create_report: false + + + +@patterns/verification.md +@patterns/hospital-grade.md + + + + + +**Identify story and load context** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +📝 GREENFIELD STORY GENERATION +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**Ask user for story:** +``` +Which story should I create? + +Provide: +- Story number (e.g., "1.9" or "1-9") +- OR epic number and story description + +Your choice: +``` + +**Parse input:** +- Extract epic_num, story_num +- Determine story file path + +**Load epic context:** +```bash +Read: {{planning_artifacts}}/epics.md +``` + +Extract: +- Epic business objectives +- Technical constraints +- Dependencies + +**Load architecture context (if exists):** +```bash +Read: {{planning_artifacts}}/architecture.md +``` + +Extract: +- Technical architecture patterns +- Technology stack +- Integration patterns + +**Load PRD context:** +```bash +Read: {{planning_artifacts}}/prd.md +``` + +Extract relevant sections: +- User personas +- Feature requirements +- Non-functional requirements + +``` +✅ Context Loaded + +Story: {{epic_num}}.{{story_num}} +Epic: {{epic_title}} +Architecture: {{architecture_notes}} + +[C] Continue to Story Generation +``` + + + +**Generate greenfield story** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +📝 GENERATING STORY +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**Story structure:** +All tasks marked `[ ]` (incomplete) since this is greenfield. + +**Write story file:** +```bash +Write: {{story_dir}}/story-{{epic_num}}.{{story_num}}.md +``` + +**Story template:** +```markdown +# Story {{epic_num}}.{{story_num}}: {{title}} + +## 📊 Metadata +- **Epic**: {{epic_num}} - {{epic_title}} +- **Priority**: {{priority}} +- **Estimate**: {{estimate}} +- **Dependencies**: {{dependencies}} +- **Created**: {{date}} + +## 📖 User Story +As a {{persona}} +I want {{capability}} +So that {{benefit}} + +## ✅ Acceptance Criteria +1. **{{criterion_1}}** + - {{detail_1a}} + - {{detail_1b}} + +2. **{{criterion_2}}** + - {{detail_2a}} + - {{detail_2b}} + +## 🔨 Implementation Tasks +### Frontend +- [ ] {{frontend_task_1}} +- [ ] {{frontend_task_2}} + +### Backend +- [ ] {{backend_task_1}} +- [ ] {{backend_task_2}} + +### Testing +- [ ] {{testing_task_1}} +- [ ] {{testing_task_2}} + +## 📋 Technical Notes +### Architecture +{{architecture_guidance}} + +### Dependencies +{{dependency_notes}} + +### API Contracts +{{api_contract_notes}} + +## 🧪 Testing Strategy +### Unit Tests +{{unit_test_strategy}} + +### Integration Tests +{{integration_test_strategy}} + +### E2E Tests +{{e2e_test_strategy}} + +## 🎯 Definition of Done +- [ ] All acceptance criteria met +- [ ] Unit tests written and passing +- [ ] Integration tests written and passing +- [ ] Code reviewed and approved +- [ ] Documentation updated +- [ ] Deployed to staging environment +- [ ] Product owner acceptance + +## 📝 Dev Notes +{{additional_context}} +``` + +**Validate generated story:** +```bash +# Check 7 sections exist +grep "^## " {{story_file}} | wc -l +# Should be 7 or more + +# Check metadata section exists +grep "## 📊 Metadata" {{story_file}} +``` + + + +**Update sprint-status.yaml** + +```bash +Read: {{sprint_status}} + +# Add story to sprint status with "ready-for-dev" status +# Preserve comments and structure + +Write: {{sprint_status}} +``` + + + +**Report completion** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +✅ GREENFIELD STORY CREATED +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +Story: {{epic_num}}.{{story_num}} - {{title}} +File: {{story_file}} +Sections: 7/7 ✅ + +All tasks marked incomplete (greenfield). +Ready for implementation. + +Next Steps: +1. Review story for accuracy +2. Use /story-pipeline or /super-dev-pipeline to implement +3. All context loaded and ready + +[N] Create next story +[Q] Quit +[R] Review generated story +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +``` + +**If [N]:** Loop back to initialize with next story. +**If [R]:** Display story content, then show menu. + + + + + +```bash +# Create new greenfield story +/create-story +> Which story? 20.1 + +# With explicit story number +/create-story epic=20 story=1 +``` + + + +**Epic not found:** HALT with clear error. +**PRD not found:** Warn but continue with available context. +**Architecture doc not found:** Warn but continue with epic context. +**Write fails:** Report error, display generated content. + + + +- [ ] Epic and PRD context loaded +- [ ] Story generated with all 7+ sections +- [ ] All tasks marked incomplete (greenfield) +- [ ] Story written to correct path +- [ ] Sprint status updated (if enabled) + diff --git a/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml b/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml new file mode 100644 index 00000000..5cce162d --- /dev/null +++ b/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml @@ -0,0 +1,33 @@ +name: create-story +description: "Create story for greenfield features with zero existing implementation (no codebase scanning)" +author: "Jonah Schulte" + +# Critical variables from config +config_source: "{project-root}/_bmad/bmm/config.yaml" +user_name: "{config_source}:user_name" +communication_language: "{config_source}:communication_language" +date: system-generated +planning_artifacts: "{config_source}:planning_artifacts" +implementation_artifacts: "{config_source}:implementation_artifacts" +output_folder: "{implementation_artifacts}" +story_dir: "{implementation_artifacts}" + +# Workflow components +installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/create-story" +instructions: "{installed_path}/workflow.md" + +# Variables +variables: + 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" + +# Project context +project_context: "**/project-context.md" + +default_output_file: "{story_dir}/{{story_key}}.md" + +standalone: true + +web_bundle: false