workflow level 0 and 1 aligned with brownfield and quick dev

This commit is contained in:
Brian Madison
2025-10-12 15:53:24 -05:00
parent 1b7a3b396f
commit e61d58d480
83 changed files with 11995 additions and 73 deletions

View File

@@ -87,12 +87,55 @@ Select an option or describe your needs:
**2. Project Context:**
a. New project (greenfield)
b. Adding to existing clean codebase
c. Working with messy/legacy code (needs refactoring)
b. Adding to existing clean codebase (brownfield - well documented)
c. Working with messy/legacy code (brownfield - needs documentation)
**3. What are you building?** (brief description)
</ask>
<action>Capture field_type = "greenfield" or "brownfield"</action>
<check if='field_type == "brownfield" AND (project_context == "c" OR project_context == "Working with messy/legacy code")'>
<action>Check for {project-root}/docs/index.ts or {project-root}/docs/index.md</action>
<check if="not exists">
<ask>This brownfield project needs codebase documentation for effective planning.
**Documentation Status:** No index.ts or index.md found in docs/
**Options:**
1. Generate docs now (run document-project workflow - ~10-15 min, recommended)
2. I'll provide context through questions during planning
3. Continue anyway (may need more context later during implementation)
**Recommendation for Level 0-1:** Option 1 or 2 ensures faster, more accurate planning
Choose option (1-3):</ask>
<check if='option == "1"'>
<action>Set needs_documentation = true</action>
<action>Will invoke document-project after assessment</action>
</check>
<check if='option == "2"'>
<action>Set gather_context_via_questions = true</action>
<action>Will ask detailed questions during tech-spec generation</action>
</check>
<check if='option == "3"'>
<action>Set proceed_without_docs = true</action>
<action>Note: May require additional context gathering during implementation</action>
</check>
</check>
<check if="exists">
<action>Set has_documentation = true</action>
<action>Will reference docs/index.ts during planning</action>
</check>
</check>
<action>Detect if project_type == "game"</action>
<check if='project_type == "game"'>
@@ -150,11 +193,23 @@ Examples:
</step>
<step n="4a" goal="Run document-project if needed" optional="true">
<check if="needs_documentation == true">
<action>Invoke document-project workflow before continuing with planning</action>
<invoke-workflow>{project-root}/bmad/bmm/workflows/1-analysis/document-project/workflow.yaml</invoke-workflow>
<action>Wait for documentation to complete</action>
<action>Verify docs/index.ts or docs/index.md was created</action>
</check>
</step>
<step n="5" goal="Create workflow analysis document">
<action>Initialize analysis using analysis_template from workflow.yaml</action>
<critical>Capture any technical preferences mentioned during assessment</critical>
<critical>Initialize Workflow Status Tracker with current state</critical>
Generate comprehensive analysis with all assessment data.
@@ -175,6 +230,38 @@ Generate comprehensive analysis with all assessment data.
<template-output file="project-workflow-analysis.md">special_notes</template-output>
<template-output file="project-workflow-analysis.md">technical_preferences</template-output>
<action>Initialize Workflow Status Tracker section:</action>
<template-output file="project-workflow-analysis.md">current_phase</template-output>
Set to: "2-Plan"
<template-output file="project-workflow-analysis.md">current_workflow</template-output>
<check if="Level 0">Set to: "tech-spec (Level 0 - starting)"</check>
<check if="Level 1">Set to: "tech-spec (Level 1 - starting)"</check>
<check if="Level 2+">Set to: "PRD (Level {{project_level}} - starting)"</check>
<template-output file="project-workflow-analysis.md">progress_percentage</template-output>
Set to: 10% (assessment complete)
<template-output file="project-workflow-analysis.md">artifacts_table</template-output>
Initialize with:
```
| project-workflow-analysis.md | Complete | {output_folder}/project-workflow-analysis.md | {{date}} |
```
<template-output file="project-workflow-analysis.md">next_action</template-output>
<check if="Level 0">Set to: "Generate technical specification and single user story"</check>
<check if="Level 1">Set to: "Generate technical specification and epic/stories (2-3 stories)"</check>
<check if="Level 2+">Set to: "Generate PRD and epic breakdown"</check>
<template-output file="project-workflow-analysis.md">decisions_log</template-output>
Add first entry:
```
- **{{date}}**: Project assessment completed. Classified as Level {{project_level}} {{field_type}} project. Routing to {{instruction_set}} workflow.
```
</step>
<step n="6" goal="Load appropriate instruction set and handle continuation">
@@ -188,9 +275,17 @@ Generate comprehensive analysis with all assessment data.
<check if="Level 0">
<invoke-workflow>{installed_path}/tech-spec/workflow.yaml</invoke-workflow>
<action>Pass level=0 to tech-spec workflow</action>
<action>Tech-spec workflow will generate user-story.md after tech-spec completion</action>
</check>
<check if="Level 1-2">
<check if="Level 1">
<invoke-workflow>{installed_path}/tech-spec/workflow.yaml</invoke-workflow>
<action>Pass level=1 to tech-spec workflow</action>
<action>Tech-spec workflow will generate epic-stories.md after tech-spec completion</action>
</check>
<check if="Level 2">
<invoke-workflow>{installed_path}/prd/workflow.yaml</invoke-workflow>
<action>Pass level context to PRD workflow (loads instructions-med.md)</action>
</check>

