mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
planning workflow alignment
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
# Tech-Spec Workflow Validation Checklist
|
||||
|
||||
**Purpose**: Validate tech-spec workflow outputs are definitive, complete, and implementation-ready.
|
||||
|
||||
**Scope**: Levels 0-1 software projects
|
||||
|
||||
**Expected Outputs**: tech-spec.md + story files (1 for Level 0, 2-3 for Level 1)
|
||||
|
||||
---
|
||||
|
||||
## 1. Output Files Exist
|
||||
|
||||
- [ ] tech-spec.md created in output folder
|
||||
- [ ] Story file(s) created in dev_story_location
|
||||
- Level 0: 1 story file (story-{slug}.md)
|
||||
- Level 1: epics.md + 2-3 story files (story-{epic-slug}-N.md)
|
||||
- [ ] bmm-workflow-status.md updated to Phase 4
|
||||
- [ ] No unfilled {{template_variables}}
|
||||
|
||||
---
|
||||
|
||||
## 2. Tech-Spec Definitiveness (CRITICAL)
|
||||
|
||||
### No Ambiguity Allowed
|
||||
|
||||
- [ ] **Zero "or" statements**: NO "use X or Y", "either A or B", "options include"
|
||||
- [ ] **Specific versions**: All frameworks, libraries, tools have EXACT versions
|
||||
- ✅ GOOD: "Python 3.11", "React 18.2.0", "winston v3.8.2"
|
||||
- ❌ BAD: "Python 2 or 3", "React 18+", "a logger like pino or winston"
|
||||
- [ ] **Definitive decisions**: Every technical choice is final, not a proposal
|
||||
|
||||
### Implementation Clarity
|
||||
|
||||
- [ ] Source tree shows EXACT file paths (not "somewhere in src/")
|
||||
- [ ] Each file marked as create/modify/delete
|
||||
- [ ] Technical approach describes SPECIFIC implementation
|
||||
- [ ] Implementation stack has complete toolchain with versions
|
||||
|
||||
---
|
||||
|
||||
## 3. Story Quality
|
||||
|
||||
### Story Format
|
||||
|
||||
- [ ] All stories use "As a [role], I want [capability], so that [benefit]" format
|
||||
- [ ] Each story has numbered acceptance criteria
|
||||
- [ ] Tasks reference AC numbers: (AC: #1), (AC: #2)
|
||||
- [ ] Dev Notes section links back to tech-spec.md
|
||||
|
||||
### Story Sequencing (If Level 1)
|
||||
|
||||
- [ ] **Vertical slices**: Each story delivers complete, testable functionality
|
||||
- [ ] **Sequential ordering**: Stories in logical progression
|
||||
- [ ] **No forward dependencies**: No story depends on later work
|
||||
- [ ] Each story leaves system in working state
|
||||
|
||||
### Coverage
|
||||
|
||||
- [ ] Story acceptance criteria derived from tech-spec testing section
|
||||
- [ ] Story tasks map to tech-spec implementation guide
|
||||
- [ ] Files in stories match tech-spec source tree
|
||||
|
||||
---
|
||||
|
||||
## 4. Workflow Status Integration
|
||||
|
||||
- [ ] bmm-workflow-status.md shows current_phase = "4-Implementation"
|
||||
- [ ] Phase 2 ("2-Plan") marked complete
|
||||
- [ ] First story in TODO section, others in BACKLOG (if Level 1)
|
||||
- [ ] Next action clear (review story, run story-ready)
|
||||
|
||||
---
|
||||
|
||||
## 5. Readiness for Implementation
|
||||
|
||||
- [ ] Developer can start coding from tech-spec alone
|
||||
- [ ] All technical questions answered definitively
|
||||
- [ ] Testing approach clear and verifiable
|
||||
- [ ] Deployment strategy documented
|
||||
|
||||
---
|
||||
|
||||
## 6. Critical Failures (Auto-Fail)
|
||||
|
||||
- [ ] ❌ **Non-definitive technical decisions** (any "option A or B" or vague choices)
|
||||
- [ ] ❌ **Missing versions** (framework/library without specific version)
|
||||
- [ ] ❌ **Stories don't match template** (incompatible with story-context/dev-story workflows)
|
||||
- [ ] ❌ **Missing tech-spec sections** (required section missing from tech-spec.md)
|
||||
- [ ] ❌ **Stories have forward dependencies** (would break sequential implementation)
|
||||
- [ ] ❌ **Vague source tree** (file changes not specific)
|
||||
|
||||
---
|
||||
|
||||
## Validation Notes
|
||||
|
||||
**Document any findings:**
|
||||
|
||||
- Definitiveness score: [All definitive / Some ambiguity / Significant ambiguity]
|
||||
- Strengths:
|
||||
- Issues to address:
|
||||
- Recommended actions:
|
||||
|
||||
**Ready for implementation?** [Yes / No - explain]
|
||||
|
||||
---
|
||||
|
||||
_Adapt based on Level 0 vs Level 1. Focus on definitiveness above all else._
|
||||
@@ -0,0 +1,11 @@
|
||||
# {{project_name}} - Epic Breakdown
|
||||
|
||||
## Epic Overview
|
||||
|
||||
{{epic_overview}}
|
||||
|
||||
---
|
||||
|
||||
## Epic Details
|
||||
|
||||
{{epic_details}}
|
||||
@@ -0,0 +1,222 @@
|
||||
# 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 bmm-workflow-status.md from {output_folder}/bmm-workflow-status.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 bmm-workflow-status and initialize Phase 4">
|
||||
|
||||
<action>Open {output_folder}/bmm-workflow-status.md</action>
|
||||
|
||||
<action>Update "Workflow Status Tracker" section:</action>
|
||||
|
||||
- Set current_phase = "4-Implementation" (Level 0 skips Phase 3)
|
||||
- Set current_workflow = "tech-spec (Level 0 - story generation complete, ready for implementation)"
|
||||
- Check "2-Plan" checkbox in Phase Completion Status
|
||||
- Set progress_percentage = 40% (planning complete, skipping solutioning)
|
||||
|
||||
<action>Initialize Phase 4 Implementation Progress section:</action>
|
||||
|
||||
#### BACKLOG (Not Yet Drafted)
|
||||
|
||||
**Ordered story sequence - populated at Phase 4 start:**
|
||||
|
||||
| Epic | Story | ID | Title | File |
|
||||
| ---------------------------------- | ----- | --- | ----- | ---- |
|
||||
| (empty - Level 0 has only 1 story) | | | | |
|
||||
|
||||
**Total in backlog:** 0 stories
|
||||
|
||||
**NOTE:** Level 0 has single story only. No additional stories in backlog.
|
||||
|
||||
#### TODO (Needs Drafting)
|
||||
|
||||
Initialize with the ONLY story (already drafted):
|
||||
|
||||
- **Story ID:** {slug}
|
||||
- **Story Title:** {{story_title}}
|
||||
- **Story File:** `story-{slug}.md`
|
||||
- **Status:** Draft (needs review before development)
|
||||
- **Action:** User reviews drafted story, then runs SM agent `story-ready` workflow to approve
|
||||
|
||||
#### IN PROGRESS (Approved for Development)
|
||||
|
||||
Leave empty initially:
|
||||
|
||||
(Story will be moved here by SM agent `story-ready` workflow after user approves story-{slug}.md)
|
||||
|
||||
#### DONE (Completed Stories)
|
||||
|
||||
Initialize empty table:
|
||||
|
||||
| Story ID | File | Completed Date | Points |
|
||||
| ---------- | ---- | -------------- | ------ |
|
||||
| (none yet) | | | |
|
||||
|
||||
**Total completed:** 0 stories
|
||||
**Total points completed:** 0 points
|
||||
|
||||
<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:** Review drafted story-{slug}.md, then mark it ready for development
|
||||
|
||||
**Command to run:** Load SM agent and run 'story-ready' workflow (confirms story-{slug}.md is ready)
|
||||
|
||||
**Agent to load:** bmad/bmm/agents/sm.md
|
||||
```
|
||||
|
||||
<action>Add to Decision Log:</action>
|
||||
|
||||
```
|
||||
- **{{date}}**: Level 0 tech-spec and story generation completed. Skipping Phase 3 (solutioning) - moving directly to Phase 4 (implementation). Single story (story-{slug}.md) drafted and ready for review.
|
||||
```
|
||||
|
||||
<action>Save bmm-workflow-status.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: `bmm-workflow-status.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>
|
||||
@@ -0,0 +1,348 @@
|
||||
# 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 bmm-workflow-status.md from {output_folder}/bmm-workflow-status.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 epics.md summary document using epics_template</action>
|
||||
|
||||
<template-output file="{output_folder}/epics.md">epic_title</template-output>
|
||||
<template-output file="{output_folder}/epics.md">epic_slug</template-output>
|
||||
<template-output file="{output_folder}/epics.md">epic_goal</template-output>
|
||||
<template-output file="{output_folder}/epics.md">epic_scope</template-output>
|
||||
<template-output file="{output_folder}/epics.md">epic_success_criteria</template-output>
|
||||
<template-output file="{output_folder}/epics.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>
|
||||
|
||||
<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>
|
||||
|
||||
<for-each story="1 to story_count">
|
||||
<action>Set story_path_{n} = "{dev_story_location}/story-{epic_slug}-{n}.md"</action>
|
||||
<action>Create story file from user_story_template with the following content:</action>
|
||||
|
||||
<template-output file="{story_path_{n}}">
|
||||
- story_title: User-focused deliverable title
|
||||
- role: User role (e.g., developer, user, admin)
|
||||
- capability: What they want to do
|
||||
- benefit: Why it matters
|
||||
- acceptance_criteria: Specific, measurable criteria from tech spec
|
||||
- tasks_subtasks: Implementation tasks with AC references
|
||||
- technical_summary: High-level approach, key decisions
|
||||
- files_to_modify: List of files that will change
|
||||
- test_locations: Where tests will be added
|
||||
- story_points: Estimated effort (1/2/3/5)
|
||||
- time_estimate: Days/hours estimate
|
||||
- architecture_references: Links to tech-spec.md sections
|
||||
</template-output>
|
||||
</for-each>
|
||||
|
||||
<critical>Generate exactly {story_count} story files (2 or 3 based on Step 3 decision)</critical>
|
||||
|
||||
</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}/epics.md">story_summaries</template-output>
|
||||
<template-output file="{output_folder}/epics.md">story_map</template-output>
|
||||
<template-output file="{output_folder}/epics.md">total_points</template-output>
|
||||
<template-output file="{output_folder}/epics.md">estimated_timeline</template-output>
|
||||
<template-output file="{output_folder}/epics.md">implementation_sequence</template-output>
|
||||
|
||||
</step>
|
||||
|
||||
<step n="6" goal="Update bmm-workflow-status and populate backlog for Phase 4">
|
||||
|
||||
<action>Open {output_folder}/bmm-workflow-status.md</action>
|
||||
|
||||
<action>Update "Workflow Status Tracker" section:</action>
|
||||
|
||||
- Set current_phase = "4-Implementation" (Level 1 skips Phase 3)
|
||||
- Set current_workflow = "tech-spec (Level 1 - epic and stories generation complete, ready for implementation)"
|
||||
- Check "2-Plan" checkbox in Phase Completion Status
|
||||
- Set progress_percentage = 40% (planning complete, skipping solutioning)
|
||||
|
||||
<action>Populate story backlog in "### Implementation Progress (Phase 4 Only)" section:</action>
|
||||
|
||||
#### BACKLOG (Not Yet Drafted)
|
||||
|
||||
**Ordered story sequence - populated at Phase 4 start:**
|
||||
|
||||
| Epic | Story | ID | Title | File |
|
||||
| ---- | ----- | --- | ----- | ---- |
|
||||
|
||||
{{#if story_2}}
|
||||
| 1 | 2 | {epic_slug}-2 | {{story_2_title}} | story-{epic_slug}-2.md |
|
||||
{{/if}}
|
||||
{{#if story_3}}
|
||||
| 1 | 3 | {epic_slug}-3 | {{story_3_title}} | story-{epic_slug}-3.md |
|
||||
{{/if}}
|
||||
|
||||
**Total in backlog:** {{story_count - 1}} stories
|
||||
|
||||
**NOTE:** Level 1 uses slug-based IDs like "{epic_slug}-1", "{epic_slug}-2" instead of numeric "1.1", "1.2"
|
||||
|
||||
#### TODO (Needs Drafting)
|
||||
|
||||
Initialize with FIRST story (already drafted):
|
||||
|
||||
- **Story ID:** {epic_slug}-1
|
||||
- **Story Title:** {{story_1_title}}
|
||||
- **Story File:** `story-{epic_slug}-1.md`
|
||||
- **Status:** Draft (needs review before development)
|
||||
- **Action:** User reviews drafted story, then runs SM agent `story-ready` workflow to approve
|
||||
|
||||
#### IN PROGRESS (Approved for Development)
|
||||
|
||||
Leave empty initially:
|
||||
|
||||
(Story will be moved here by SM agent `story-ready` workflow after user approves story-{epic_slug}-1.md)
|
||||
|
||||
#### DONE (Completed Stories)
|
||||
|
||||
Initialize empty table:
|
||||
|
||||
| Story ID | File | Completed Date | Points |
|
||||
| ---------- | ---- | -------------- | ------ |
|
||||
| (none yet) | | | |
|
||||
|
||||
**Total completed:** 0 stories
|
||||
**Total points completed:** 0 points
|
||||
|
||||
<action>Add to Artifacts Generated table:</action>
|
||||
|
||||
```
|
||||
| tech-spec.md | Complete | {output_folder}/tech-spec.md | {{date}} |
|
||||
| epics.md | Complete | {output_folder}/epics.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:** Review drafted story-{epic_slug}-1.md, then mark it ready for development
|
||||
|
||||
**Command to run:** Load SM agent and run 'story-ready' workflow (confirms story-{epic_slug}-1.md is ready)
|
||||
|
||||
**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. Skipping Phase 3 (solutioning) - moving directly to Phase 4 (implementation). Story backlog populated. First story (story-{epic_slug}-1.md) drafted and ready for review.
|
||||
```
|
||||
|
||||
<action>Save bmm-workflow-status.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
|
||||
- `epics.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: `bmm-workflow-status.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>
|
||||
@@ -0,0 +1,249 @@
|
||||
# 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-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 + story templates</critical>
|
||||
|
||||
<step n="0" goal="Check for workflow status file - REQUIRED">
|
||||
|
||||
<action>Check if bmm-workflow-status.md exists in {output_folder}/</action>
|
||||
|
||||
<check if="not exists">
|
||||
<output>**⚠️ No Workflow Status File Found**
|
||||
|
||||
The tech-spec workflow requires an existing workflow status file to understand your project context.
|
||||
|
||||
Please run `workflow-status` first to:
|
||||
|
||||
- Map out your complete workflow journey
|
||||
- Determine project type and level
|
||||
- Create the status file with your planned workflow
|
||||
|
||||
**To proceed:**
|
||||
|
||||
Run: `bmad analyst workflow-status`
|
||||
|
||||
After completing workflow planning, you'll be directed back to this workflow.
|
||||
</output>
|
||||
<action>Exit workflow - cannot proceed without status file</action>
|
||||
</check>
|
||||
|
||||
<check if="exists">
|
||||
<action>Load status file and proceed to Step 1</action>
|
||||
</check>
|
||||
|
||||
</step>
|
||||
|
||||
<step n="1" goal="Confirm project scope and update tracking">
|
||||
|
||||
<action>Load bmm-workflow-status.md from {output_folder}/bmm-workflow-status.md</action>
|
||||
<action>Verify project_level is 0 or 1</action>
|
||||
|
||||
<check if="project_level >= 2">
|
||||
<error>This workflow is for Level 0-1 only. Level 2-4 should use PRD workflow.</error>
|
||||
<output>**Incorrect Workflow for Your Level**
|
||||
|
||||
Your status file indicates Level {{project_level}}.
|
||||
|
||||
**Correct workflow:** `prd` (run with PM agent)
|
||||
|
||||
Run: `bmad pm prd`
|
||||
</output>
|
||||
<action>Exit and redirect user to prd workflow</action>
|
||||
</check>
|
||||
|
||||
<check if="project_type == game">
|
||||
<error>This workflow is for software projects. Game projects should use GDD workflow.</error>
|
||||
<output>**Incorrect Workflow for Game Projects**
|
||||
|
||||
**Correct workflow:** `gdd` (run with PM agent)
|
||||
|
||||
Run: `bmad pm gdd`
|
||||
</output>
|
||||
<action>Exit and redirect user to gdd workflow</action>
|
||||
</check>
|
||||
|
||||
<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 bmm-workflow-status.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>
|
||||
|
||||
<step n="2" goal="Generate DEFINITIVE tech spec">
|
||||
|
||||
<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 bmm-workflow-status.md:</action>
|
||||
<action>Set progress_percentage = 40%</action>
|
||||
<action>Save bmm-workflow-status.md</action>
|
||||
|
||||
<action>Initialize and write out tech-spec.md using tech_spec_template</action>
|
||||
|
||||
<critical>DEFINITIVE DECISIONS REQUIRED:</critical>
|
||||
|
||||
**BAD Examples (NEVER DO THIS):**
|
||||
|
||||
- "Python 2 or 3" ❌
|
||||
- "Use a logger like pino or winston" ❌
|
||||
|
||||
**GOOD Examples (ALWAYS DO THIS):**
|
||||
|
||||
- "Python 3.11" ✅
|
||||
- "winston v3.8.2 for logging" ✅
|
||||
|
||||
**Source Tree Structure**: EXACT file changes needed
|
||||
<template-output file="tech-spec.md">source_tree</template-output>
|
||||
|
||||
**Technical Approach**: SPECIFIC implementation for the change
|
||||
<template-output file="tech-spec.md">technical_approach</template-output>
|
||||
|
||||
**Implementation Stack**: DEFINITIVE tools and versions
|
||||
<template-output file="tech-spec.md">implementation_stack</template-output>
|
||||
|
||||
**Technical Details**: PRECISE change details
|
||||
<template-output file="tech-spec.md">technical_details</template-output>
|
||||
|
||||
**Testing Approach**: How to verify the change
|
||||
<template-output file="tech-spec.md">testing_approach</template-output>
|
||||
|
||||
**Deployment Strategy**: How to deploy the change
|
||||
<template-output file="tech-spec.md">deployment_strategy</template-output>
|
||||
|
||||
<invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>
|
||||
|
||||
</step>
|
||||
|
||||
<step n="3" goal="Validate cohesion" optional="true">
|
||||
|
||||
<action>Offer to run cohesion validation</action>
|
||||
|
||||
<ask>Tech-spec complete! Before proceeding to implementation, would you like to validate project cohesion?
|
||||
|
||||
**Cohesion Validation** checks:
|
||||
|
||||
- Tech spec completeness and definitiveness
|
||||
- Feature sequencing and dependencies
|
||||
- External dependencies properly planned
|
||||
- User/agent responsibilities clear
|
||||
- Greenfield/brownfield-specific considerations
|
||||
|
||||
Run cohesion validation? (y/n)</ask>
|
||||
|
||||
<check if="yes">
|
||||
<action>Load {installed_path}/checklist.md</action>
|
||||
<action>Review tech-spec.md against "Cohesion Validation (All Levels)" section</action>
|
||||
<action>Focus on Section A (Tech Spec), Section D (Feature Sequencing)</action>
|
||||
<action>Apply Section B (Greenfield) or Section C (Brownfield) based on field_type</action>
|
||||
<action>Generate validation report with findings</action>
|
||||
</check>
|
||||
|
||||
</step>
|
||||
|
||||
<step n="4" goal="Generate user stories based on project level">
|
||||
|
||||
<action>Load bmm-workflow-status.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 epics.md
|
||||
<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>
|
||||
|
||||
<check if="project_level == 0">
|
||||
<action>Confirm user-story.md generated successfully</action>
|
||||
</check>
|
||||
|
||||
<check if="project_level == 1">
|
||||
<action>Confirm epics.md generated successfully</action>
|
||||
</check>
|
||||
|
||||
## Summary
|
||||
|
||||
<check if="project_level == 0">
|
||||
- **Level 0 Output**: tech-spec.md + user-story.md
|
||||
- **No PRD required**
|
||||
- **Direct to implementation with story tracking**
|
||||
</check>
|
||||
|
||||
<check if="project_level == 1">
|
||||
- **Level 1 Output**: tech-spec.md + epics.md
|
||||
- **No PRD required**
|
||||
- **Ready for sprint planning with epic/story breakdown**
|
||||
</check>
|
||||
|
||||
## Next Steps Checklist
|
||||
|
||||
<action>Determine appropriate next steps for Level 0 atomic change</action>
|
||||
|
||||
**Optional Next Steps:**
|
||||
|
||||
<check if="change involves UI components">
|
||||
- [ ] **Create simple UX documentation** (if UI change is user-facing)
|
||||
- Note: Full instructions-ux workflow may be overkill for Level 0
|
||||
- Consider documenting just the specific UI change
|
||||
</check>
|
||||
|
||||
- [ ] **Generate implementation task**
|
||||
- Command: `workflow task-generation`
|
||||
- Uses: tech-spec.md
|
||||
|
||||
<check if="change is backend/API only">
|
||||
|
||||
**Recommended Next Steps:**
|
||||
|
||||
- [ ] **Create test plan** for the change
|
||||
- Unit tests for the specific change
|
||||
- Integration test if affects other components
|
||||
|
||||
- [ ] **Generate implementation task**
|
||||
- Command: `workflow task-generation`
|
||||
- Uses: tech-spec.md
|
||||
|
||||
<ask>Level 0 planning complete! Next action:
|
||||
|
||||
1. Proceed to implementation
|
||||
2. Generate development task
|
||||
3. Create test plan
|
||||
4. Exit workflow
|
||||
|
||||
Select option (1-4):</ask>
|
||||
|
||||
</check>
|
||||
|
||||
</step>
|
||||
|
||||
</workflow>
|
||||
@@ -0,0 +1,55 @@
|
||||
# {{project_name}} - Technical Specification
|
||||
|
||||
**Author:** {{user_name}}
|
||||
**Date:** {{date}}
|
||||
**Project Level:** {{project_level}}
|
||||
**Project Type:** {{project_type}}
|
||||
**Development Context:** {{development_context}}
|
||||
|
||||
---
|
||||
|
||||
## Source Tree Structure
|
||||
|
||||
{{source_tree}}
|
||||
|
||||
---
|
||||
|
||||
## Technical Approach
|
||||
|
||||
{{technical_approach}}
|
||||
|
||||
---
|
||||
|
||||
## Implementation Stack
|
||||
|
||||
{{implementation_stack}}
|
||||
|
||||
---
|
||||
|
||||
## Technical Details
|
||||
|
||||
{{technical_details}}
|
||||
|
||||
---
|
||||
|
||||
## Development Setup
|
||||
|
||||
{{development_setup}}
|
||||
|
||||
---
|
||||
|
||||
## Implementation Guide
|
||||
|
||||
{{implementation_guide}}
|
||||
|
||||
---
|
||||
|
||||
## Testing Approach
|
||||
|
||||
{{testing_approach}}
|
||||
|
||||
---
|
||||
|
||||
## Deployment Strategy
|
||||
|
||||
{{deployment_strategy}}
|
||||
@@ -0,0 +1,56 @@
|
||||
# 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 -->
|
||||
@@ -0,0 +1,78 @@
|
||||
# Technical Specification Workflow (Level 0)
|
||||
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."
|
||||
author: "BMad"
|
||||
|
||||
# Critical variables from config
|
||||
config_source: "{project-root}/bmad/bmm/config.yaml"
|
||||
project_name: "{config_source}:project_name"
|
||||
output_folder: "{config_source}:output_folder"
|
||||
user_name: "{config_source}:user_name"
|
||||
date: system-generated
|
||||
|
||||
# Workflow components
|
||||
installed_path: "{project-root}/bmad/bmm/workflows/2-plan-workflows/tech-spec"
|
||||
instructions: "{installed_path}/instructions.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"
|
||||
epics_template: "{installed_path}/epics-template.md"
|
||||
|
||||
# Output configuration
|
||||
default_output_file: "{output_folder}/tech-spec.md"
|
||||
user_story_file: "{output_folder}/user-story.md"
|
||||
epics_file: "{output_folder}/epics.md"
|
||||
|
||||
# Recommended input documents (optional for Level 0)
|
||||
recommended_inputs:
|
||||
- bug_report: "Bug description or issue ticket"
|
||||
- feature_request: "Brief feature description"
|
||||
|
||||
# Claude Code integration points
|
||||
claude_code_enhancements:
|
||||
- injection_point: "tech-spec-subagents"
|
||||
- available_subagents:
|
||||
- technical-evaluator: "Technology assessment and feasibility"
|
||||
- codebase-analyzer: "Existing code analysis"
|
||||
- pattern-detector: "Identify coding patterns to follow"
|
||||
|
||||
# Workflow configuration
|
||||
interactive: true # User checkpoints
|
||||
autonomous: false # Requires user input
|
||||
allow_parallel: false # Sequential specification
|
||||
|
||||
# Technical frameworks available
|
||||
frameworks:
|
||||
- "Technical Design Patterns"
|
||||
- "API Design Principles"
|
||||
- "Code Organization Standards"
|
||||
- "Testing Strategies"
|
||||
|
||||
web_bundle:
|
||||
name: "tech-spec-sm"
|
||||
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-workflows/tech-spec/instructions.md"
|
||||
use_advanced_elicitation: true
|
||||
web_bundle_files:
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md"
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level0-story.md"
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions-level1-stories.md"
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/tech-spec-template.md"
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md"
|
||||
- "bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md"
|
||||
# Technical frameworks available
|
||||
frameworks:
|
||||
- "Technical Design Patterns"
|
||||
- "API Design Principles"
|
||||
- "Code Organization Standards"
|
||||
- "Testing Strategies"
|
||||
# Workflow configuration
|
||||
interactive: true # User checkpoints
|
||||
autonomous: false # Requires user input
|
||||
allow_parallel: false # Sequential specification
|
||||
Reference in New Issue
Block a user