diff --git a/src/modules/bmm/agents/sm.agent.yaml b/src/modules/bmm/agents/sm.agent.yaml index 1199e828..d71aabcc 100644 --- a/src/modules/bmm/agents/sm.agent.yaml +++ b/src/modules/bmm/agents/sm.agent.yaml @@ -26,7 +26,7 @@ agent: description: Check workflow status and get recommendations - trigger: assess-project-ready - validate-workflow: "{project-root}/bmad/bmm/workflows/3-solutioning/workflow.yaml" + workflow: "{project-root}/bmad/bmm/workflows/3-solutioning/implementation-ready-check/workflow.yaml" description: Validate solutioning complete, ready for Phase 4 (Level 2-4 only) - trigger: create-story diff --git a/src/modules/bmm/workflows/1-analysis/workflow-init/instructions.md b/src/modules/bmm/workflows/1-analysis/workflow-init/instructions.md index e06508f0..474ed91a 100644 --- a/src/modules/bmm/workflows/1-analysis/workflow-init/instructions.md +++ b/src/modules/bmm/workflows/1-analysis/workflow-init/instructions.md @@ -154,10 +154,12 @@ Is that correct? (y/n or tell me what's different) phase_2_complete phase_3_complete phase_4_complete +ordered_story_list = "[]" todo_story todo_title in_progress_story in_progress_title +completed_story_list = "[]" backlog_count done_count total_stories diff --git a/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-1.yaml b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-1.yaml new file mode 100644 index 00000000..28946e12 --- /dev/null +++ b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-1.yaml @@ -0,0 +1,77 @@ +# Brownfield Level 1 - Small Feature in Existing Codebase +# 1-10 stories adding to existing system + +project_type: "software" +level: 1 +field_type: "brownfield" +description: "Small feature addition to existing codebase" + +phases: + - phase: 0 + name: "Documentation" + conditional: "if_undocumented" + workflows: + - id: "document-project" + required: true + agent: "analyst" + command: "document-project" + output: "Codebase documentation" + + - phase: 1 + name: "Analysis" + optional: true + workflows: + - id: "brainstorm-project" + optional: true + agent: "analyst" + command: "brainstorm-project" + - id: "research" + optional: true + agent: "analyst" + command: "research" + + - phase: 2 + name: "Planning" + required: true + workflows: + - id: "tech-spec" + required: true + agent: "architect" + command: "tech-spec" + output: "Creates story files for feature" + note: "Must integrate with existing architecture" + + - phase: 3 + name: "Solutioning" + skip: true + + - phase: 4 + name: "Implementation" + required: true + workflows: + - id: "create-story" + required: true + agent: "sm" + command: "create-story" + - id: "story-context" + required: true + agent: "sm" + command: "story-context" + note: "Include existing code context" + - id: "dev-story" + required: true + agent: "dev" + command: "dev-story" + - id: "review-story" + optional: true + agent: "dev" + command: "review-story" + - id: "story-approved" + required: true + agent: "dev" + command: "story-approved" + +story_naming: "story-.md" +story_example: "story-add-auth.md, story-update-dashboard.md" +max_stories: 10 +brownfield_note: "Ensure changes align with existing patterns and architecture" diff --git a/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-2.yaml b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-2.yaml new file mode 100644 index 00000000..ef877bb9 --- /dev/null +++ b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-2.yaml @@ -0,0 +1,95 @@ +# Brownfield Level 2 - Medium Project in Existing Codebase +# 5-15 stories, multiple features added to existing system + +project_type: "software" +level: 2 +field_type: "brownfield" +description: "Medium project adding multiple features to existing codebase" + +phases: + - phase: 0 + name: "Documentation" + conditional: "if_undocumented" + workflows: + - id: "document-project" + required: true + agent: "analyst" + command: "document-project" + output: "Codebase documentation" + + - phase: 1 + name: "Analysis" + optional: true + workflows: + - id: "brainstorm-project" + optional: true + agent: "analyst" + command: "brainstorm-project" + - id: "research" + optional: true + agent: "analyst" + command: "research" + - id: "product-brief" + optional: true + agent: "analyst" + command: "product-brief" + + - phase: 2 + name: "Planning" + required: true + workflows: + - id: "prd" + recommended: true + agent: "pm" + command: "prd" + output: "Focused PRD for new features" + note: "Must consider existing system constraints" + - id: "tech-spec" + required: true + agent: "architect" + command: "tech-spec" + output: "Creates multiple story files" + note: "Integrate with existing patterns" + - id: "ux-spec" + conditional: "if_has_ui" + agent: "pm" + command: "ux-spec" + + - phase: 3 + name: "Solutioning" + skip: true + + - phase: 4 + name: "Implementation" + required: true + workflows: + - id: "create-story" + required: true + agent: "sm" + command: "create-story" + - id: "story-context" + required: true + agent: "sm" + command: "story-context" + note: "Include existing code context" + - id: "validate-story-context" + optional: true + agent: "sm" + command: "validate-story-context" + - id: "dev-story" + required: true + agent: "dev" + command: "dev-story" + - id: "review-story" + recommended: true + agent: "dev" + command: "review-story" + - id: "story-approved" + required: true + agent: "dev" + command: "story-approved" + +story_naming: "story-.md" +story_example: "story-user-dashboard.md, story-api-integration.md" +max_stories: 15 +brownfield_note: "Balance new features with existing system stability" diff --git a/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-4.yaml b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-4.yaml new file mode 100644 index 00000000..69032f34 --- /dev/null +++ b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/brownfield-level-4.yaml @@ -0,0 +1,147 @@ +# Brownfield Level 4 - Enterprise Scale Changes to Existing System +# 40+ stories, major expansion of existing enterprise system + +project_type: "software" +level: 4 +field_type: "brownfield" +description: "Enterprise scale expansion of existing system" + +phases: + - phase: 0 + name: "Documentation" + conditional: "if_undocumented" + workflows: + - id: "document-project" + required: true + agent: "analyst" + command: "document-project" + output: "Comprehensive codebase documentation" + note: "Critical for enterprise-scale changes" + + - phase: 1 + name: "Analysis" + required: true + workflows: + - id: "brainstorm-project" + recommended: true + agent: "analyst" + command: "brainstorm-project" + - id: "research" + required: true + agent: "analyst" + command: "research" + note: "Research existing system architecture deeply" + - id: "product-brief" + required: true + agent: "analyst" + command: "product-brief" + note: "Strategic brief for major expansion" + - id: "impact-assessment" + recommended: true + agent: "analyst" + command: "impact-assessment" + note: "Assess impact on existing systems" + + - phase: 2 + name: "Planning" + required: true + workflows: + - id: "prd" + required: true + agent: "pm" + command: "prd" + output: "Comprehensive PRD considering existing system" + - id: "ux-spec" + required: true + agent: "pm" + command: "ux-spec" + note: "Multiple UI/UX specifications" + - id: "product-spec" + recommended: true + agent: "pm" + command: "product-spec" + note: "Detailed specifications for expansion" + - id: "migration-plan" + conditional: "if_breaking_changes" + agent: "architect" + command: "migration-plan" + + - phase: 3 + name: "Solutioning" + required: true + workflows: + - id: "solution-architecture" + required: true + agent: "architect" + command: "solution-architecture" + output: "Architecture for system expansion" + note: "Must maintain backward compatibility" + - id: "assess-project-ready" + required: true + agent: "sm" + command: "assess-project-ready" + note: "Critical validation before major changes" + + - phase: 4 + name: "Implementation" + required: true + epic_loop: "for_each_epic" + epic_workflows: + - id: "tech-spec" + required: true + agent: "architect" + command: "tech-spec" + note: "JIT per epic - creates stories considering existing code" + story_loop: "for_each_story_in_epic" + story_workflows: + - id: "create-story" + required: true + agent: "sm" + command: "create-story" + - id: "story-context" + required: true + agent: "sm" + command: "story-context" + note: "Extensive existing code context required" + - id: "validate-story-context" + required: true + agent: "sm" + command: "validate-story-context" + - id: "story-ready" + required: true + agent: "sm" + command: "story-ready" + - id: "dev-story" + required: true + agent: "dev" + command: "dev-story" + - id: "review-story" + required: true + agent: "dev" + command: "review-story" + note: "Rigorous review for enterprise changes" + - id: "correct-course" + conditional: "if_review_fails" + agent: "dev" + command: "correct-course" + - id: "integration-test" + required: true + agent: "dev" + command: "integration-test" + note: "Test integration with existing systems" + - id: "story-approved" + required: true + agent: "dev" + command: "story-approved" + epic_completion: + - id: "retrospective" + required: true + agent: "pm" + command: "retrospective" + note: "Critical for enterprise-scale learning" + +story_naming: "story-..md" +story_example: "story-1.1.md, story-2.3.md" +epic_structure: "JIT tech-specs per epic create stories" +enterprise_note: "Maintain system stability while implementing major changes" +brownfield_note: "Extensive regression testing and backward compatibility required" diff --git a/src/modules/bmm/workflows/1-analysis/workflow-status/paths/greenfield-level-4.yaml b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/greenfield-level-4.yaml new file mode 100644 index 00000000..26b1d08c --- /dev/null +++ b/src/modules/bmm/workflows/1-analysis/workflow-status/paths/greenfield-level-4.yaml @@ -0,0 +1,118 @@ +# Greenfield Level 4 - Enterprise Scale +# Multiple products, enterprise architecture, 40+ stories + +project_type: "software" +level: 4 +field_type: "greenfield" +description: "Enterprise scale - multiple products, enterprise architecture" + +phases: + - phase: 1 + name: "Analysis" + required: true + workflows: + - id: "brainstorm-project" + recommended: true + agent: "analyst" + command: "brainstorm-project" + - id: "research" + required: true + agent: "analyst" + command: "research" + note: "Extensive research across multiple domains" + - id: "product-brief" + required: true + agent: "analyst" + command: "product-brief" + note: "Strategic brief for enterprise scope" + + - phase: 2 + name: "Planning" + required: true + workflows: + - id: "prd" + required: true + agent: "pm" + command: "prd" + output: "Comprehensive product requirements document" + - id: "ux-spec" + required: true + agent: "pm" + command: "ux-spec" + note: "Multiple UI/UX specifications needed" + - id: "product-spec" + recommended: true + agent: "pm" + command: "product-spec" + note: "Detailed product specifications" + + - phase: 3 + name: "Solutioning" + required: true + workflows: + - id: "solution-architecture" + required: true + agent: "architect" + command: "solution-architecture" + output: "Enterprise architecture documentation" + - id: "assess-project-ready" + required: true + agent: "sm" + command: "assess-project-ready" + note: "Critical validation before enterprise implementation" + + - phase: 4 + name: "Implementation" + required: true + epic_loop: "for_each_epic" + epic_workflows: + - id: "tech-spec" + required: true + agent: "architect" + command: "tech-spec" + note: "JIT per epic - creates stories for that epic" + story_loop: "for_each_story_in_epic" + story_workflows: + - id: "create-story" + required: true + agent: "sm" + command: "create-story" + - id: "story-context" + required: true + agent: "sm" + command: "story-context" + - id: "validate-story-context" + required: true + agent: "sm" + command: "validate-story-context" + - id: "story-ready" + recommended: true + agent: "sm" + command: "story-ready" + - id: "dev-story" + required: true + agent: "dev" + command: "dev-story" + - id: "review-story" + required: true + agent: "dev" + command: "review-story" + - id: "correct-course" + conditional: "if_review_fails" + agent: "dev" + command: "correct-course" + - id: "story-approved" + required: true + agent: "dev" + command: "story-approved" + epic_completion: + - id: "retrospective" + required: true + agent: "pm" + command: "retrospective" + note: "Critical for enterprise-scale learning" + +story_naming: "story-..md" +story_example: "story-1.1.md, story-2.3.md" +epic_structure: "JIT tech-specs per epic create stories" +enterprise_note: "Rigorous validation and reviews required at scale" diff --git a/src/modules/bmm/workflows/1-analysis/workflow-status/workflow-status-template.md b/src/modules/bmm/workflows/1-analysis/workflow-status/workflow-status-template.md index 15bc4c61..be2d57f0 100644 --- a/src/modules/bmm/workflows/1-analysis/workflow-status/workflow-status-template.md +++ b/src/modules/bmm/workflows/1-analysis/workflow-status/workflow-status-template.md @@ -21,13 +21,12 @@ PHASE_4_COMPLETE: {{phase_4_complete}} ## Development Queue +STORIES_SEQUENCE: {{ordered_story_list}} TODO_STORY: {{todo_story}} TODO_TITLE: {{todo_title}} IN_PROGRESS_STORY: {{in_progress_story}} IN_PROGRESS_TITLE: {{in_progress_title}} -BACKLOG_COUNT: {{backlog_count}} -DONE_COUNT: {{done_count}} -TOTAL_STORIES: {{total_stories}} +STORIES_DONE: {{completed_story_list}} ## Next Action diff --git a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md index ffeabbfc..44a6688a 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md +++ b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md @@ -109,6 +109,15 @@ - Check "2-Plan" checkbox in Phase Completion Status - Set progress_percentage = 40% (planning complete, skipping solutioning) +Update Development Queue section: + +- Set STORIES_SEQUENCE = "[{slug}]" (Level 0 has single story) +- Set TODO_STORY = "{slug}" +- Set TODO_TITLE = "{{story_title}}" +- Set IN_PROGRESS_STORY = "" +- Set IN_PROGRESS_TITLE = "" +- Set STORIES_DONE = "[]" + Initialize Phase 4 Implementation Progress section: #### BACKLOG (Not Yet Drafted) diff --git a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md index 2ba1eaf8..c9a09667 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md +++ b/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md @@ -205,6 +205,22 @@ Epic: Icon Reliability - Check "2-Plan" checkbox in Phase Completion Status - Set progress_percentage = 40% (planning complete, skipping solutioning) +Update Development Queue section: + +Generate story sequence list based on story_count: +{{#if story_count == 2}} + +- Set STORIES_SEQUENCE = "[{epic_slug}-1, {epic_slug}-2]" + {{/if}} + {{#if story_count == 3}} +- Set STORIES_SEQUENCE = "[{epic_slug}-1, {epic_slug}-2, {epic_slug}-3]" + {{/if}} +- Set TODO_STORY = "{epic_slug}-1" +- Set TODO_TITLE = "{{story_1_title}}" +- Set IN_PROGRESS_STORY = "" +- Set IN_PROGRESS_TITLE = "" +- Set STORIES_DONE = "[]" + Populate story backlog in "### Implementation Progress (Phase 4 Only)" section: #### BACKLOG (Not Yet Drafted)