View File

@@ -1,53 +0,0 @@
# Project Workflow Analysis
**Date:** {{date}}
**Project:** {{project_name}}
**Analyst:** {{user_name}}
## Assessment Results
### Project Classification
- **Project Type:** {{project_type}}
- **Project Level:** {{project_level}}
- **Instruction Set:** {{instruction_set}}
### Scope Summary
- **Brief Description:** {{scope_description}}
- **Estimated Stories:** {{story_count}}
- **Estimated Epics:** {{epic_count}}
- **Timeline:** {{timeline}}
### Context
- **Greenfield/Brownfield:** {{field_type}}
- **Existing Documentation:** {{existing_docs}}
- **Team Size:** {{team_size}}
- **Deployment Intent:** {{deployment_intent}}
## Recommended Workflow Path
### Primary Outputs
{{expected_outputs}}
### Workflow Sequence
{{workflow_steps}}
### Next Actions
{{next_steps}}
## Special Considerations
{{special_notes}}
## Technical Preferences Captured
{{technical_preferences}}
---
_This analysis serves as the routing decision for the adaptive PRD workflow and will be referenced by future orchestration workflows._

View File

@@ -19,7 +19,7 @@ instructions_lg: "{installed_path}/instructions-lg.md" # Level 3-4
# Templates
prd_template: "{installed_path}/prd-template.md"
analysis_template: "{installed_path}/analysis-template.md"
analysis_template: "{project-root}/bmad/bmm/workflows/_shared/project-workflow-analysis-template.md"
epics_template: "{installed_path}/epics-template.md"
# Output configuration
@@ -74,7 +74,7 @@ web_bundle:
- "bmad/bmm/workflows/2-plan/prd/instructions-med.md"
- "bmad/bmm/workflows/2-plan/prd/instructions-lg.md"
- "bmad/bmm/workflows/2-plan/prd/prd-template.md"
- "bmad/bmm/workflows/2-plan/prd/analysis-template.md"
- "bmad/bmm/workflows/_shared/project-workflow-analysis-template.md"
- "bmad/bmm/workflows/2-plan/prd/epics-template.md"
# Scale parameters - adaptive by project level
scale_parameters:

View File

@@ -0,0 +1,123 @@
# Epic and User Stories - Level 1
**Project:** {{project_name}}
**Level:** Level 1 (Coherent Feature)
**Date:** {{date}}
**Author:** {{user_name}}
---
## Epic Overview
### Epic: {{epic_title}}
**Goal:** {{epic_goal}}
**Scope:** {{epic_scope}}
**Success Criteria:**
{{epic_success_criteria}}
**Dependencies:** {{epic_dependencies}}
**Story Count:** {{story_count}} ({{total_points}} points)
---
## Story Files Generated
This workflow generates {{story_count}} story files in the following format:
- `story-{{story_slug}}-1.md`
- `story-{{story_slug}}-2.md`
- `story-{{story_slug}}-3.md` (if applicable)
**Location:** `{{dev_story_location}}/`
**Next Steps:**
1. Run story-context workflow on story 1
2. Run dev-story workflow to implement story 1
3. Repeat for stories 2, 3, etc.
---
## Story Summaries
### Story 1: {{story_1_title}}
**File:** `story-{{story_slug}}-1.md`
**User Story:**
As a {{story_1_role}}, I want {{story_1_capability}}, so that {{story_1_benefit}}.
**Acceptance Criteria Summary:**
{{story_1_acceptance_summary}}
**Story Points:** {{story_1_points}}
**Dependencies:** {{story_1_dependencies}}
---
### Story 2: {{story_2_title}}
**File:** `story-{{story_slug}}-2.md`
**User Story:**
As a {{story_2_role}}, I want {{story_2_capability}}, so that {{story_2_benefit}}.
**Acceptance Criteria Summary:**
{{story_2_acceptance_summary}}
**Story Points:** {{story_2_points}}
**Dependencies:** {{story_2_dependencies}}
---
### Story 3: {{story_3_title}} (if applicable)
**File:** `story-{{story_slug}}-3.md`
**User Story:**
As a {{story_3_role}}, I want {{story_3_capability}}, so that {{story_3_benefit}}.
**Acceptance Criteria Summary:**
{{story_3_acceptance_summary}}
**Story Points:** {{story_3_points}}
**Dependencies:** {{story_3_dependencies}}
---
## Story Map
```
Epic: {{epic_title}}
├── Story 1: {{story_1_title}} ({{story_1_points}} points)
├── Story 2: {{story_2_title}} ({{story_2_points}} points)
└── Story 3: {{story_3_title}} ({{story_3_points}} points) [if applicable]
```
**Total Story Points:** {{total_points}}
**Estimated Timeline:** {{estimated_timeline}}
---
## Implementation Sequence
{{implementation_sequence}}
---
## Technical References
- **Tech Spec:** `{{output_folder}}/tech-spec.md` - Technical source of truth
- **Architecture:** {{architecture_files}}
---
_Generated as part of Level 1 Tech Spec workflow (BMad Method v6)_
_This is a summary document. Actual story files are generated in `{{dev_story_location}}/`_

View File

@@ -0,0 +1,179 @@
# Level 0 - Minimal User Story Generation
<workflow>
<critical>This generates a single user story for Level 0 atomic changes</critical>
<critical>Level 0 = single file change, bug fix, or small isolated task</critical>
<critical>This workflow runs AFTER tech-spec.md has been completed</critical>
<critical>Output format MUST match create-story template for compatibility with story-context and dev-story workflows</critical>
<step n="1" goal="Load tech spec and extract the change">
<action>Read the completed tech-spec.md file from {output_folder}/tech-spec.md</action>
<action>Load project-workflow-analysis.md from {output_folder}/project-workflow-analysis.md</action>
<action>Extract dev_story_location from config (where stories are stored)</action>
<action>Extract the problem statement from "Technical Approach" section</action>
<action>Extract the scope from "Source Tree Structure" section</action>
<action>Extract time estimate from "Implementation Guide" or technical details</action>
<action>Extract acceptance criteria from "Testing Approach" section</action>
</step>
<step n="2" goal="Generate story slug and filename">
<action>Derive a short URL-friendly slug from the feature/change name</action>
<action>Max slug length: 3-5 words, kebab-case format</action>
<example>
- "Migrate JS Library Icons" → "icon-migration"
- "Fix Login Validation Bug" → "login-fix"
- "Add OAuth Integration" → "oauth-integration"
</example>
<action>Set story_filename = "story-{slug}.md"</action>
<action>Set story_path = "{dev_story_location}/story-{slug}.md"</action>
</step>
<step n="3" goal="Create user story in standard format">
<action>Create 1 story that describes the technical change as a deliverable</action>
<action>Story MUST use create-story template format for compatibility</action>
<guidelines>
**Story Point Estimation:**
- 1 point = < 1 day (2-4 hours)
- 2 points = 1-2 days
- 3 points = 2-3 days
- 5 points = 3-5 days (if this high, question if truly Level 0)
**Story Title Best Practices:**
- Use active, user-focused language
- Describe WHAT is delivered, not HOW
- Good: "Icon Migration to Internal CDN"
- Bad: "Run curl commands to download PNGs"
**Story Description Format:**
- As a [role] (developer, user, admin, etc.)
- I want [capability/change]
- So that [benefit/value]
**Acceptance Criteria:**
- Extract from tech-spec "Testing Approach" section
- Must be specific, measurable, and testable
- Include performance criteria if specified
**Tasks/Subtasks:**
- Map directly to tech-spec "Implementation Guide" tasks
- Use checkboxes for tracking
- Reference AC numbers: (AC: #1), (AC: #2)
- Include explicit testing subtasks
**Dev Notes:**
- Extract technical constraints from tech-spec
- Include file paths from "Source Tree Structure"
- Reference architecture patterns if applicable
- Cite tech-spec sections for implementation details
</guidelines>
<action>Initialize story file using user_story_template</action>
<template-output file="{story_path}">story_title</template-output>
<template-output file="{story_path}">role</template-output>
<template-output file="{story_path}">capability</template-output>
<template-output file="{story_path}">benefit</template-output>
<template-output file="{story_path}">acceptance_criteria</template-output>
<template-output file="{story_path}">tasks_subtasks</template-output>
<template-output file="{story_path}">technical_summary</template-output>
<template-output file="{story_path}">files_to_modify</template-output>
<template-output file="{story_path}">test_locations</template-output>
<template-output file="{story_path}">story_points</template-output>
<template-output file="{story_path}">time_estimate</template-output>
<template-output file="{story_path}">architecture_references</template-output>
</step>
<step n="4" goal="Update project-workflow-analysis with progress">
<action>Open {output_folder}/project-workflow-analysis.md</action>
<action>Update "Workflow Status Tracker" section</action>
<action>Set current_phase = "2-Plan"</action>
<action>Set current_workflow = "tech-spec (Level 0 - story generation complete)"</action>
<action>Check "2-Plan" checkbox in Phase Completion Status</action>
<action>Add to Artifacts Generated table:</action>
```
| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} |
| story-{slug}.md | Draft | {dev_story_location}/story-{slug}.md | {{date}} |
```
<action>Update "Next Action Required":</action>
```
**What to do next:** Run story-context workflow to generate implementation context
**Command to run:** Load SM agent and run workflow 'story-context' OR load DEV agent and run dev-story workflow directly
**Agent to load:** bmad/bmm/agents/sm.md OR bmad/bmm/agents/dev.md
```
<action>Add to Decision Log:</action>
```
- **{{date}}**: Level 0 tech-spec and story generation completed. Story: story-{slug}.md ready for context generation.
```
<action>Save project-workflow-analysis.md</action>
</step>
<step n="5" goal="Provide user guidance for next steps">
<action>Display completion summary</action>
**Level 0 Planning Complete!**
**Generated Artifacts:**
- `tech-spec.md` → Technical source of truth
- `story-{slug}.md` → User story ready for implementation
**Story Location:** `{story_path}`
**Next Steps (choose one path):**
**Option A - Full Context (Recommended for complex changes):**
1. Load SM agent: `{project-root}/bmad/bmm/agents/sm.md`
2. Run story-context workflow
3. Then load DEV agent and run dev-story workflow
**Option B - Direct to Dev (For simple, well-understood changes):**
1. Load DEV agent: `{project-root}/bmad/bmm/agents/dev.md`
2. Run dev-story workflow (will auto-discover story)
3. Begin implementation
**Progress Tracking:**
- All decisions logged in: `project-workflow-analysis.md`
- Next action clearly identified
<ask>Ready to proceed? Choose your path:
1. Generate story context (Option A - recommended)
2. Go directly to dev-story implementation (Option B - faster)
3. Exit for now
Select option (1-3):</ask>
</step>
</workflow>

View File

@@ -0,0 +1,333 @@
# Level 1 - Epic and Stories Generation
<workflow>
<critical>This generates epic and user stories for Level 1 projects after tech-spec completion</critical>
<critical>This is a lightweight story breakdown - not a full PRD</critical>
<critical>Level 1 = coherent feature, 1-10 stories (prefer 2-3), 1 epic</critical>
<critical>This workflow runs AFTER tech-spec.md has been completed</critical>
<critical>Story format MUST match create-story template for compatibility with story-context and dev-story workflows</critical>
<step n="1" goal="Load tech spec and extract implementation tasks">
<action>Read the completed tech-spec.md file from {output_folder}/tech-spec.md</action>
<action>Load project-workflow-analysis.md from {output_folder}/project-workflow-analysis.md</action>
<action>Extract dev_story_location from config (where stories are stored)</action>
<action>Identify all implementation tasks from the "Implementation Guide" section</action>
<action>Identify the overall feature goal from "Technical Approach" section</action>
<action>Extract time estimates for each implementation phase</action>
<action>Identify any dependencies between implementation tasks</action>
</step>
<step n="2" goal="Create single epic">
<action>Create 1 epic that represents the entire feature</action>
<action>Epic title should be user-facing value statement</action>
<action>Epic goal should describe why this matters to users</action>
<guidelines>
**Epic Best Practices:**
- Title format: User-focused outcome (not implementation detail)
- Good: "JS Library Icon Reliability"
- Bad: "Update recommendedLibraries.ts file"
- Scope: Clearly define what's included/excluded
- Success criteria: Measurable outcomes that define "done"
</guidelines>
<example>
**Epic:** JS Library Icon Reliability
**Goal:** Eliminate external dependencies for JS library icons to ensure consistent, reliable display and improve application performance.
**Scope:** Migrate all 14 recommended JS library icons from third-party CDN URLs (GitHub, jsDelivr) to internal static asset hosting.
**Success Criteria:**
- All library icons load from internal paths
- Zero external requests for library icons
- Icons load 50-200ms faster than baseline
- No broken icons in production
</example>
<action>Derive epic slug from epic title (kebab-case, 2-3 words max)</action>
<example>
- "JS Library Icon Reliability" → "icon-reliability"
- "OAuth Integration" → "oauth-integration"
- "Admin Dashboard" → "admin-dashboard"
</example>
<action>Initialize epic-stories.md summary document using epic_stories_template</action>
<template-output file="{output_folder}/epic-stories.md">epic_title</template-output>
<template-output file="{output_folder}/epic-stories.md">epic_slug</template-output>
<template-output file="{output_folder}/epic-stories.md">epic_goal</template-output>
<template-output file="{output_folder}/epic-stories.md">epic_scope</template-output>
<template-output file="{output_folder}/epic-stories.md">epic_success_criteria</template-output>
<template-output file="{output_folder}/epic-stories.md">epic_dependencies</template-output>
</step>
<step n="3" goal="Determine optimal story count">
<critical>Level 1 should have 2-3 stories maximum - prefer longer stories over more stories</critical>
<action>Analyze tech spec implementation tasks and time estimates</action>
<action>Group related tasks into logical story boundaries</action>
<guidelines>
**Story Count Decision Matrix:**
**2 Stories (preferred for most Level 1):**
- Use when: Feature has clear build/verify split
- Example: Story 1 = Build feature, Story 2 = Test and deploy
- Typical points: 3-5 points per story
**3 Stories (only if necessary):**
- Use when: Feature has distinct setup, build, verify phases
- Example: Story 1 = Setup, Story 2 = Core implementation, Story 3 = Integration and testing
- Typical points: 2-3 points per story
**Never exceed 3 stories for Level 1:**
- If more needed, consider if project should be Level 2
- Better to have longer stories (5 points) than more stories (5x 1-point stories)
</guidelines>
<action>Determine story_count = 2 or 3 based on tech spec complexity</action>
</step>
<step n="4" goal="Generate user stories from tech spec tasks">
<action>For each story (2-3 total), generate separate story file</action>
<action>Story filename format: "story-{epic_slug}-{n}.md" where n = 1, 2, or 3</action>
<action>Each story should represent a deliverable unit of work</action>
<action>Stories should have clear acceptance criteria from tech spec</action>
<action>Estimate story points based on time estimates in tech spec</action>
<guidelines>
**Story Generation Guidelines:**
- Each story = multiple implementation tasks from tech spec
- Story title format: User-focused deliverable (not implementation steps)
- Include technical acceptance criteria from tech spec tasks
- Link back to tech spec sections for implementation details
**Story Point Estimation:**
- 1 point = < 1 day (2-4 hours)
- 2 points = 1-2 days
- 3 points = 2-3 days
- 5 points = 3-5 days
**Level 1 Typical Totals:**
- Total story points: 5-10 points
- 2 stories: 3-5 points each
- 3 stories: 2-3 points each
- If total > 15 points, consider if this should be Level 2
**Story Structure (MUST match create-story format):**
- Status: Draft
- Story: As a [role], I want [capability], so that [benefit]
- Acceptance Criteria: Numbered list from tech spec
- Tasks / Subtasks: Checkboxes mapped to tech spec tasks (AC: #n references)
- Dev Notes: Technical summary, project structure notes, references
- Dev Agent Record: Empty sections for context workflow to populate
</guidelines>
<action>For story 1:</action>
<action>Set story_path_1 = "{dev_story_location}/story-{epic_slug}-1.md"</action>
<action>Initialize from user_story_template</action>
<template-output file="{story_path_1}">story_title</template-output>
<template-output file="{story_path_1}">role</template-output>
<template-output file="{story_path_1}">capability</template-output>
<template-output file="{story_path_1}">benefit</template-output>
<template-output file="{story_path_1}">acceptance_criteria</template-output>
<template-output file="{story_path_1}">tasks_subtasks</template-output>
<template-output file="{story_path_1}">technical_summary</template-output>
<template-output file="{story_path_1}">files_to_modify</template-output>
<template-output file="{story_path_1}">test_locations</template-output>
<template-output file="{story_path_1}">story_points</template-output>
<template-output file="{story_path_1}">time_estimate</template-output>
<template-output file="{story_path_1}">architecture_references</template-output>
<action>For story 2:</action>
<action>Set story_path_2 = "{dev_story_location}/story-{epic_slug}-2.md"</action>
<action>Initialize from user_story_template</action>
<template-output file="{story_path_2}">story_title</template-output>
<template-output file="{story_path_2}">role</template-output>
<template-output file="{story_path_2}">capability</template-output>
<template-output file="{story_path_2}">benefit</template-output>
<template-output file="{story_path_2}">acceptance_criteria</template-output>
<template-output file="{story_path_2}">tasks_subtasks</template-output>
<template-output file="{story_path_2}">technical_summary</template-output>
<template-output file="{story_path_2}">files_to_modify</template-output>
<template-output file="{story_path_2}">test_locations</template-output>
<template-output file="{story_path_2}">story_points</template-output>
<template-output file="{story_path_2}">time_estimate</template-output>
<template-output file="{story_path_2}">architecture_references</template-output>
<check if="story_count == 3">
<action>For story 3:</action>
<action>Set story_path_3 = "{dev_story_location}/story-{epic_slug}-3.md"</action>
<action>Initialize from user_story_template</action>
<template-output file="{story_path_3}">story_title</template-output>
<template-output file="{story_path_3}">role</template-output>
<template-output file="{story_path_3}">capability</template-output>
<template-output file="{story_path_3}">benefit</template-output>
<template-output file="{story_path_3}">acceptance_criteria</template-output>
<template-output file="{story_path_3}">tasks_subtasks</template-output>
<template-output file="{story_path_3}">technical_summary</template-output>
<template-output file="{story_path_3}">files_to_modify</template-output>
<template-output file="{story_path_3}">test_locations</template-output>
<template-output file="{story_path_3}">story_points</template-output>
<template-output file="{story_path_3}">time_estimate</template-output>
<template-output file="{story_path_3}">architecture_references</template-output>
</check>
</step>
<step n="5" goal="Create story map and implementation sequence">
<action>Generate visual story map showing epic → stories hierarchy</action>
<action>Calculate total story points across all stories</action>
<action>Estimate timeline based on total points (1-2 points per day typical)</action>
<action>Define implementation sequence considering dependencies</action>
<example>
## Story Map
```
Epic: Icon Reliability
├── Story 1: Build Icon Infrastructure (3 points)
└── Story 2: Test and Deploy Icons (2 points)
```
**Total Story Points:** 5
**Estimated Timeline:** 1 sprint (1 week)
## Implementation Sequence
1. **Story 1** → Build icon infrastructure (setup, download, configure)
2. **Story 2** → Test and deploy (depends on Story 1)
</example>
<template-output file="{output_folder}/epic-stories.md">story_summaries</template-output>
<template-output file="{output_folder}/epic-stories.md">story_map</template-output>
<template-output file="{output_folder}/epic-stories.md">total_points</template-output>
<template-output file="{output_folder}/epic-stories.md">estimated_timeline</template-output>
<template-output file="{output_folder}/epic-stories.md">implementation_sequence</template-output>
</step>
<step n="6" goal="Update project-workflow-analysis with progress">
<action>Open {output_folder}/project-workflow-analysis.md</action>
<action>Update "Workflow Status Tracker" section</action>
<action>Set current_phase = "2-Plan"</action>
<action>Set current_workflow = "tech-spec (Level 1 - epic and stories generation complete)"</action>
<action>Check "2-Plan" checkbox in Phase Completion Status</action>
<action>Add to Artifacts Generated table:</action>
```
| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} |
| epic-stories.md | Complete | {output_folder}/epic-stories.md | {{date}} |
| story-{epic_slug}-1.md | Draft | {dev_story_location}/story-{epic_slug}-1.md | {{date}} |
| story-{epic_slug}-2.md | Draft | {dev_story_location}/story-{epic_slug}-2.md | {{date}} |
{{#if story_3}}
| story-{epic_slug}-3.md | Draft | {dev_story_location}/story-{epic_slug}-3.md | {{date}} |
{{/if}}
```
<action>Update "Next Action Required":</action>
```
**What to do next:** Run story-context workflow on first story, then dev-story to implement
**Command to run:** Load SM agent and run 'story-context' workflow (select story-{epic_slug}-1.md)
**Agent to load:** bmad/bmm/agents/sm.md
```
<action>Add to Decision Log:</action>
```
- **{{date}}**: Level 1 tech-spec and epic/stories generation completed. {{story_count}} stories created. Ready for implementation of story-{epic_slug}-1.md.
```
<action>Save project-workflow-analysis.md</action>
</step>
<step n="7" goal="Finalize and provide user guidance">
<action>Confirm all stories map to tech spec implementation tasks</action>
<action>Verify total story points align with tech spec time estimates</action>
<action>Verify stories are properly sequenced with dependencies noted</action>
<action>Confirm all stories have measurable acceptance criteria</action>
**Level 1 Planning Complete!**
**Epic:** {{epic_title}}
**Total Stories:** {{story_count}}
**Total Story Points:** {{total_points}}
**Estimated Timeline:** {{estimated_timeline}}
**Generated Artifacts:**
- `tech-spec.md` → Technical source of truth
- `epic-stories.md` → Epic and story summary
- `story-{epic_slug}-1.md` → First story (ready for implementation)
- `story-{epic_slug}-2.md` → Second story
{{#if story_3}}
- `story-{epic_slug}-3.md` → Third story
{{/if}}
**Story Location:** `{dev_story_location}/`
**Next Steps - Iterative Implementation:**
**1. Start with Story 1:**
a. Load SM agent: `{project-root}/bmad/bmm/agents/sm.md`
b. Run story-context workflow (select story-{epic_slug}-1.md)
c. Load DEV agent: `{project-root}/bmad/bmm/agents/dev.md`
d. Run dev-story workflow to implement story 1
**2. After Story 1 Complete:**
- Repeat process for story-{epic_slug}-2.md
- Story context will auto-reference completed story 1
**3. After Story 2 Complete:**
{{#if story_3}}
- Repeat process for story-{epic_slug}-3.md
{{/if}}
- Level 1 feature complete!
**Progress Tracking:**
- All decisions logged in: `project-workflow-analysis.md`
- Next action clearly identified
<ask>Ready to proceed? Choose your path:
1. Generate context for story 1 (recommended - run story-context)
2. Go directly to dev-story for story 1 (faster)
3. Exit for now
Select option (1-3):</ask>
</step>
</workflow>

View File

@@ -1,19 +1,37 @@
# PRD Workflow - Small Projects (Level 0)
# PRD Workflow - Small Projects (Level 0-1)
<workflow>
<critical>The workflow execution engine is governed by: {project_root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {installed_path}/workflow.yaml</critical>
<critical>This is the SMALL instruction set for Level 0 projects - tech-spec only</critical>
<critical>This is the SMALL instruction set for Level 0-1 projects - tech-spec with story generation</critical>
<critical>Level 0: tech-spec + single user story | Level 1: tech-spec + epic/stories</critical>
<critical>Project analysis already completed - proceeding directly to technical specification</critical>
<critical>NO PRD generated - uses tech_spec_template only</critical>
<critical>NO PRD generated - uses tech_spec_template + story templates</critical>
<step n="1" goal="Confirm project scope">
<step n="1" goal="Confirm project scope and update tracking">
<action>Load project-workflow-analysis.md</action>
<action>Confirm Level 0 - Single atomic change</action>
<action>Load project-workflow-analysis.md from {output_folder}/project-workflow-analysis.md</action>
<ask>Please describe the specific change/fix you need to implement:</ask>
<action>Update Workflow Status Tracker:</action>
<check if="project_level == 0">
<action>Set current_workflow = "tech-spec (Level 0 - generating tech spec)"</action>
</check>
<check if="project_level == 1">
<action>Set current_workflow = "tech-spec (Level 1 - generating tech spec)"</action>
</check>
<action>Set progress_percentage = 20%</action>
<action>Save project-workflow-analysis.md</action>
<check if="project_level == 0">
<action>Confirm Level 0 - Single atomic change</action>
<ask>Please describe the specific change/fix you need to implement:</ask>
</check>
<check if="project_level == 1">
<action>Confirm Level 1 - Coherent feature</action>
<ask>Please describe the feature you need to implement:</ask>
</check>
</step>
@@ -22,6 +40,10 @@
<critical>Generate tech-spec.md - this is the TECHNICAL SOURCE OF TRUTH</critical>
<critical>ALL TECHNICAL DECISIONS MUST BE DEFINITIVE - NO AMBIGUITY ALLOWED</critical>
<action>Update progress in project-workflow-analysis.md:</action>
<action>Set progress_percentage = 40%</action>
<action>Save project-workflow-analysis.md</action>
<action>Initialize tech-spec.md using tech_spec_template from workflow.yaml</action>
<critical>DEFINITIVE DECISIONS REQUIRED:</critical>
@@ -84,17 +106,49 @@ Run cohesion validation? (y/n)</ask>
</step>
<step n="4" goal="Finalize and determine next steps">
<step n="4" goal="Generate user stories based on project level">
<action>Load project-workflow-analysis.md to determine project_level</action>
<check if="project_level == 0">
<action>Invoke instructions-level0-story.md to generate single user story</action>
<action>Story will be saved to user-story.md</action>
<action>Story links to tech-spec.md for technical implementation details</action>
</check>
<check if="project_level == 1">
<action>Invoke instructions-level1-stories.md to generate epic and stories</action>
<action>Epic and stories will be saved to epic-stories.md</action>
<action>Stories link to tech-spec.md implementation tasks</action>
</check>
</step>
<step n="5" goal="Finalize and determine next steps">
<action>Confirm tech-spec is complete and definitive</action>
<action>No PRD needed for Level 0</action>
<action>Ready for implementation</action>
<check if="project_level == 0">
<action>Confirm user-story.md generated successfully</action>
</check>
<check if="project_level == 1">
<action>Confirm epic-stories.md generated successfully</action>
</check>
## Summary
- **Level 0 Output**: tech-spec.md only
<check if="project_level == 0">
- **Level 0 Output**: tech-spec.md + user-story.md
- **No PRD required**
- **Direct to implementation**
- **Direct to implementation with story tracking**
</check>
<check if="project_level == 1">
- **Level 1 Output**: tech-spec.md + epic-stories.md
- **No PRD required**
- **Ready for sprint planning with epic/story breakdown**
</check>
## Next Steps Checklist

View File

@@ -0,0 +1,61 @@
# Story: {{story_title}}
Status: Draft
## Story
As a {{role}},
I want {{capability}},
so that {{benefit}}.
## Acceptance Criteria
{{acceptance_criteria}}
## Tasks / Subtasks
{{tasks_subtasks}}
## Dev Notes
### Technical Summary
{{technical_summary}}
### Project Structure Notes
- Files to modify: {{files_to_modify}}
- Expected test locations: {{test_locations}}
- Estimated effort: {{story_points}} story points ({{time_estimate}})
### References
- **Tech Spec:** See tech-spec.md for detailed implementation
- **Architecture:** {{architecture_references}}
## Dev Agent Record
### Context Reference
<!-- Path(s) to story context XML will be added here by context workflow -->
### Agent Model Used
<!-- Will be populated during dev-story execution -->
### Debug Log References
<!-- Will be populated during dev-story execution -->
### Completion Notes List
<!-- Will be populated during dev-story execution -->
### File List
<!-- Will be populated during dev-story execution -->
---
_Generated as part of Level 0 Tech Spec workflow (BMad Method v6)_
_Story Format: Compatible with story-context and dev-story workflows_

View File

@@ -15,8 +15,18 @@ installed_path: "{project-root}/bmad/bmm/workflows/2-plan/tech-spec"
instructions: "{installed_path}/instructions-sm.md"
template: "{installed_path}/tech-spec-template.md"
# Story generation instructions (invoked based on level)
instructions_level0_story: "{installed_path}/instructions-level0-story.md"
instructions_level1_stories: "{installed_path}/instructions-level1-stories.md"
# Templates
user_story_template: "{installed_path}/user-story-template.md"
epic_stories_template: "{installed_path}/epic-stories-template.md"
# Output configuration
default_output_file: "{output_folder}/tech-spec.md"
user_story_file: "{output_folder}/user-story.md"
epic_stories_file: "{output_folder}/epic-stories.md"
# Recommended input documents (optional for Level 0)
recommended_inputs:
@@ -45,13 +55,17 @@ frameworks:
web_bundle:
name: "tech-spec-sm"
description: "Technical specification workflow for Level 0 projects (single atomic changes). Creates focused tech spec for bug fixes, single endpoint additions, or small isolated changes. Tech-spec only - no PRD needed."
description: "Technical specification workflow for Level 0-1 projects. Creates focused tech spec with story generation. Level 0: tech-spec + user story. Level 1: tech-spec + epic/stories."
author: "BMad"
instructions: "bmad/bmm/workflows/2-plan/tech-spec/instructions-sm.md"
use_advanced_elicitation: true
web_bundle_files:
- "bmad/bmm/workflows/2-plan/tech-spec/instructions-sm.md"
- "bmad/bmm/workflows/2-plan/tech-spec/instructions-level0-story.md"
- "bmad/bmm/workflows/2-plan/tech-spec/instructions-level1-stories.md"
- "bmad/bmm/workflows/2-plan/tech-spec/tech-spec-template.md"
- "bmad/bmm/workflows/2-plan/tech-spec/user-story-template.md"
- "bmad/bmm/workflows/2-plan/tech-spec/epic-stories-template.md"
# Technical frameworks available
frameworks:
- "Technical Design Patterns"

View File

@@ -27,7 +27,7 @@ workflow_ux: "{installed_path}/ux/workflow.yaml"
# Templates - Load these only when the instructions request loading them
prd_template: "{installed_path}/prd/prd-template.md"
analysis_template: "{installed_path}/prd/analysis-template.md"
analysis_template: "{project-root}/bmad/bmm/workflows/_shared/project-workflow-analysis-template.md"
epics_template: "{installed_path}/prd/epics-template.md"
tech_spec_template: "{installed_path}/tech-spec/tech-spec-template.md"
ux_spec_template: "{installed_path}/ux/ux-spec-template.md"
@@ -83,7 +83,7 @@ web_bundle:
instructions_narrative: "bmad/bmm/workflows/2-plan/narrative/instructions-narrative.md"
# Templates - Load these only when the instructions request loading them
prd_template: "{installed_path}/prd/prd-template.md"
analysis_template: "{installed_path}/prd/analysis-template.md"
analysis_template: "bmad/bmm/workflows/_shared/project-workflow-analysis-template.md"
epics_template: "{installed_path}/prd/epics-template.md"
tech_spec_template: "{installed_path}/tech-spec/tech-spec-template.md"
ux_spec_template: "{installed_path}/ux/ux-spec-template.md"

View File

@@ -0,0 +1,135 @@
# Project Workflow Analysis
**Date:** {{date}}
**Project:** {{project_name}}
**Analyst:** {{user_name}}
**Last Updated:** {{date}}
---
## Workflow Status Tracker
**Current Phase:** {{current_phase}}
**Current Workflow:** {{current_workflow}}
**Current Agent:** {{current_agent}}
**Overall Progress:** {{progress_percentage}}%
### Phase Completion Status
- [ ] **1-Analysis** - Research, brainstorm, brief (optional)
- [ ] **2-Plan** - PRD/GDD/Tech-Spec + Stories/Epics
- [ ] **3-Solutioning** - Architecture + Tech Specs (Level 2+ only)
- [ ] **4-Implementation** - Story development and delivery
### Artifacts Generated
| Artifact | Status | Location | Date |
| -------- | ------ | -------- | ---- |
{{#artifacts}}
| {{name}} | {{status}} | {{path}} | {{date}} |
{{/artifacts}}
### Next Action Required
**What to do next:** {{next_action}}
**Command to run:** {{next_command}}
**Agent to load:** {{next_agent}}
---
## Assessment Results
### Project Classification
- **Project Type:** {{project_type}}
- **Project Level:** {{project_level}}
- **Instruction Set:** {{instruction_set}}
### Scope Summary
- **Brief Description:** {{scope_description}}
- **Estimated Stories:** {{story_count}}
- **Estimated Epics:** {{epic_count}}
- **Timeline:** {{timeline}}
### Context
- **Greenfield/Brownfield:** {{field_type}}
- **Existing Documentation:** {{existing_docs}}
- **Team Size:** {{team_size}}
- **Deployment Intent:** {{deployment_intent}}
## Recommended Workflow Path
### Primary Outputs
{{expected_outputs}}
### Workflow Sequence
{{workflow_steps}}
### Next Actions
{{next_steps}}
## Special Considerations
{{special_notes}}
## Technical Preferences Captured
{{technical_preferences}}
## Story Naming Convention
### Level 0 (Single Atomic Change)
- **Format:** `story-<short-title>.md`
- **Example:** `story-icon-migration.md`, `story-login-fix.md`
- **Location:** `{{dev_story_location}}/`
- **Max Stories:** 1 (if more needed, consider Level 1)
### Level 1 (Coherent Feature)
- **Format:** `story-<title>-<n>.md`
- **Example:** `story-oauth-integration-1.md`, `story-oauth-integration-2.md`
- **Location:** `{{dev_story_location}}/`
- **Max Stories:** 2-3 (prefer longer stories over more stories)
### Level 2+ (Multiple Epics)
- **Format:** `story-<epic>.<story>.md`
- **Example:** `story-1.1.md`, `story-1.2.md`, `story-2.1.md`
- **Location:** `{{dev_story_location}}/`
- **Max Stories:** Per epic breakdown in epics.md
## Decision Log
### Planning Decisions Made
{{#decisions}}
- **{{decision_date}}**: {{decision_description}}
{{/decisions}}
---
## Change History
{{#changes}}
### {{change_date}} - {{change_author}}
- Phase: {{change_phase}}
- Changes: {{change_description}}
{{/changes}}
---
_This analysis serves as the **single source of truth** for project workflow decisions, progress tracking, and next actions. All BMM workflow phases reference this document for coordination._
_Template Location: `bmad/bmm/workflows/_shared/project-workflow-analysis-template.md`_