bmad-method 6.0.0-alpha.5 → 6.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/bmad-analysis/api-documenter.md +102 -0
- package/.claude/agents/bmad-analysis/codebase-analyzer.md +82 -0
- package/.claude/agents/bmad-analysis/data-analyst.md +101 -0
- package/.claude/agents/bmad-analysis/pattern-detector.md +84 -0
- package/.claude/agents/bmad-planning/dependency-mapper.md +83 -0
- package/.claude/agents/bmad-planning/epic-optimizer.md +81 -0
- package/.claude/agents/bmad-planning/requirements-analyst.md +61 -0
- package/.claude/agents/bmad-planning/technical-decisions-curator.md +168 -0
- package/.claude/agents/bmad-planning/trend-spotter.md +115 -0
- package/.claude/agents/bmad-planning/user-journey-mapper.md +123 -0
- package/.claude/agents/bmad-planning/user-researcher.md +72 -0
- package/.claude/agents/bmad-research/market-researcher.md +51 -0
- package/.claude/agents/bmad-research/tech-debt-auditor.md +106 -0
- package/.claude/agents/bmad-review/document-reviewer.md +102 -0
- package/.claude/agents/bmad-review/technical-evaluator.md +68 -0
- package/.claude/agents/bmad-review/test-coverage-analyzer.md +108 -0
- package/.claude/commands/bmad/bmm/workflows/README.md +2 -2
- package/.claude/commands/bmad/bmm/workflows/prd.md +1 -1
- package/.claude/commands/bmad/bmm/workflows/tech-spec.md +3 -3
- package/.claude/commands/bmad/core/workflows/README.md +0 -10
- package/.claude/settings.local.json +3 -4
- package/CONTRIBUTING.md +1 -13
- package/bmad/_cfg/agent-manifest.csv +0 -6
- package/bmad/_cfg/files-manifest.csv +26 -78
- package/bmad/_cfg/ides/claude-code.yaml +4 -3
- package/bmad/_cfg/manifest.yaml +3 -5
- package/bmad/_cfg/task-manifest.csv +0 -4
- package/bmad/_cfg/tool-manifest.csv +0 -1
- package/bmad/_cfg/workflow-manifest.csv +2 -8
- package/bmad/bmb/config.yaml +2 -2
- package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
- package/bmad/bmm/config.yaml +4 -3
- package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
- package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
- package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
- package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
- package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
- package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
- package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +1 -1
- package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
- package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
- package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
- package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
- package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
- package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
- package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
- package/bmad/bmm/workflows/techdoc/documentation-standards.md +24 -1
- package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
- package/bmad/core/config.yaml +2 -2
- package/package.json +1 -1
- package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
- package/src/modules/bmm/docs/README.md +10 -9
- package/src/modules/bmm/docs/agents-guide.md +1 -1
- package/src/modules/bmm/docs/brownfield-guide.md +5 -6
- package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
- package/src/modules/bmm/docs/faq.md +6 -6
- package/src/modules/bmm/docs/glossary.md +8 -8
- package/src/modules/bmm/docs/quick-spec-flow.md +3 -3
- package/src/modules/bmm/docs/quick-start.md +5 -5
- package/src/modules/bmm/docs/scale-adaptive-system.md +1 -1
- package/src/modules/bmm/docs/test-architecture.md +329 -0
- package/src/modules/bmm/docs/troubleshooting.md +6 -6
- package/src/modules/bmm/docs/workflows-analysis.md +64 -28
- package/src/modules/bmm/docs/workflows-implementation.md +196 -1670
- package/src/modules/bmm/docs/workflows-planning.md +74 -35
- package/src/modules/bmm/docs/workflows-solutioning.md +46 -16
- package/src/modules/bmm/workflows/techdoc/documentation-standards.md +24 -1
- package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
- package/tools/cli/installers/lib/core/config-collector.js +39 -11
- package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
- package/tools/cli/installers/lib/core/installer.js +20 -9
- package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
- package/tools/cli/installers/lib/core/manifest.js +6 -2
- package/tools/cli/installers/lib/modules/manager.js +6 -0
- package/tools/cli/lib/config.js +3 -1
- package/tools/cli/lib/ui.js +5 -5
- package/tools/cli/lib/yaml-format.js +2 -1
- package/tools/schema/agent.js +2 -0
- package/.claude/commands/bmad/bmm/agents/paige.md +0 -82
- package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
- package/bmad/_cfg/agents/bmm-paige.customize.yaml +0 -42
- package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
- package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
- package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
- package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
- package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
- package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
- package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
- package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
- package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
- package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
- package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
- package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
- package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
- package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
- package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
- package/bmad/bmm/README.md.bak +0 -169
- package/bmad/bmm/agents/analyst.md.bak +0 -67
- package/bmad/bmm/agents/architect.md.bak +0 -73
- package/bmad/bmm/agents/dev.md.bak +0 -69
- package/bmad/bmm/agents/paige.md.bak +0 -82
- package/bmad/bmm/agents/pm.md.bak +0 -76
- package/bmad/bmm/agents/sm.md.bak +0 -85
- package/bmad/bmm/agents/tea.md.bak +0 -72
- package/bmad/bmm/agents/ux-designer.md.bak +0 -71
- package/bmad/bmm/docs/README.md +0 -235
- package/bmad/bmm/docs/agents-guide.md +0 -1057
- package/bmad/bmm/docs/brownfield-guide.md +0 -759
- package/bmad/bmm/docs/enterprise-agentic-development.md +0 -680
- package/bmad/bmm/docs/faq.md +0 -589
- package/bmad/bmm/docs/glossary.md +0 -321
- package/bmad/bmm/docs/party-mode.md +0 -224
- package/bmad/bmm/docs/quick-spec-flow.md +0 -652
- package/bmad/bmm/docs/quick-start.md +0 -366
- package/bmad/bmm/docs/scale-adaptive-system.md +0 -599
- package/bmad/bmm/docs/troubleshooting.md +0 -680
- package/bmad/bmm/docs/workflow-architecture-reference.md +0 -371
- package/bmad/bmm/docs/workflow-document-project-reference.md +0 -487
- package/bmad/bmm/docs/workflows-analysis.md +0 -670
- package/bmad/bmm/docs/workflows-implementation.md +0 -1758
- package/bmad/bmm/docs/workflows-planning.md +0 -1086
- package/bmad/bmm/docs/workflows-solutioning.md +0 -726
- package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +0 -60
- package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +0 -238
- package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +0 -27
- package/bmad/cis/README.md +0 -153
- package/bmad/cis/agents/README.md +0 -104
- package/bmad/cis/agents/brainstorming-coach.md +0 -62
- package/bmad/cis/agents/brainstorming-coach.md.bak +0 -62
- package/bmad/cis/agents/creative-problem-solver.md +0 -62
- package/bmad/cis/agents/creative-problem-solver.md.bak +0 -62
- package/bmad/cis/agents/design-thinking-coach.md +0 -62
- package/bmad/cis/agents/design-thinking-coach.md.bak +0 -62
- package/bmad/cis/agents/innovation-strategist.md +0 -62
- package/bmad/cis/agents/innovation-strategist.md.bak +0 -62
- package/bmad/cis/agents/storyteller.md +0 -59
- package/bmad/cis/agents/storyteller.md.bak +0 -59
- package/bmad/cis/config.yaml +0 -10
- package/bmad/cis/teams/creative-squad.yaml +0 -6
- package/bmad/cis/workflows/README.md +0 -139
- package/bmad/cis/workflows/design-thinking/README.md +0 -56
- package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
- package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
- package/bmad/cis/workflows/design-thinking/template.md +0 -111
- package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
- package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
- package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
- package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
- package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
- package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
- package/bmad/cis/workflows/problem-solving/README.md +0 -56
- package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
- package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
- package/bmad/cis/workflows/problem-solving/template.md +0 -165
- package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
- package/bmad/cis/workflows/storytelling/README.md +0 -58
- package/bmad/cis/workflows/storytelling/instructions.md +0 -291
- package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
- package/bmad/cis/workflows/storytelling/template.md +0 -113
- package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
- package/bmad/core/agents/bmad-master.md.bak +0 -71
|
@@ -1,1758 +1,284 @@
|
|
|
1
1
|
# BMM Implementation Workflows (Phase 4)
|
|
2
2
|
|
|
3
|
-
**Reading Time:** ~
|
|
3
|
+
**Reading Time:** ~8 minutes
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Phase 4 (Implementation) workflows manage the iterative sprint-based development cycle
|
|
7
|
+
Phase 4 (Implementation) workflows manage the iterative sprint-based development cycle using a **story-centric workflow** where each story moves through a defined lifecycle from creation to completion.
|
|
8
8
|
|
|
9
9
|
**Key principle:** One story at a time, move it through the entire lifecycle before starting the next.
|
|
10
10
|
|
|
11
|
-
## Quick Reference
|
|
12
|
-
|
|
13
|
-
| Workflow | Agent | Duration | Purpose |
|
|
14
|
-
| --------------------- | ------- | -------------- | ------------------------------------ |
|
|
15
|
-
| **sprint-planning** | SM | 30-60 min | Initialize sprint tracking file |
|
|
16
|
-
| **epic-tech-context** | SM | 15-30 min/epic | Epic-specific technical guidance |
|
|
17
|
-
| **create-story** | SM | 10-20 min | Create next story from epics |
|
|
18
|
-
| **story-context** | PM | 10-15 min | Assemble dynamic story context |
|
|
19
|
-
| **dev-story** | DEV | 2-8 hours | Implement story with tests |
|
|
20
|
-
| **code-review** | DEV | 30-60 min | Senior dev review of completed story |
|
|
21
|
-
| **correct-course** | SM | 30-90 min | Handle mid-sprint changes |
|
|
22
|
-
| **retrospective** | SM | 60-90 min | Post-epic review and lessons |
|
|
23
|
-
| **workflow-status** | All | 2-5 min | Check "what should I do now?" |
|
|
24
|
-
| **document-project** | Analyst | 1-3 hours | Document brownfield projects |
|
|
25
|
-
|
|
26
11
|
---
|
|
27
12
|
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
**Enables:**
|
|
112
|
-
|
|
113
|
-
- workflow-status to answer "what's next?"
|
|
114
|
-
- Progress tracking throughout implementation
|
|
115
|
-
- Dependency management
|
|
116
|
-
- Velocity measurement
|
|
117
|
-
|
|
118
|
-
### Process Overview
|
|
119
|
-
|
|
120
|
-
**Phase 1: Context Loading (Step 1)**
|
|
121
|
-
|
|
122
|
-
- Load epics.md
|
|
123
|
-
- Load individual epic files
|
|
124
|
-
- Load architecture.md (if exists)
|
|
125
|
-
- Extract all stories
|
|
126
|
-
|
|
127
|
-
**Phase 2: Story Extraction (Steps 2-3)**
|
|
128
|
-
|
|
129
|
-
- Parse stories from epic files
|
|
130
|
-
- Extract acceptance criteria
|
|
131
|
-
- Identify priorities (P0/P1/P2/P3)
|
|
132
|
-
- Extract dependencies
|
|
133
|
-
|
|
134
|
-
**Phase 3: Sprint Assignment (Steps 4-5)**
|
|
135
|
-
|
|
136
|
-
- Group stories by epic
|
|
137
|
-
- Sequence by priority and dependencies
|
|
138
|
-
- Assign to sprints (Sprint 1, 2, 3, etc.)
|
|
139
|
-
- Calculate sprint capacity estimates
|
|
140
|
-
|
|
141
|
-
**Phase 4: Status File Creation (Step 6)**
|
|
142
|
-
|
|
143
|
-
- Generate sprint-status.yaml
|
|
144
|
-
- Initialize all stories as TODO
|
|
145
|
-
- Document sprint plan
|
|
146
|
-
- Save to output folder
|
|
147
|
-
|
|
148
|
-
### Inputs
|
|
149
|
-
|
|
150
|
-
Required:
|
|
151
|
-
|
|
152
|
-
- epics.md
|
|
153
|
-
- Epic files (epic-1-_.md, epic-2-_.md, etc.)
|
|
154
|
-
|
|
155
|
-
Optional:
|
|
156
|
-
|
|
157
|
-
- architecture.md (for technical dependencies)
|
|
158
|
-
- Team velocity data (for sprint sizing)
|
|
159
|
-
|
|
160
|
-
### Outputs
|
|
161
|
-
|
|
162
|
-
**Primary Output:** `sprint-status.yaml`
|
|
163
|
-
|
|
164
|
-
**File Structure:**
|
|
165
|
-
|
|
166
|
-
```yaml
|
|
167
|
-
metadata:
|
|
168
|
-
project_name: 'E-Commerce Platform'
|
|
169
|
-
total_epics: 3
|
|
170
|
-
total_stories: 24
|
|
171
|
-
current_sprint: 1
|
|
172
|
-
sprint_start_date: '2025-11-02'
|
|
173
|
-
|
|
174
|
-
sprints:
|
|
175
|
-
sprint_1:
|
|
176
|
-
name: 'Epic 1: Authentication'
|
|
177
|
-
start_date: '2025-11-02'
|
|
178
|
-
end_date: '2025-11-15'
|
|
179
|
-
capacity_points: 40
|
|
180
|
-
stories:
|
|
181
|
-
- id: '1.1'
|
|
182
|
-
title: 'User can register with email'
|
|
183
|
-
status: 'TODO'
|
|
184
|
-
priority: 'P0'
|
|
185
|
-
epic: 1
|
|
186
|
-
estimated_hours: 8
|
|
187
|
-
assigned_to: null
|
|
188
|
-
dependencies: []
|
|
189
|
-
- id: '1.2'
|
|
190
|
-
title: 'User can login with email'
|
|
191
|
-
status: 'TODO'
|
|
192
|
-
priority: 'P0'
|
|
193
|
-
epic: 1
|
|
194
|
-
estimated_hours: 6
|
|
195
|
-
assigned_to: null
|
|
196
|
-
dependencies: ['1.1']
|
|
197
|
-
|
|
198
|
-
sprint_2:
|
|
199
|
-
name: 'Epic 2: Product Catalog'
|
|
200
|
-
# ...
|
|
201
|
-
|
|
202
|
-
story_queue:
|
|
203
|
-
- '1.1' # No dependencies, P0
|
|
204
|
-
- '1.2' # Depends on 1.1, P0
|
|
205
|
-
- '1.3' # Depends on 1.2, P0
|
|
206
|
-
# ...
|
|
207
|
-
|
|
208
|
-
epics:
|
|
209
|
-
- id: 1
|
|
210
|
-
name: 'Authentication'
|
|
211
|
-
total_stories: 8
|
|
212
|
-
completed_stories: 0
|
|
213
|
-
status: 'IN_PROGRESS'
|
|
214
|
-
- id: 2
|
|
215
|
-
name: 'Product Catalog'
|
|
216
|
-
total_stories: 10
|
|
217
|
-
completed_stories: 0
|
|
218
|
-
status: 'TODO'
|
|
219
|
-
- id: 3
|
|
220
|
-
name: 'Shopping Cart'
|
|
221
|
-
total_stories: 6
|
|
222
|
-
completed_stories: 0
|
|
223
|
-
status: 'TODO'
|
|
13
|
+
## Phase 4 Workflow Lifecycle
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#fff','primaryTextColor':'#000','primaryBorderColor':'#000','lineColor':'#000','fontSize':'16px','fontFamily':'arial'}}}%%
|
|
17
|
+
graph TB
|
|
18
|
+
subgraph Setup["<b>SPRINT SETUP - Run Once</b>"]
|
|
19
|
+
direction TB
|
|
20
|
+
SprintPlanning["<b>SM: sprint-planning</b><br/>Initialize sprint status file"]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
subgraph EpicCycle["<b>EPIC CYCLE - Repeat Per Epic</b>"]
|
|
24
|
+
direction TB
|
|
25
|
+
EpicContext["<b>SM: epic-tech-context</b><br/>Generate epic technical guidance"]
|
|
26
|
+
ValidateEpic["<b>SM: validate-epic-tech-context</b><br/>(Optional validation)"]
|
|
27
|
+
|
|
28
|
+
EpicContext -.->|Optional| ValidateEpic
|
|
29
|
+
ValidateEpic -.-> StoryLoopStart
|
|
30
|
+
EpicContext --> StoryLoopStart[Start Story Loop]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
subgraph StoryLoop["<b>STORY LIFECYCLE - Repeat Per Story</b>"]
|
|
34
|
+
direction TB
|
|
35
|
+
|
|
36
|
+
CreateStory["<b>SM: create-story</b><br/>Create next story from queue"]
|
|
37
|
+
ValidateStory["<b>SM: validate-create-story</b><br/>(Optional validation)"]
|
|
38
|
+
StoryContext["<b>SM: story-context</b><br/>Assemble dynamic context"]
|
|
39
|
+
StoryReady["<b>SM: story-ready-for-dev</b><br/>Mark ready without context"]
|
|
40
|
+
ValidateContext["<b>SM: validate-story-context</b><br/>(Optional validation)"]
|
|
41
|
+
DevStory["<b>DEV: develop-story</b><br/>Implement with tests"]
|
|
42
|
+
CodeReview["<b>DEV: code-review</b><br/>Senior dev review"]
|
|
43
|
+
StoryDone["<b>DEV: story-done</b><br/>Mark complete, advance queue"]
|
|
44
|
+
|
|
45
|
+
CreateStory -.->|Optional| ValidateStory
|
|
46
|
+
ValidateStory -.-> StoryContext
|
|
47
|
+
CreateStory --> StoryContext
|
|
48
|
+
CreateStory -.->|Alternative| StoryReady
|
|
49
|
+
StoryContext -.->|Optional| ValidateContext
|
|
50
|
+
ValidateContext -.-> DevStory
|
|
51
|
+
StoryContext --> DevStory
|
|
52
|
+
StoryReady -.-> DevStory
|
|
53
|
+
DevStory --> CodeReview
|
|
54
|
+
CodeReview -.->|Needs fixes| DevStory
|
|
55
|
+
CodeReview --> StoryDone
|
|
56
|
+
StoryDone -.->|Next story| CreateStory
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
subgraph EpicClose["<b>EPIC COMPLETION</b>"]
|
|
60
|
+
direction TB
|
|
61
|
+
Retrospective["<b>SM: epic-retrospective</b><br/>Post-epic lessons learned"]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
subgraph Support["<b>SUPPORTING WORKFLOWS</b>"]
|
|
65
|
+
direction TB
|
|
66
|
+
CorrectCourse["<b>SM: correct-course</b><br/>Handle mid-sprint changes"]
|
|
67
|
+
WorkflowStatus["<b>Any Agent: workflow-status</b><br/>Check what's next"]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Setup --> EpicCycle
|
|
71
|
+
EpicCycle --> StoryLoop
|
|
72
|
+
StoryLoop --> EpicClose
|
|
73
|
+
EpicClose -.->|Next epic| EpicCycle
|
|
74
|
+
StoryLoop -.->|If issues arise| CorrectCourse
|
|
75
|
+
StoryLoop -.->|Anytime| WorkflowStatus
|
|
76
|
+
EpicCycle -.->|Anytime| WorkflowStatus
|
|
77
|
+
|
|
78
|
+
style Setup fill:#e3f2fd,stroke:#1565c0,stroke-width:3px,color:#000
|
|
79
|
+
style EpicCycle fill:#c5e1a5,stroke:#33691e,stroke-width:3px,color:#000
|
|
80
|
+
style StoryLoop fill:#f3e5f5,stroke:#6a1b9a,stroke-width:3px,color:#000
|
|
81
|
+
style EpicClose fill:#ffcc80,stroke:#e65100,stroke-width:3px,color:#000
|
|
82
|
+
style Support fill:#fff3e0,stroke:#e65100,stroke-width:3px,color:#000
|
|
83
|
+
|
|
84
|
+
style SprintPlanning fill:#90caf9,stroke:#0d47a1,stroke-width:2px,color:#000
|
|
85
|
+
style EpicContext fill:#aed581,stroke:#1b5e20,stroke-width:2px,color:#000
|
|
86
|
+
style ValidateEpic fill:#c5e1a5,stroke:#33691e,stroke-width:1px,color:#000
|
|
87
|
+
style CreateStory fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
|
88
|
+
style ValidateStory fill:#e1bee7,stroke:#6a1b9a,stroke-width:1px,color:#000
|
|
89
|
+
style StoryContext fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
|
90
|
+
style StoryReady fill:#ce93d8,stroke:#4a148c,stroke-width:2px,color:#000
|
|
91
|
+
style ValidateContext fill:#e1bee7,stroke:#6a1b9a,stroke-width:1px,color:#000
|
|
92
|
+
style DevStory fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
|
93
|
+
style CodeReview fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
|
94
|
+
style StoryDone fill:#a5d6a7,stroke:#1b5e20,stroke-width:2px,color:#000
|
|
95
|
+
style Retrospective fill:#ffb74d,stroke:#e65100,stroke-width:2px,color:#000
|
|
224
96
|
```
|
|
225
97
|
|
|
226
|
-
### Example Scenario
|
|
227
|
-
|
|
228
|
-
**Input:** 3 epics with 24 total stories
|
|
229
|
-
|
|
230
|
-
**Output:**
|
|
231
|
-
|
|
232
|
-
- **Sprint 1**: Epic 1 (8 stories, 2 weeks)
|
|
233
|
-
- **Sprint 2**: Epic 2 (10 stories, 2 weeks)
|
|
234
|
-
- **Sprint 3**: Epic 3 (6 stories, 1 week)
|
|
235
|
-
|
|
236
|
-
**Story Queue:**
|
|
237
|
-
|
|
238
|
-
1. Story 1.1 (P0, no deps) → Start here
|
|
239
|
-
2. Story 1.2 (P0, deps: 1.1)
|
|
240
|
-
3. Story 1.3 (P0, deps: 1.2)
|
|
241
|
-
4. Story 2.1 (P0, no deps) → Can parallelize with 1.x
|
|
242
|
-
...
|
|
243
|
-
|
|
244
|
-
### Related Workflows
|
|
245
|
-
|
|
246
|
-
- **solutioning-gate-check** (Phase 3) - Must PASS before sprint-planning
|
|
247
|
-
- **workflow-status** - Uses sprint-status.yaml to answer "what's next?"
|
|
248
|
-
- **create-story** - Uses story_queue to determine next story
|
|
249
|
-
|
|
250
98
|
---
|
|
251
99
|
|
|
252
|
-
##
|
|
253
|
-
|
|
254
|
-
### Purpose
|
|
255
|
-
|
|
256
|
-
Generate epic-specific technical context document that provides implementation guidance, patterns, and technical decisions for a single epic. Bridges architecture and story implementation.
|
|
257
|
-
|
|
258
|
-
**Agent:** SM (Scrum Master)
|
|
259
|
-
**Phase:** 4 (Implementation)
|
|
260
|
-
**Required:** Optional (recommended for Level 3-4)
|
|
261
|
-
**Typical Duration:** 15-30 minutes per epic
|
|
262
|
-
|
|
263
|
-
### When to Use
|
|
264
|
-
|
|
265
|
-
Run **once per epic** before starting epic stories.
|
|
266
|
-
|
|
267
|
-
**Trigger Points:**
|
|
268
|
-
|
|
269
|
-
- Before implementing first story of an epic
|
|
270
|
-
- When starting a new epic in a sprint
|
|
271
|
-
- When architecture guidance is needed
|
|
272
|
-
|
|
273
|
-
**Skip if:**
|
|
274
|
-
|
|
275
|
-
- Level 0-1 (no epics)
|
|
276
|
-
- Level 2 (simple epics, architecture is straightforward)
|
|
277
|
-
|
|
278
|
-
### Purpose of Epic Tech Context
|
|
279
|
-
|
|
280
|
-
**Provides:**
|
|
281
|
-
|
|
282
|
-
- Epic-specific technical guidance
|
|
283
|
-
- Code patterns and examples
|
|
284
|
-
- Integration points
|
|
285
|
-
- Testing strategy for epic
|
|
286
|
-
- Epic-level architectural decisions
|
|
287
|
-
|
|
288
|
-
**Prevents:**
|
|
289
|
-
|
|
290
|
-
- Re-reading entire architecture.md for each story
|
|
291
|
-
- Inconsistent implementations within epic
|
|
292
|
-
- Missing epic-level integration patterns
|
|
293
|
-
|
|
294
|
-
### Process Overview
|
|
295
|
-
|
|
296
|
-
**Phase 1: Context Loading (Step 1)**
|
|
297
|
-
|
|
298
|
-
- Load architecture.md
|
|
299
|
-
- Load epic file (epic-X-\*.md)
|
|
300
|
-
- Load sprint-status.yaml
|
|
301
|
-
- Identify epic stories
|
|
302
|
-
|
|
303
|
-
**Phase 2: Technical Extraction (Steps 2-4)**
|
|
304
|
-
|
|
305
|
-
- Extract relevant architecture sections for epic
|
|
306
|
-
- Identify epic-specific ADRs
|
|
307
|
-
- Determine code patterns
|
|
308
|
-
- Identify integration points
|
|
309
|
-
|
|
310
|
-
**Phase 3: Implementation Guidance (Steps 5-7)**
|
|
311
|
-
|
|
312
|
-
- Define directory structure for epic
|
|
313
|
-
- Specify testing approach
|
|
314
|
-
- Provide code examples
|
|
315
|
-
- Document epic-level constants/config
|
|
316
|
-
|
|
317
|
-
**Phase 4: Documentation (Step 8)**
|
|
318
|
-
|
|
319
|
-
- Generate epic-tech-context.md
|
|
320
|
-
- Save to output folder
|
|
321
|
-
- Update sprint-status.yaml with context path
|
|
322
|
-
|
|
323
|
-
### Inputs
|
|
324
|
-
|
|
325
|
-
Required:
|
|
326
|
-
|
|
327
|
-
- architecture.md
|
|
328
|
-
- epic-X-\*.md (specific epic file)
|
|
329
|
-
- sprint-status.yaml
|
|
330
|
-
|
|
331
|
-
### Outputs
|
|
332
|
-
|
|
333
|
-
**Primary Output:** `epic-{N}-tech-context.md`
|
|
334
|
-
|
|
335
|
-
**Document Structure:**
|
|
336
|
-
|
|
337
|
-
1. Epic Overview
|
|
338
|
-
2. Relevant Architecture Decisions
|
|
339
|
-
- ADRs applicable to this epic
|
|
340
|
-
- Technology selections
|
|
341
|
-
3. Directory Structure
|
|
342
|
-
- Files to create/modify
|
|
343
|
-
- Module organization
|
|
344
|
-
4. Code Patterns
|
|
345
|
-
- Epic-specific patterns
|
|
346
|
-
- Code examples
|
|
347
|
-
5. Integration Points
|
|
348
|
-
- APIs to create/consume
|
|
349
|
-
- Database interactions
|
|
350
|
-
- Third-party services
|
|
351
|
-
6. Testing Strategy
|
|
352
|
-
- Test levels for epic (E2E, API, Unit)
|
|
353
|
-
- Test fixtures needed
|
|
354
|
-
- Mock strategies
|
|
355
|
-
7. Configuration
|
|
356
|
-
- Environment variables
|
|
357
|
-
- Feature flags
|
|
358
|
-
- Constants
|
|
359
|
-
|
|
360
|
-
### Example: Epic 1 Tech Context (Authentication)
|
|
361
|
-
|
|
362
|
-
```markdown
|
|
363
|
-
# Epic 1 Tech Context: Authentication
|
|
364
|
-
|
|
365
|
-
## Architecture Decisions
|
|
366
|
-
|
|
367
|
-
**ADR-001: Use NextAuth.js**
|
|
368
|
-
|
|
369
|
-
- All stories in this epic use NextAuth.js
|
|
370
|
-
- Database adapter: PostgreSQL (via Prisma)
|
|
371
|
-
- Session strategy: Database sessions (not JWT)
|
|
372
|
-
|
|
373
|
-
**ADR-003: Password Security**
|
|
374
|
-
|
|
375
|
-
- Use bcrypt with 12 rounds
|
|
376
|
-
- Minimum password length: 8 characters
|
|
377
|
-
- Require: uppercase, lowercase, number
|
|
378
|
-
|
|
379
|
-
## Directory Structure
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
/pages/api/auth/
|
|
383
|
-
[...nextauth].ts # Story 1.1
|
|
384
|
-
register.ts # Story 1.2
|
|
385
|
-
verify-email.ts # Story 1.3
|
|
386
|
-
|
|
387
|
-
/lib/auth/
|
|
388
|
-
validation.ts # Story 1.2
|
|
389
|
-
email-service.ts # Story 1.3
|
|
390
|
-
|
|
391
|
-
/prisma/schema.prisma
|
|
392
|
-
User model # Story 1.1
|
|
393
|
-
Session model # Story 1.1
|
|
394
|
-
|
|
395
|
-
````
|
|
396
|
-
|
|
397
|
-
## Code Patterns
|
|
398
|
-
|
|
399
|
-
**User Registration (Story 1.2):**
|
|
400
|
-
```typescript
|
|
401
|
-
// /lib/auth/validation.ts
|
|
402
|
-
export const validatePassword = (password: string) => {
|
|
403
|
-
const minLength = 8;
|
|
404
|
-
const hasUppercase = /[A-Z]/.test(password);
|
|
405
|
-
const hasLowercase = /[a-z]/.test(password);
|
|
406
|
-
const hasNumber = /\d/.test(password);
|
|
407
|
-
|
|
408
|
-
if (password.length < minLength) {
|
|
409
|
-
throw new Error('Password too short');
|
|
410
|
-
}
|
|
411
|
-
// ...
|
|
412
|
-
};
|
|
413
|
-
````
|
|
414
|
-
|
|
415
|
-
## Integration Points
|
|
416
|
-
|
|
417
|
-
**Database:**
|
|
418
|
-
|
|
419
|
-
- Create User table with Prisma migration (Story 1.1)
|
|
420
|
-
- Create Session table with Prisma migration (Story 1.1)
|
|
421
|
-
|
|
422
|
-
**Third-Party Services:**
|
|
423
|
-
|
|
424
|
-
- SendGrid for email verification (Story 1.3)
|
|
425
|
-
- API Key: SENDGRID_API_KEY env variable
|
|
426
|
-
- From email: no-reply@example.com
|
|
427
|
-
|
|
428
|
-
## Testing Strategy
|
|
429
|
-
|
|
430
|
-
**E2E Tests:**
|
|
431
|
-
|
|
432
|
-
- Story 1.1: Full registration flow
|
|
433
|
-
- Story 1.2: Login flow
|
|
434
|
-
- Story 1.3: Email verification flow
|
|
435
|
-
|
|
436
|
-
**API Tests:**
|
|
437
|
-
|
|
438
|
-
- All /api/auth/\* endpoints
|
|
439
|
-
- Error cases: duplicate email, invalid password
|
|
440
|
-
|
|
441
|
-
**Unit Tests:**
|
|
442
|
-
|
|
443
|
-
- validation.ts functions
|
|
444
|
-
- email-service.ts functions
|
|
445
|
-
|
|
446
|
-
**Test Fixtures:**
|
|
447
|
-
|
|
448
|
-
- Create `tests/fixtures/auth.fixture.ts`
|
|
449
|
-
- Provide: createTestUser(), loginTestUser(), cleanupTestUser()
|
|
450
|
-
|
|
451
|
-
## Configuration
|
|
452
|
-
|
|
453
|
-
**Environment Variables:**
|
|
454
|
-
|
|
455
|
-
```
|
|
456
|
-
DATABASE_URL=postgresql://...
|
|
457
|
-
NEXTAUTH_URL=http://localhost:3000
|
|
458
|
-
NEXTAUTH_SECRET=<generate-random-string>
|
|
459
|
-
SENDGRID_API_KEY=SG.xxx
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
**Constants:**
|
|
463
|
-
|
|
464
|
-
```typescript
|
|
465
|
-
// /lib/auth/constants.ts
|
|
466
|
-
export const PASSWORD_MIN_LENGTH = 8;
|
|
467
|
-
export const BCRYPT_ROUNDS = 12;
|
|
468
|
-
export const EMAIL_VERIFICATION_EXPIRY_HOURS = 24;
|
|
469
|
-
```
|
|
470
|
-
|
|
471
|
-
````
|
|
472
|
-
|
|
473
|
-
### Related Workflows
|
|
474
|
-
- **architecture** (Phase 3) - Source of technical guidance
|
|
475
|
-
- **story-context** - Uses epic-tech-context as input
|
|
476
|
-
- **dev-story** - References epic-tech-context during implementation
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
## create-story
|
|
481
|
-
|
|
482
|
-
### Purpose
|
|
483
|
-
Create the next user story markdown from epics/PRD and architecture, using a standard template and saving to the stories folder.
|
|
484
|
-
|
|
485
|
-
**Agent:** SM (Scrum Master)
|
|
486
|
-
**Phase:** 4 (Implementation)
|
|
487
|
-
**Required:** Yes (for each story)
|
|
488
|
-
**Typical Duration:** 10-20 minutes per story
|
|
489
|
-
|
|
490
|
-
### When to Use
|
|
491
|
-
Run **before implementing each story** to generate story file.
|
|
492
|
-
|
|
493
|
-
**Trigger Points:**
|
|
494
|
-
- Before starting work on a new story
|
|
495
|
-
- When story_queue identifies next story
|
|
496
|
-
- After completing previous story
|
|
497
|
-
|
|
498
|
-
### Process Overview
|
|
499
|
-
|
|
500
|
-
**Phase 1: Story Selection (Step 1)**
|
|
501
|
-
- Load sprint-status.yaml
|
|
502
|
-
- Read story_queue
|
|
503
|
-
- Select next story (first in queue with dependencies met)
|
|
504
|
-
|
|
505
|
-
**Phase 2: Story Extraction (Steps 2-3)**
|
|
506
|
-
- Load epic file for selected story
|
|
507
|
-
- Extract story details
|
|
508
|
-
- Extract acceptance criteria
|
|
509
|
-
- Extract dependencies
|
|
510
|
-
|
|
511
|
-
**Phase 3: Context Gathering (Steps 4-5)**
|
|
512
|
-
- Load PRD/GDD for product context
|
|
513
|
-
- Load architecture for technical context
|
|
514
|
-
- Load epic-tech-context (if exists)
|
|
515
|
-
|
|
516
|
-
**Phase 4: Story File Creation (Step 6)**
|
|
517
|
-
- Generate story markdown using template
|
|
518
|
-
- Include acceptance criteria
|
|
519
|
-
- Include technical notes
|
|
520
|
-
- Save to stories/ folder
|
|
521
|
-
|
|
522
|
-
**Phase 5: Status Update (Step 7)**
|
|
523
|
-
- Update sprint-status.yaml
|
|
524
|
-
- Move story from TODO → IN PROGRESS
|
|
525
|
-
- Update workflow-status.md
|
|
526
|
-
|
|
527
|
-
### Inputs
|
|
528
|
-
Required:
|
|
529
|
-
- sprint-status.yaml (story queue)
|
|
530
|
-
- epic-X-*.md (for story details)
|
|
531
|
-
- PRD.md or GDD.md
|
|
532
|
-
|
|
533
|
-
Optional:
|
|
534
|
-
- architecture.md
|
|
535
|
-
- epic-tech-context.md
|
|
536
|
-
|
|
537
|
-
### Outputs
|
|
538
|
-
|
|
539
|
-
**Primary Output:** `story-{epic}.{num}-{title}.md`
|
|
540
|
-
|
|
541
|
-
**Story File Structure:**
|
|
542
|
-
```markdown
|
|
543
|
-
# Story {Epic}.{Num}: {Title}
|
|
544
|
-
|
|
545
|
-
**Epic:** {Epic Name}
|
|
546
|
-
**Priority:** P0/P1/P2/P3
|
|
547
|
-
**Status:** IN PROGRESS
|
|
548
|
-
**Estimated Hours:** {Hours}
|
|
549
|
-
**Dependencies:** {Story IDs or "None"}
|
|
550
|
-
|
|
551
|
-
## User Story
|
|
552
|
-
|
|
553
|
-
As a {user type},
|
|
554
|
-
I want to {action},
|
|
555
|
-
So that {benefit}.
|
|
556
|
-
|
|
557
|
-
## Acceptance Criteria
|
|
558
|
-
|
|
559
|
-
- [ ] AC-1: {Criterion}
|
|
560
|
-
- [ ] AC-2: {Criterion}
|
|
561
|
-
- [ ] AC-3: {Criterion}
|
|
562
|
-
|
|
563
|
-
## Technical Notes
|
|
564
|
-
|
|
565
|
-
{From architecture/epic-tech-context}
|
|
566
|
-
|
|
567
|
-
## Implementation Checklist
|
|
568
|
-
|
|
569
|
-
- [ ] Read story-context.xml for dynamic context
|
|
570
|
-
- [ ] Implement feature code
|
|
571
|
-
- [ ] Write tests (unit, integration, E2E as needed)
|
|
572
|
-
- [ ] Update documentation
|
|
573
|
-
- [ ] Run tests locally
|
|
574
|
-
- [ ] Verify acceptance criteria
|
|
575
|
-
- [ ] Mark story as READY FOR REVIEW
|
|
576
|
-
|
|
577
|
-
## Definition of Done
|
|
578
|
-
|
|
579
|
-
- [ ] All acceptance criteria met
|
|
580
|
-
- [ ] Tests written and passing
|
|
581
|
-
- [ ] Code reviewed
|
|
582
|
-
- [ ] Documentation updated
|
|
583
|
-
- [ ] No regressions in existing features
|
|
584
|
-
````
|
|
585
|
-
|
|
586
|
-
### Example: Story 1.2 - User Can Login
|
|
587
|
-
|
|
588
|
-
```markdown
|
|
589
|
-
# Story 1.2: User Can Login with Email
|
|
590
|
-
|
|
591
|
-
**Epic:** Epic 1 - Authentication
|
|
592
|
-
**Priority:** P0
|
|
593
|
-
**Status:** IN PROGRESS
|
|
594
|
-
**Estimated Hours:** 6
|
|
595
|
-
**Dependencies:** Story 1.1 (User Registration)
|
|
596
|
-
|
|
597
|
-
## User Story
|
|
598
|
-
|
|
599
|
-
As a registered user,
|
|
600
|
-
I want to login with my email and password,
|
|
601
|
-
So that I can access my account.
|
|
602
|
-
|
|
603
|
-
## Acceptance Criteria
|
|
604
|
-
|
|
605
|
-
- [ ] AC-1: User can enter email and password on login page
|
|
606
|
-
- [ ] AC-2: Valid credentials redirect to dashboard
|
|
607
|
-
- [ ] AC-3: Invalid credentials show error message
|
|
608
|
-
- [ ] AC-4: Error message does not reveal if email exists (security)
|
|
609
|
-
- [ ] AC-5: Login creates session that persists across page refreshes
|
|
610
|
-
|
|
611
|
-
## Technical Notes
|
|
612
|
-
|
|
613
|
-
**From Architecture (ADR-001):**
|
|
614
|
-
|
|
615
|
-
- Use NextAuth.js with database session strategy
|
|
616
|
-
- Session stored in PostgreSQL via Prisma
|
|
617
|
-
|
|
618
|
-
**From Epic Tech Context:**
|
|
619
|
-
|
|
620
|
-
- Implement /pages/api/auth/[...nextauth].ts
|
|
621
|
-
- Use bcrypt.compare() for password validation
|
|
622
|
-
- Return generic error for security (don't reveal "email not found" vs "wrong password")
|
|
623
|
-
|
|
624
|
-
## Implementation Checklist
|
|
625
|
-
|
|
626
|
-
- [ ] Read story-context.xml
|
|
627
|
-
- [ ] Create /pages/login.tsx
|
|
628
|
-
- [ ] Configure NextAuth.js credentials provider
|
|
629
|
-
- [ ] Implement password comparison logic
|
|
630
|
-
- [ ] Write E2E test: Valid login → Dashboard
|
|
631
|
-
- [ ] Write E2E test: Invalid login → Error
|
|
632
|
-
- [ ] Write API test: POST /api/auth/callback/credentials
|
|
633
|
-
- [ ] Verify AC-1 through AC-5
|
|
634
|
-
- [ ] Mark READY FOR REVIEW
|
|
635
|
-
|
|
636
|
-
## Definition of Done
|
|
637
|
-
|
|
638
|
-
- [ ] Login page exists and is styled
|
|
639
|
-
- [ ] Valid credentials authenticate successfully
|
|
640
|
-
- [ ] Invalid credentials show error
|
|
641
|
-
- [ ] Session persists across page loads
|
|
642
|
-
- [ ] Tests pass (2 E2E, 3 API)
|
|
643
|
-
- [ ] Code reviewed
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
### Related Workflows
|
|
647
|
-
|
|
648
|
-
- **sprint-planning** - Creates story_queue
|
|
649
|
-
- **story-context** - Run after create-story
|
|
650
|
-
- **dev-story** - Implements the story
|
|
651
|
-
|
|
652
|
-
---
|
|
653
|
-
|
|
654
|
-
## story-context
|
|
655
|
-
|
|
656
|
-
### Purpose
|
|
657
|
-
|
|
658
|
-
Assemble dynamic story context XML by pulling latest documentation and existing code/library artifacts relevant to a drafted story.
|
|
659
|
-
|
|
660
|
-
**Agent:** PM (Project Manager)
|
|
661
|
-
**Phase:** 4 (Implementation)
|
|
662
|
-
**Required:** Yes (before implementing story)
|
|
663
|
-
**Typical Duration:** 10-15 minutes per story
|
|
664
|
-
|
|
665
|
-
### When to Use
|
|
666
|
-
|
|
667
|
-
Run **after create-story** and **before dev-story** for each story.
|
|
668
|
-
|
|
669
|
-
**Trigger Points:**
|
|
670
|
-
|
|
671
|
-
- Immediately after create-story generates story file
|
|
672
|
-
- Before DEV agent starts implementation
|
|
673
|
-
|
|
674
|
-
### Purpose of Story Context
|
|
675
|
-
|
|
676
|
-
**Problem Without Context:**
|
|
677
|
-
|
|
678
|
-
- DEV agent re-reads entire PRD, architecture, epic files (100+ pages)
|
|
679
|
-
- Slow context loading
|
|
680
|
-
- Irrelevant information clutters thinking
|
|
681
|
-
|
|
682
|
-
**Solution With Context:**
|
|
683
|
-
|
|
684
|
-
- PM assembles **only relevant** context for this story
|
|
685
|
-
- DEV agent receives focused, story-specific information
|
|
686
|
-
- Fast, targeted implementation
|
|
687
|
-
|
|
688
|
-
### Process Overview
|
|
689
|
-
|
|
690
|
-
**Phase 1: Story Loading (Step 1)**
|
|
691
|
-
|
|
692
|
-
- Load story file (story-{epic}.{num}-{title}.md)
|
|
693
|
-
- Extract story ID, epic, dependencies
|
|
694
|
-
- Extract acceptance criteria
|
|
695
|
-
|
|
696
|
-
**Phase 2: Documentation Context (Steps 2-4)**
|
|
697
|
-
|
|
698
|
-
- Load relevant PRD/GDD sections
|
|
699
|
-
- Load relevant architecture sections
|
|
700
|
-
- Load epic-tech-context (if exists)
|
|
701
|
-
- Load dependent story files
|
|
702
|
-
|
|
703
|
-
**Phase 3: Code Context (Steps 5-6)**
|
|
704
|
-
|
|
705
|
-
- Identify existing code files related to story
|
|
706
|
-
- Load relevant library code (models, services, utils)
|
|
707
|
-
- Load related test files
|
|
708
|
-
|
|
709
|
-
**Phase 4: Context Assembly (Step 7)**
|
|
710
|
-
|
|
711
|
-
- Generate story-context.xml
|
|
712
|
-
- Organize context by type (docs, code, tests)
|
|
713
|
-
- Include only relevant sections
|
|
714
|
-
- Save to output folder
|
|
715
|
-
|
|
716
|
-
### Inputs
|
|
717
|
-
|
|
718
|
-
Required:
|
|
719
|
-
|
|
720
|
-
- story-{epic}.{num}-{title}.md
|
|
721
|
-
|
|
722
|
-
Optional (loaded as needed):
|
|
723
|
-
|
|
724
|
-
- PRD.md or GDD.md
|
|
725
|
-
- architecture.md
|
|
726
|
-
- epic-tech-context.md
|
|
727
|
-
- Existing codebase files
|
|
728
|
-
|
|
729
|
-
### Outputs
|
|
730
|
-
|
|
731
|
-
**Primary Output:** `story-{epic}.{num}-context.xml`
|
|
732
|
-
|
|
733
|
-
**XML Structure:**
|
|
734
|
-
|
|
735
|
-
```xml
|
|
736
|
-
<story-context>
|
|
737
|
-
<story id="1.2" epic="1" title="User Can Login">
|
|
738
|
-
<acceptance-criteria>
|
|
739
|
-
<criterion id="AC-1">User can enter email and password on login page</criterion>
|
|
740
|
-
<criterion id="AC-2">Valid credentials redirect to dashboard</criterion>
|
|
741
|
-
<!-- ... -->
|
|
742
|
-
</acceptance-criteria>
|
|
743
|
-
</story>
|
|
744
|
-
|
|
745
|
-
<product-context>
|
|
746
|
-
<section source="PRD.md" name="Authentication Requirements">
|
|
747
|
-
<!-- Relevant PRD excerpt -->
|
|
748
|
-
</section>
|
|
749
|
-
</product-context>
|
|
750
|
-
|
|
751
|
-
<architecture-context>
|
|
752
|
-
<adr id="ADR-001" title="Use NextAuth.js">
|
|
753
|
-
<!-- Full ADR content -->
|
|
754
|
-
</adr>
|
|
755
|
-
<section source="architecture.md" name="Authentication Architecture">
|
|
756
|
-
<!-- Relevant architecture excerpt -->
|
|
757
|
-
</section>
|
|
758
|
-
</architecture-context>
|
|
759
|
-
|
|
760
|
-
<epic-context>
|
|
761
|
-
<section source="epic-1-tech-context.md">
|
|
762
|
-
<!-- Epic-specific technical guidance -->
|
|
763
|
-
</section>
|
|
764
|
-
</epic-context>
|
|
765
|
-
|
|
766
|
-
<code-context>
|
|
767
|
-
<file path="/prisma/schema.prisma">
|
|
768
|
-
<!-- Existing User model -->
|
|
769
|
-
</file>
|
|
770
|
-
<file path="/lib/auth/validation.ts">
|
|
771
|
-
<!-- Existing validation functions -->
|
|
772
|
-
</file>
|
|
773
|
-
</code-context>
|
|
774
|
-
|
|
775
|
-
<dependency-context>
|
|
776
|
-
<story id="1.1" title="User Can Register">
|
|
777
|
-
<!-- Story 1.1 summary for context -->
|
|
778
|
-
</story>
|
|
779
|
-
</dependency-context>
|
|
780
|
-
</story-context>
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
### Example: Story 1.2 Context Assembly
|
|
784
|
-
|
|
785
|
-
**Story 1.2: User Can Login**
|
|
786
|
-
|
|
787
|
-
**Context Assembled:**
|
|
788
|
-
|
|
789
|
-
1. **Product Context** (from PRD):
|
|
790
|
-
- Authentication requirements section (2 pages)
|
|
791
|
-
- User personas: Primary user is buyer
|
|
792
|
-
|
|
793
|
-
2. **Architecture Context** (from architecture.md):
|
|
794
|
-
- ADR-001: Use NextAuth.js (full ADR)
|
|
795
|
-
- Authentication Architecture section (1 page)
|
|
796
|
-
|
|
797
|
-
3. **Epic Context** (from epic-1-tech-context.md):
|
|
798
|
-
- Code patterns for login
|
|
799
|
-
- Integration points (NextAuth.js config)
|
|
800
|
-
- Testing strategy
|
|
801
|
-
|
|
802
|
-
4. **Code Context** (existing files):
|
|
803
|
-
- `/prisma/schema.prisma` - User and Session models
|
|
804
|
-
- `/lib/auth/validation.ts` - Password validation (from Story 1.1)
|
|
805
|
-
- `/pages/api/auth/[...nextauth].ts` - Auth config (created in Story 1.1)
|
|
806
|
-
|
|
807
|
-
5. **Dependency Context** (Story 1.1):
|
|
808
|
-
- Summary: User registration creates User in DB
|
|
809
|
-
- Dependency: User table must exist
|
|
810
|
-
|
|
811
|
-
**Result:** DEV agent receives 8-10 pages of **focused** context instead of 100+ pages of full documentation.
|
|
812
|
-
|
|
813
|
-
### Related Workflows
|
|
100
|
+
## Quick Reference
|
|
814
101
|
|
|
815
|
-
|
|
816
|
-
|
|
102
|
+
| Workflow | Agent | When | Purpose |
|
|
103
|
+
| ------------------------------ | ----- | -------------------------------- | ------------------------------------------- |
|
|
104
|
+
| **sprint-planning** | SM | Once at Phase 4 start | Initialize sprint tracking file |
|
|
105
|
+
| **epic-tech-context** | SM | Per epic | Generate epic-specific technical guidance |
|
|
106
|
+
| **validate-epic-tech-context** | SM | Optional after epic-tech-context | Validate tech spec against checklist |
|
|
107
|
+
| **create-story** | SM | Per story | Create next story from epic backlog |
|
|
108
|
+
| **validate-create-story** | SM | Optional after create-story | Independent validation of story draft |
|
|
109
|
+
| **story-context** | SM | Optional per story | Assemble dynamic story context XML |
|
|
110
|
+
| **validate-story-context** | SM | Optional after story-context | Validate story context against checklist |
|
|
111
|
+
| **story-ready-for-dev** | SM | Optional per story | Mark story ready without generating context |
|
|
112
|
+
| **develop-story** | DEV | Per story | Implement story with tests |
|
|
113
|
+
| **code-review** | DEV | Per story | Senior dev quality review |
|
|
114
|
+
| **story-done** | DEV | Per story | Mark complete and advance queue |
|
|
115
|
+
| **epic-retrospective** | SM | After epic complete | Review lessons and extract insights |
|
|
116
|
+
| **correct-course** | SM | When issues arise | Handle significant mid-sprint changes |
|
|
117
|
+
| **workflow-status** | Any | Anytime | Check "what should I do now?" |
|
|
817
118
|
|
|
818
119
|
---
|
|
819
120
|
|
|
820
|
-
##
|
|
821
|
-
|
|
822
|
-
### Purpose
|
|
823
|
-
|
|
824
|
-
Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria.
|
|
825
|
-
|
|
826
|
-
**Agent:** DEV (Developer)
|
|
827
|
-
**Phase:** 4 (Implementation)
|
|
828
|
-
**Required:** Yes (for each story)
|
|
829
|
-
**Typical Duration:** 2-8 hours per story (varies by complexity)
|
|
830
|
-
|
|
831
|
-
### When to Use
|
|
832
|
-
|
|
833
|
-
Run **after story-context** to implement the story.
|
|
834
|
-
|
|
835
|
-
**Trigger Points:**
|
|
836
|
-
|
|
837
|
-
- After story-context.xml is generated
|
|
838
|
-
- When story status is IN PROGRESS
|
|
839
|
-
- For each story in story_queue
|
|
840
|
-
|
|
841
|
-
### Process Overview
|
|
842
|
-
|
|
843
|
-
**Phase 1: Context Loading (Step 1)**
|
|
844
|
-
|
|
845
|
-
- Load story file
|
|
846
|
-
- Load story-context.xml
|
|
847
|
-
- Review acceptance criteria
|
|
848
|
-
- Review technical notes
|
|
849
|
-
|
|
850
|
-
**Phase 2: Implementation Planning (Steps 2-3)**
|
|
851
|
-
|
|
852
|
-
- Break story into tasks
|
|
853
|
-
- Identify files to create/modify
|
|
854
|
-
- Plan test strategy
|
|
855
|
-
- Estimate implementation approach
|
|
856
|
-
|
|
857
|
-
**Phase 3: Implementation (Steps 4-6)**
|
|
858
|
-
|
|
859
|
-
- Write code to satisfy acceptance criteria
|
|
860
|
-
- Follow architecture decisions
|
|
861
|
-
- Apply code patterns from epic-tech-context
|
|
862
|
-
- Write tests (unit, integration, E2E as needed)
|
|
863
|
-
|
|
864
|
-
**Phase 4: Validation (Steps 7-8)**
|
|
865
|
-
|
|
866
|
-
- Run tests locally
|
|
867
|
-
- Verify all acceptance criteria met
|
|
868
|
-
- Check for regressions
|
|
869
|
-
- Ensure code quality
|
|
121
|
+
## Agent Roles
|
|
870
122
|
|
|
871
|
-
|
|
123
|
+
### SM (Scrum Master) - Primary Implementation Orchestrator
|
|
872
124
|
|
|
873
|
-
-
|
|
874
|
-
- Document any deviations
|
|
875
|
-
- Mark story as READY FOR REVIEW
|
|
876
|
-
- Update sprint-status.yaml
|
|
125
|
+
**Workflows:** sprint-planning, epic-tech-context, validate-epic-tech-context, create-story, validate-create-story, story-context, validate-story-context, story-ready-for-dev, epic-retrospective, correct-course
|
|
877
126
|
|
|
878
|
-
|
|
127
|
+
**Responsibilities:**
|
|
879
128
|
|
|
880
|
-
|
|
129
|
+
- Initialize and maintain sprint tracking
|
|
130
|
+
- Generate technical context (epic and story level)
|
|
131
|
+
- Orchestrate story lifecycle with optional validations
|
|
132
|
+
- Mark stories ready for development
|
|
133
|
+
- Handle course corrections
|
|
134
|
+
- Facilitate retrospectives
|
|
881
135
|
|
|
882
|
-
-
|
|
883
|
-
- story-{epic}.{num}-context.xml
|
|
136
|
+
### DEV (Developer) - Implementation and Quality
|
|
884
137
|
|
|
885
|
-
|
|
138
|
+
**Workflows:** develop-story, code-review, story-done
|
|
886
139
|
|
|
887
|
-
|
|
888
|
-
- Test files
|
|
889
|
-
- Updated story file (AC checked off)
|
|
890
|
-
- Updated sprint-status.yaml (status: READY FOR REVIEW)
|
|
140
|
+
**Responsibilities:**
|
|
891
141
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
1. Create /pages/login.tsx (UI)
|
|
898
|
-
2. Configure NextAuth credentials provider
|
|
899
|
-
3. Implement password verification logic
|
|
900
|
-
4. Write E2E test: Valid login
|
|
901
|
-
5. Write E2E test: Invalid login
|
|
902
|
-
6. Write API test: /api/auth/callback/credentials
|
|
903
|
-
|
|
904
|
-
**Phase 2: Implementation**
|
|
905
|
-
Files created/modified:
|
|
906
|
-
|
|
907
|
-
- `/pages/login.tsx` (new)
|
|
908
|
-
- `/pages/api/auth/[...nextauth].ts` (modified - add credentials provider)
|
|
909
|
-
- `/lib/auth/password.ts` (new - password verification)
|
|
910
|
-
- `/tests/e2e/auth-login.spec.ts` (new)
|
|
911
|
-
- `/tests/api/auth-api.spec.ts` (modified - add login tests)
|
|
912
|
-
|
|
913
|
-
**Phase 3: Testing**
|
|
914
|
-
|
|
915
|
-
```bash
|
|
916
|
-
npm run test:e2e
|
|
917
|
-
npm run test:api
|
|
918
|
-
npm run test:unit
|
|
919
|
-
```
|
|
920
|
-
|
|
921
|
-
All tests pass ✅
|
|
922
|
-
|
|
923
|
-
**Phase 4: Verification**
|
|
924
|
-
|
|
925
|
-
- [x] AC-1: Login page exists with email/password inputs
|
|
926
|
-
- [x] AC-2: Valid credentials → Dashboard
|
|
927
|
-
- [x] AC-3: Invalid credentials → Error message
|
|
928
|
-
- [x] AC-4: Error message generic (security)
|
|
929
|
-
- [x] AC-5: Session persists across page refreshes
|
|
930
|
-
|
|
931
|
-
**Phase 5: Documentation**
|
|
932
|
-
Update story file:
|
|
933
|
-
|
|
934
|
-
```markdown
|
|
935
|
-
## Acceptance Criteria
|
|
936
|
-
|
|
937
|
-
- [x] AC-1: User can enter email and password on login page
|
|
938
|
-
- [x] AC-2: Valid credentials redirect to dashboard
|
|
939
|
-
- [x] AC-3: Invalid credentials show error message
|
|
940
|
-
- [x] AC-4: Error message does not reveal if email exists (security)
|
|
941
|
-
- [x] AC-5: Login creates session that persists across page refreshes
|
|
942
|
-
|
|
943
|
-
## Implementation Summary
|
|
944
|
-
|
|
945
|
-
Files Created:
|
|
946
|
-
|
|
947
|
-
- /pages/login.tsx
|
|
948
|
-
- /lib/auth/password.ts
|
|
949
|
-
- /tests/e2e/auth-login.spec.ts
|
|
950
|
-
|
|
951
|
-
Files Modified:
|
|
952
|
-
|
|
953
|
-
- /pages/api/auth/[...nextauth].ts
|
|
954
|
-
- /tests/api/auth-api.spec.ts
|
|
955
|
-
|
|
956
|
-
Tests Added:
|
|
957
|
-
|
|
958
|
-
- 2 E2E tests (valid/invalid login)
|
|
959
|
-
- 3 API tests (credentials endpoint)
|
|
960
|
-
|
|
961
|
-
**Status:** READY FOR REVIEW
|
|
962
|
-
```
|
|
963
|
-
|
|
964
|
-
### Related Workflows
|
|
965
|
-
|
|
966
|
-
- **story-context** - Provides focused context
|
|
967
|
-
- **code-review** - Next step after implementation
|
|
968
|
-
- **correct-course** - If changes needed mid-story
|
|
142
|
+
- Implement stories with tests
|
|
143
|
+
- Perform senior developer code reviews
|
|
144
|
+
- Mark stories complete and advance queue
|
|
145
|
+
- Ensure quality and adherence to standards
|
|
969
146
|
|
|
970
147
|
---
|
|
971
148
|
|
|
972
|
-
##
|
|
973
|
-
|
|
974
|
-
### Purpose
|
|
975
|
-
|
|
976
|
-
Perform a Senior Developer code review on a completed story flagged Ready for Review, leveraging story-context, epic-tech-context, repo docs, MCP servers for latest best-practices, and web search as fallback.
|
|
977
|
-
|
|
978
|
-
**Agent:** DEV (Senior Developer persona)
|
|
979
|
-
**Phase:** 4 (Implementation)
|
|
980
|
-
**Required:** Recommended (especially for P0/P1 stories)
|
|
981
|
-
**Typical Duration:** 30-60 minutes per story
|
|
982
|
-
|
|
983
|
-
### When to Use
|
|
984
|
-
|
|
985
|
-
Run **after dev-story** when story status is READY FOR REVIEW.
|
|
986
|
-
|
|
987
|
-
**Trigger Points:**
|
|
988
|
-
|
|
989
|
-
- Story status: READY FOR REVIEW
|
|
990
|
-
- Before marking story as DONE
|
|
991
|
-
- For P0/P1 stories (required)
|
|
992
|
-
- For P2/P3 stories (optional but recommended)
|
|
993
|
-
|
|
994
|
-
### Process Overview
|
|
995
|
-
|
|
996
|
-
**Phase 1: Context Loading (Step 1)**
|
|
997
|
-
|
|
998
|
-
- Load story file
|
|
999
|
-
- Load story-context.xml
|
|
1000
|
-
- Load implementation files
|
|
1001
|
-
- Load test files
|
|
1002
|
-
|
|
1003
|
-
**Phase 2: Review Criteria (Steps 2-5)**
|
|
1004
|
-
|
|
1005
|
-
- **Acceptance Criteria**: All AC met?
|
|
1006
|
-
- **Architecture Alignment**: Follows architecture decisions?
|
|
1007
|
-
- **Code Quality**: Readable, maintainable, follows conventions?
|
|
1008
|
-
- **Test Coverage**: Sufficient tests, tests passing?
|
|
1009
|
-
- **Best Practices**: Uses latest framework patterns?
|
|
1010
|
-
|
|
1011
|
-
**Phase 3: Knowledge Loading (Steps 6-7)**
|
|
1012
|
-
|
|
1013
|
-
- Load repository documentation (CONTRIBUTING.md, CODE_STYLE.md)
|
|
1014
|
-
- Use MCP servers for framework best practices (if available)
|
|
1015
|
-
- Web search for latest patterns (fallback)
|
|
1016
|
-
|
|
1017
|
-
**Phase 4: Review Execution (Steps 8-10)**
|
|
1018
|
-
|
|
1019
|
-
- Review each file changed
|
|
1020
|
-
- Identify issues (critical, high, medium, low)
|
|
1021
|
-
- Suggest improvements
|
|
1022
|
-
- Verify tests
|
|
1023
|
-
|
|
1024
|
-
**Phase 5: Review Report (Step 11)**
|
|
1025
|
-
|
|
1026
|
-
- Generate code-review.md
|
|
1027
|
-
- Append to story file
|
|
1028
|
-
- Update sprint-status.yaml
|
|
1029
|
-
|
|
1030
|
-
### Review Criteria
|
|
1031
|
-
|
|
1032
|
-
**Acceptance Criteria Validation:**
|
|
1033
|
-
|
|
1034
|
-
- [ ] All AC items checked off in story file
|
|
1035
|
-
- [ ] AC validated through tests
|
|
1036
|
-
- [ ] AC validated manually (if needed)
|
|
1037
|
-
|
|
1038
|
-
**Architecture Alignment:**
|
|
149
|
+
## Story Lifecycle States
|
|
1039
150
|
|
|
1040
|
-
|
|
1041
|
-
- [ ] Uses specified technology choices
|
|
1042
|
-
- [ ] Follows directory structure conventions
|
|
1043
|
-
- [ ] Follows code patterns from epic-tech-context
|
|
151
|
+
Stories move through these states in the sprint status file:
|
|
1044
152
|
|
|
1045
|
-
**
|
|
153
|
+
1. **TODO** - Story identified but not started
|
|
154
|
+
2. **IN PROGRESS** - Story being implemented (create-story → story-context → dev-story)
|
|
155
|
+
3. **READY FOR REVIEW** - Implementation complete, awaiting code review
|
|
156
|
+
4. **DONE** - Accepted and complete
|
|
1046
157
|
|
|
1047
|
-
- [ ] Readable and maintainable
|
|
1048
|
-
- [ ] Follows repository conventions
|
|
1049
|
-
- [ ] No code smells (long functions, god classes, etc.)
|
|
1050
|
-
- [ ] Appropriate error handling
|
|
1051
|
-
- [ ] Security best practices followed
|
|
1052
|
-
|
|
1053
|
-
**Test Coverage:**
|
|
1054
|
-
|
|
1055
|
-
- [ ] Tests exist for all AC
|
|
1056
|
-
- [ ] Tests pass locally
|
|
1057
|
-
- [ ] Edge cases covered
|
|
1058
|
-
- [ ] Tests follow framework best practices
|
|
1059
|
-
- [ ] No flaky tests
|
|
1060
|
-
|
|
1061
|
-
**Best Practices:**
|
|
1062
|
-
|
|
1063
|
-
- [ ] Uses latest framework patterns
|
|
1064
|
-
- [ ] Avoids deprecated APIs
|
|
1065
|
-
- [ ] Performance considerations addressed
|
|
1066
|
-
- [ ] Accessibility requirements met (if applicable)
|
|
1067
|
-
|
|
1068
|
-
### Inputs
|
|
1069
|
-
|
|
1070
|
-
Required:
|
|
1071
|
-
|
|
1072
|
-
- story-{epic}.{num}-{title}.md (with READY FOR REVIEW status)
|
|
1073
|
-
- story-{epic}.{num}-context.xml
|
|
1074
|
-
- Implementation files (code)
|
|
1075
|
-
- Test files
|
|
1076
|
-
|
|
1077
|
-
Optional:
|
|
1078
|
-
|
|
1079
|
-
- Repository documentation (CONTRIBUTING.md, CODE_STYLE.md)
|
|
1080
|
-
- MCP servers for best practices
|
|
1081
|
-
- Web search for latest patterns
|
|
1082
|
-
|
|
1083
|
-
### Outputs
|
|
1084
|
-
|
|
1085
|
-
**Primary Output:** Code review appended to story file
|
|
1086
|
-
|
|
1087
|
-
**Review Structure:**
|
|
1088
|
-
|
|
1089
|
-
````markdown
|
|
1090
158
|
---
|
|
1091
159
|
|
|
1092
|
-
##
|
|
1093
|
-
|
|
1094
|
-
**Reviewer:** DEV (Senior Developer)
|
|
1095
|
-
**Status:** APPROVED / REQUEST CHANGES / APPROVED WITH COMMENTS
|
|
1096
|
-
|
|
1097
|
-
### Summary
|
|
1098
|
-
|
|
1099
|
-
{Overall assessment}
|
|
1100
|
-
|
|
1101
|
-
### Acceptance Criteria Validation
|
|
1102
|
-
|
|
1103
|
-
- [x] AC-1: Validated ✅
|
|
1104
|
-
- [x] AC-2: Validated ✅
|
|
1105
|
-
- [x] AC-3: Validated ✅
|
|
1106
|
-
- [x] AC-4: Validated ✅
|
|
1107
|
-
- [x] AC-5: Validated ✅
|
|
1108
|
-
|
|
1109
|
-
### Architecture Alignment
|
|
1110
|
-
|
|
1111
|
-
✅ Follows ADR-001 (NextAuth.js)
|
|
1112
|
-
✅ Uses database session strategy
|
|
1113
|
-
✅ Follows epic-tech-context patterns
|
|
1114
|
-
|
|
1115
|
-
### Code Quality Issues
|
|
1116
|
-
|
|
1117
|
-
**Critical Issues (Must Fix):**
|
|
1118
|
-
None
|
|
1119
|
-
|
|
1120
|
-
**High Priority (Should Fix Before Merge):**
|
|
160
|
+
## Typical Sprint Flow
|
|
1121
161
|
|
|
1122
|
-
|
|
162
|
+
### Sprint 0 (Planning Phase)
|
|
1123
163
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
const hash = await bcrypt.hash(password, 12);
|
|
164
|
+
- Complete Phases 1-3 (Analysis, Planning, Solutioning)
|
|
165
|
+
- PRD/GDD + Architecture + Epics ready
|
|
1127
166
|
|
|
1128
|
-
|
|
1129
|
-
import { BCRYPT_ROUNDS } from './constants';
|
|
1130
|
-
const hash = await bcrypt.hash(password, BCRYPT_ROUNDS);
|
|
1131
|
-
```
|
|
1132
|
-
````
|
|
167
|
+
### Sprint 1+ (Implementation Phase)
|
|
1133
168
|
|
|
1134
|
-
**
|
|
169
|
+
**Start of Phase 4:**
|
|
1135
170
|
|
|
1136
|
-
1.
|
|
1137
|
-
2. Add JSDoc comments to public functions in /lib/auth/password.ts
|
|
171
|
+
1. SM runs `sprint-planning` (once)
|
|
1138
172
|
|
|
1139
|
-
**
|
|
173
|
+
**Per Epic:**
|
|
1140
174
|
|
|
1141
|
-
1.
|
|
175
|
+
1. SM runs `epic-tech-context`
|
|
176
|
+
2. SM optionally runs `validate-epic-tech-context`
|
|
1142
177
|
|
|
1143
|
-
|
|
178
|
+
**Per Story (repeat until epic complete):**
|
|
1144
179
|
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
180
|
+
1. SM runs `create-story`
|
|
181
|
+
2. SM optionally runs `validate-create-story`
|
|
182
|
+
3. SM runs `story-context` OR `story-ready-for-dev` (choose one)
|
|
183
|
+
4. SM optionally runs `validate-story-context` (if story-context was used)
|
|
184
|
+
5. DEV runs `develop-story`
|
|
185
|
+
6. DEV runs `code-review`
|
|
186
|
+
7. If code review passes: DEV runs `story-done`
|
|
187
|
+
8. If code review finds issues: DEV fixes in `develop-story`, then back to code-review
|
|
1148
188
|
|
|
1149
|
-
|
|
189
|
+
**After Epic Complete:**
|
|
1150
190
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
✅ Accessibility: Form has labels and error messages
|
|
191
|
+
- SM runs `epic-retrospective`
|
|
192
|
+
- Move to next epic (start with `epic-tech-context` again)
|
|
1154
193
|
|
|
1155
|
-
|
|
194
|
+
**As Needed:**
|
|
1156
195
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
Medium/low priority items can be addressed in future stories.
|
|
1160
|
-
|
|
1161
|
-
````
|
|
1162
|
-
|
|
1163
|
-
### Review Outcomes
|
|
1164
|
-
|
|
1165
|
-
**APPROVED** ✅
|
|
1166
|
-
- All criteria met
|
|
1167
|
-
- No critical/high issues
|
|
1168
|
-
- Story can be marked DONE
|
|
1169
|
-
- **Action**: Run story-done workflow
|
|
1170
|
-
|
|
1171
|
-
**APPROVED WITH COMMENTS** ✅⚠️
|
|
1172
|
-
- Minor issues noted
|
|
1173
|
-
- Suggestions for improvement
|
|
1174
|
-
- Story can be marked DONE
|
|
1175
|
-
- **Action**: Address comments in follow-up (optional)
|
|
1176
|
-
|
|
1177
|
-
**REQUEST CHANGES** ❌
|
|
1178
|
-
- Critical or high-priority issues found
|
|
1179
|
-
- Changes required before merge
|
|
1180
|
-
- Story remains READY FOR REVIEW
|
|
1181
|
-
- **Action**: Fix issues, re-request review
|
|
1182
|
-
|
|
1183
|
-
### Related Workflows
|
|
1184
|
-
- **dev-story** - Implementation that's being reviewed
|
|
1185
|
-
- **story-done** - Next step if approved
|
|
1186
|
-
- **correct-course** - If significant changes needed
|
|
1187
|
-
|
|
1188
|
-
---
|
|
1189
|
-
|
|
1190
|
-
## correct-course
|
|
1191
|
-
|
|
1192
|
-
### Purpose
|
|
1193
|
-
Navigate significant changes during sprint execution by analyzing impact, proposing solutions, and routing for implementation.
|
|
1194
|
-
|
|
1195
|
-
**Agent:** SM (Scrum Master)
|
|
1196
|
-
**Phase:** 4 (Implementation)
|
|
1197
|
-
**Required:** As needed
|
|
1198
|
-
**Typical Duration:** 30-90 minutes
|
|
1199
|
-
|
|
1200
|
-
### When to Use
|
|
1201
|
-
Run when **significant changes** occur mid-sprint:
|
|
1202
|
-
|
|
1203
|
-
**Trigger Scenarios:**
|
|
1204
|
-
- New requirements discovered during implementation
|
|
1205
|
-
- Architecture decision needs revision
|
|
1206
|
-
- Story dependencies change
|
|
1207
|
-
- External factors impact sprint (API changes, platform updates)
|
|
1208
|
-
- Critical bug discovered requiring immediate attention
|
|
1209
|
-
|
|
1210
|
-
**Don't Use For:**
|
|
1211
|
-
- Minor clarifications → Clarify in story file
|
|
1212
|
-
- Small scope adjustments → Adjust AC in story
|
|
1213
|
-
- Typical development blockers → Resolve within team
|
|
1214
|
-
|
|
1215
|
-
### Process Overview
|
|
1216
|
-
|
|
1217
|
-
**Phase 1: Change Analysis (Steps 1-3)**
|
|
1218
|
-
- Identify change type (requirements, technical, external)
|
|
1219
|
-
- Assess impact (stories, epics, architecture)
|
|
1220
|
-
- Determine urgency (blocking, high, medium, low)
|
|
1221
|
-
|
|
1222
|
-
**Phase 2: Impact Assessment (Steps 4-6)**
|
|
1223
|
-
- Stories affected
|
|
1224
|
-
- Epics affected
|
|
1225
|
-
- Architecture changes needed
|
|
1226
|
-
- Timeline impact
|
|
1227
|
-
|
|
1228
|
-
**Phase 3: Solution Proposal (Steps 7-9)**
|
|
1229
|
-
- **Option A**: Adjust scope (remove stories, defer features)
|
|
1230
|
-
- **Option B**: Adjust architecture (revise decisions)
|
|
1231
|
-
- **Option C**: Adjust timeline (extend sprint)
|
|
1232
|
-
- **Option D**: Combination approach
|
|
1233
|
-
|
|
1234
|
-
**Phase 4: Decision and Routing (Steps 10-12)**
|
|
1235
|
-
- Consult stakeholders (if needed)
|
|
1236
|
-
- Select solution
|
|
1237
|
-
- Route to appropriate workflow:
|
|
1238
|
-
- Requirements change → Update PRD → Re-run create-story
|
|
1239
|
-
- Architecture change → Update architecture → Re-run epic-tech-context
|
|
1240
|
-
- Story change → Update story file → Continue dev-story
|
|
1241
|
-
- Update sprint-status.yaml
|
|
1242
|
-
|
|
1243
|
-
### Change Types
|
|
1244
|
-
|
|
1245
|
-
**Requirements Change:**
|
|
1246
|
-
- New AC discovered
|
|
1247
|
-
- AC invalidated by new information
|
|
1248
|
-
- Feature scope expansion/reduction
|
|
1249
|
-
|
|
1250
|
-
**Technical Change:**
|
|
1251
|
-
- Architecture decision no longer viable
|
|
1252
|
-
- Technology choice needs revision
|
|
1253
|
-
- Integration approach changed
|
|
1254
|
-
|
|
1255
|
-
**External Change:**
|
|
1256
|
-
- Third-party API changed
|
|
1257
|
-
- Platform update breaks implementation
|
|
1258
|
-
- Regulatory requirement introduced
|
|
1259
|
-
|
|
1260
|
-
### Inputs
|
|
1261
|
-
Required:
|
|
1262
|
-
- Description of change
|
|
1263
|
-
- Current story/epic affected
|
|
1264
|
-
- Current sprint-status.yaml
|
|
1265
|
-
|
|
1266
|
-
### Outputs
|
|
1267
|
-
- Change impact analysis document
|
|
1268
|
-
- Updated documentation (PRD/architecture/stories)
|
|
1269
|
-
- Updated sprint-status.yaml
|
|
1270
|
-
- Routing recommendations
|
|
1271
|
-
|
|
1272
|
-
### Example: API Change Mid-Sprint
|
|
1273
|
-
|
|
1274
|
-
**Change:** SendGrid deprecated email API, requires migration to new API
|
|
1275
|
-
|
|
1276
|
-
**Impact Analysis:**
|
|
1277
|
-
- **Stories Affected**: Story 1.3 (Email Verification) - IN PROGRESS
|
|
1278
|
-
- **Epics Affected**: Epic 1 (Authentication)
|
|
1279
|
-
- **Architecture Impact**: ADR-004 (Email Service) needs revision
|
|
1280
|
-
- **Timeline Impact**: +1 day (API migration work)
|
|
1281
|
-
|
|
1282
|
-
**Solution Options:**
|
|
1283
|
-
|
|
1284
|
-
**Option A:** Continue with deprecated API, plan migration for later
|
|
1285
|
-
- **Pros**: No sprint disruption
|
|
1286
|
-
- **Cons**: Technical debt, API sunset in 6 months
|
|
1287
|
-
|
|
1288
|
-
**Option B:** Migrate to new API now
|
|
1289
|
-
- **Pros**: No technical debt, future-proof
|
|
1290
|
-
- **Cons**: +1 day to sprint
|
|
1291
|
-
|
|
1292
|
-
**Option C:** Defer email verification to next sprint
|
|
1293
|
-
- **Pros**: No disruption to current sprint
|
|
1294
|
-
- **Cons**: Story 1.3 incomplete, Epic 1 not done
|
|
1295
|
-
|
|
1296
|
-
**Decision:** Option B (Migrate now)
|
|
1297
|
-
|
|
1298
|
-
**Actions:**
|
|
1299
|
-
1. Update architecture.md (ADR-004: Use SendGrid v4 API)
|
|
1300
|
-
2. Update epic-1-tech-context.md (new email patterns)
|
|
1301
|
-
3. Update Story 1.3 acceptance criteria (new API endpoints)
|
|
1302
|
-
4. Continue dev-story with new approach
|
|
1303
|
-
5. Extend sprint by 1 day
|
|
1304
|
-
|
|
1305
|
-
### Related Workflows
|
|
1306
|
-
- **architecture** - May need updates
|
|
1307
|
-
- **create-story** - May need to create new stories
|
|
1308
|
-
- **sprint-planning** - May need to re-prioritize
|
|
1309
|
-
- **retrospective** - Document learnings
|
|
196
|
+
- Run `workflow-status` anytime to check progress
|
|
197
|
+
- Run `correct-course` if significant changes needed
|
|
1310
198
|
|
|
1311
199
|
---
|
|
1312
200
|
|
|
1313
|
-
##
|
|
1314
|
-
|
|
1315
|
-
### Purpose
|
|
1316
|
-
Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic.
|
|
1317
|
-
|
|
1318
|
-
**Agent:** SM (Scrum Master)
|
|
1319
|
-
**Phase:** 4 (Implementation)
|
|
1320
|
-
**Required:** Recommended (after each epic)
|
|
1321
|
-
**Typical Duration:** 60-90 minutes
|
|
1322
|
-
|
|
1323
|
-
### When to Use
|
|
1324
|
-
Run **after completing an epic** (all stories DONE).
|
|
1325
|
-
|
|
1326
|
-
**Trigger Points:**
|
|
1327
|
-
- Epic status: DONE
|
|
1328
|
-
- All epic stories completed
|
|
1329
|
-
- Before starting next epic
|
|
1330
|
-
- Before final release (after all epics)
|
|
1331
|
-
|
|
1332
|
-
### Process Overview
|
|
1333
|
-
|
|
1334
|
-
**Phase 1: Data Gathering (Steps 1-3)**
|
|
1335
|
-
- Load sprint-status.yaml
|
|
1336
|
-
- Load completed story files
|
|
1337
|
-
- Load code-review feedback
|
|
1338
|
-
- Gather metrics (velocity, story cycle time)
|
|
1339
|
-
|
|
1340
|
-
**Phase 2: Review Execution (Steps 4-7)**
|
|
1341
|
-
- **What Went Well**: Successes and wins
|
|
1342
|
-
- **What Didn't Go Well**: Challenges and issues
|
|
1343
|
-
- **Lessons Learned**: Actionable insights
|
|
1344
|
-
- **Process Improvements**: Changes for next epic
|
|
1345
|
-
|
|
1346
|
-
**Phase 3: Technical Insights (Steps 8-10)**
|
|
1347
|
-
- Architecture decisions review
|
|
1348
|
-
- Technology choices validation
|
|
1349
|
-
- Code quality assessment
|
|
1350
|
-
- Test coverage and quality
|
|
1351
|
-
|
|
1352
|
-
**Phase 4: Planning Insights (Steps 11-13)**
|
|
1353
|
-
- Estimation accuracy
|
|
1354
|
-
- Requirements clarity
|
|
1355
|
-
- Dependency management
|
|
1356
|
-
- Scope changes
|
|
1357
|
-
|
|
1358
|
-
**Phase 5: Action Items (Step 14)**
|
|
1359
|
-
- Process changes for next epic
|
|
1360
|
-
- Architecture updates needed
|
|
1361
|
-
- Documentation improvements
|
|
1362
|
-
- Training or knowledge gaps
|
|
1363
|
-
|
|
1364
|
-
### Inputs
|
|
1365
|
-
Required:
|
|
1366
|
-
- sprint-status.yaml (epic completion data)
|
|
1367
|
-
- Completed story files
|
|
1368
|
-
- code-review feedback
|
|
1369
|
-
|
|
1370
|
-
Optional:
|
|
1371
|
-
- Team velocity data
|
|
1372
|
-
- CI/CD metrics
|
|
1373
|
-
- Bug reports
|
|
1374
|
-
|
|
1375
|
-
### Outputs
|
|
1376
|
-
|
|
1377
|
-
**Primary Output:** `retrospective-epic-{N}-{date}.md`
|
|
1378
|
-
|
|
1379
|
-
**Document Structure:**
|
|
1380
|
-
1. Epic Summary
|
|
1381
|
-
- Stories completed
|
|
1382
|
-
- Time taken
|
|
1383
|
-
- Velocity achieved
|
|
1384
|
-
2. What Went Well
|
|
1385
|
-
3. What Didn't Go Well
|
|
1386
|
-
4. Lessons Learned
|
|
1387
|
-
5. Technical Insights
|
|
1388
|
-
6. Planning Insights
|
|
1389
|
-
7. Action Items for Next Epic
|
|
1390
|
-
8. Process Improvements
|
|
1391
|
-
|
|
1392
|
-
### Example: Epic 1 Retrospective
|
|
1393
|
-
|
|
1394
|
-
```markdown
|
|
1395
|
-
# Retrospective: Epic 1 - Authentication
|
|
1396
|
-
|
|
1397
|
-
**Date:** 2025-11-15
|
|
1398
|
-
**Duration:** 2 weeks (planned), 2.5 weeks (actual)
|
|
1399
|
-
**Stories Completed:** 8/8
|
|
1400
|
-
**Velocity:** 48 points (target: 60 points)
|
|
1401
|
-
|
|
1402
|
-
## What Went Well
|
|
1403
|
-
|
|
1404
|
-
✅ **Architecture decisions solid**
|
|
1405
|
-
- NextAuth.js choice worked well
|
|
1406
|
-
- Database sessions simpler than JWT
|
|
1407
|
-
|
|
1408
|
-
✅ **Test coverage excellent**
|
|
1409
|
-
- All stories have E2E + API tests
|
|
1410
|
-
- No critical bugs in production
|
|
1411
|
-
|
|
1412
|
-
✅ **Team collaboration strong**
|
|
1413
|
-
- Code reviews thorough
|
|
1414
|
-
- Knowledge sharing effective
|
|
1415
|
-
|
|
1416
|
-
## What Didn't Go Well
|
|
1417
|
-
|
|
1418
|
-
❌ **Estimation inaccurate**
|
|
1419
|
-
- Stories took 20% longer than estimated
|
|
1420
|
-
- Story 1.3 (Email Verification) took 2 days instead of 1
|
|
1421
|
-
|
|
1422
|
-
❌ **Third-party integration surprise**
|
|
1423
|
-
- SendGrid API deprecation discovered mid-sprint
|
|
1424
|
-
- Required correct-course workflow
|
|
1425
|
-
|
|
1426
|
-
❌ **Testing setup overhead**
|
|
1427
|
-
- Test fixtures took longer than expected to set up
|
|
1428
|
-
- Should have created fixtures earlier
|
|
1429
|
-
|
|
1430
|
-
## Lessons Learned
|
|
1431
|
-
|
|
1432
|
-
💡 **Buffer time for integrations**
|
|
1433
|
-
- Add 25% buffer to stories with third-party APIs
|
|
1434
|
-
- Research API stability before committing
|
|
1435
|
-
|
|
1436
|
-
💡 **Test fixtures upfront**
|
|
1437
|
-
- Create test fixtures in first story of epic
|
|
1438
|
-
- Reuse across all stories
|
|
1439
|
-
|
|
1440
|
-
💡 **Architecture review cadence**
|
|
1441
|
-
- Mid-epic architecture check-in would have caught issues earlier
|
|
1442
|
-
|
|
1443
|
-
## Technical Insights
|
|
1444
|
-
|
|
1445
|
-
**Architecture:**
|
|
1446
|
-
- ADR-001 (NextAuth.js) validated ✅
|
|
1447
|
-
- ADR-004 (SendGrid) needed revision (v3 → v4)
|
|
1448
|
-
|
|
1449
|
-
**Code Quality:**
|
|
1450
|
-
- Average code-review score: 8.5/10
|
|
1451
|
-
- No critical issues
|
|
1452
|
-
- 3 high-priority issues (all addressed)
|
|
1453
|
-
|
|
1454
|
-
**Test Coverage:**
|
|
1455
|
-
- E2E: 95% of critical paths
|
|
1456
|
-
- API: 100% of endpoints
|
|
1457
|
-
- Unit: 85% of business logic
|
|
1458
|
-
|
|
1459
|
-
## Planning Insights
|
|
1460
|
-
|
|
1461
|
-
**Estimation Accuracy:**
|
|
1462
|
-
- Estimated: 60 points
|
|
1463
|
-
- Actual: 72 points
|
|
1464
|
-
- Variance: +20%
|
|
1465
|
-
- **Adjustment**: Use 1.2× multiplier for next epic
|
|
201
|
+
## Key Principles
|
|
1466
202
|
|
|
1467
|
-
|
|
1468
|
-
- PRD was clear ✅
|
|
1469
|
-
- Architecture was thorough ✅
|
|
1470
|
-
- Story AC needed refinement in 2 stories
|
|
203
|
+
### One Story at a Time
|
|
1471
204
|
|
|
1472
|
-
|
|
1473
|
-
- Story dependencies well-sequenced
|
|
1474
|
-
- No blocking issues
|
|
205
|
+
Complete each story's full lifecycle before starting the next. This prevents context switching and ensures quality.
|
|
1475
206
|
|
|
1476
|
-
|
|
207
|
+
### Epic-Level Technical Context
|
|
1477
208
|
|
|
1478
|
-
|
|
1479
|
-
- Owner: DEV
|
|
1480
|
-
- Timeline: First story of Epic 2
|
|
209
|
+
Generate detailed technical guidance per epic (not per story) using `epic-tech-context`. This provides just-in-time architecture without upfront over-planning.
|
|
1481
210
|
|
|
1482
|
-
|
|
1483
|
-
- Owner: SM
|
|
1484
|
-
- Apply in epic-2 estimates
|
|
211
|
+
### Story Context (Optional)
|
|
1485
212
|
|
|
1486
|
-
|
|
1487
|
-
- Owner: Architect
|
|
1488
|
-
- Schedule after 50% epic completion
|
|
213
|
+
Use `story-context` to assemble focused context XML for each story, pulling from PRD, architecture, epic context, and codebase docs. Alternatively, use `story-ready-for-dev` to mark a story ready without generating context XML.
|
|
1489
214
|
|
|
1490
|
-
|
|
1491
|
-
- Owner: DEV
|
|
1492
|
-
- Before starting stories with external APIs
|
|
215
|
+
### Quality Gates
|
|
1493
216
|
|
|
1494
|
-
|
|
217
|
+
Every story goes through `code-review` before being marked done. No exceptions.
|
|
1495
218
|
|
|
1496
|
-
|
|
1497
|
-
- ✅ Run architecture review mid-epic
|
|
1498
|
-
- ✅ Create test fixtures in first story
|
|
1499
|
-
- ✅ Add buffer time to estimates
|
|
1500
|
-
- ✅ Document third-party API versions in architecture
|
|
219
|
+
### Continuous Tracking
|
|
1501
220
|
|
|
1502
|
-
|
|
1503
|
-
- Document API stability research process
|
|
1504
|
-
- Create reusable test fixture templates
|
|
1505
|
-
````
|
|
1506
|
-
|
|
1507
|
-
### Related Workflows
|
|
1508
|
-
|
|
1509
|
-
- **sprint-planning** - Next epic planning
|
|
1510
|
-
- **architecture** - May need updates from insights
|
|
1511
|
-
- **create-story** - Apply lessons to story creation
|
|
221
|
+
The `sprint-status.yaml` file is the single source of truth for all implementation progress.
|
|
1512
222
|
|
|
1513
223
|
---
|
|
1514
224
|
|
|
1515
|
-
##
|
|
1516
|
-
|
|
1517
|
-
### workflow-status
|
|
1518
|
-
|
|
1519
|
-
**Purpose:** Check "what should I do now?" for any agent.
|
|
1520
|
-
|
|
1521
|
-
**Agent:** All
|
|
1522
|
-
**Duration:** 2-5 minutes
|
|
1523
|
-
**When to Use:** Anytime you're unsure of next step
|
|
1524
|
-
|
|
1525
|
-
**How It Works:**
|
|
225
|
+
## Common Patterns
|
|
1526
226
|
|
|
1527
|
-
1
|
|
1528
|
-
2. Determines current phase
|
|
1529
|
-
3. Identifies next workflow to run
|
|
1530
|
-
4. Provides clear recommendation
|
|
1531
|
-
|
|
1532
|
-
**Example Output:**
|
|
227
|
+
### Level 0-1 (Quick Flow)
|
|
1533
228
|
|
|
1534
229
|
```
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
Next Story: Story 1.3 (Email Verification)
|
|
1540
|
-
Status: TODO
|
|
1541
|
-
Dependencies: Story 1.2 (DONE) ✅
|
|
1542
|
-
|
|
1543
|
-
**Recommendation:** Run `create-story` to generate Story 1.3
|
|
1544
|
-
|
|
1545
|
-
After create-story:
|
|
1546
|
-
1. Run story-context
|
|
1547
|
-
2. Run dev-story
|
|
1548
|
-
3. Run code-review
|
|
1549
|
-
4. Run story-done
|
|
230
|
+
tech-spec (PM)
|
|
231
|
+
→ sprint-planning (SM)
|
|
232
|
+
→ story loop (SM/DEV)
|
|
1550
233
|
```
|
|
1551
234
|
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
---
|
|
1555
|
-
|
|
1556
|
-
### document-project
|
|
1557
|
-
|
|
1558
|
-
**Purpose:** Analyze and document brownfield projects by scanning codebase, architecture, and patterns.
|
|
1559
|
-
|
|
1560
|
-
**Agent:** Analyst
|
|
1561
|
-
**Duration:** 1-3 hours
|
|
1562
|
-
**When to Use:** Brownfield projects without documentation
|
|
1563
|
-
|
|
1564
|
-
**How It Works:**
|
|
1565
|
-
|
|
1566
|
-
1. Scans codebase structure
|
|
1567
|
-
2. Identifies architecture patterns
|
|
1568
|
-
3. Documents technology stack
|
|
1569
|
-
4. Creates reference documentation
|
|
1570
|
-
5. Generates PRD-like document from existing code
|
|
1571
|
-
|
|
1572
|
-
**Output:** `project-documentation-{date}.md`
|
|
1573
|
-
|
|
1574
|
-
**When to Run:**
|
|
1575
|
-
|
|
1576
|
-
- Before starting work on legacy project
|
|
1577
|
-
- When inheriting undocumented codebase
|
|
1578
|
-
- Creating onboarding documentation
|
|
1579
|
-
|
|
1580
|
-
See: [document-project README](../workflows/document-project/README.md)
|
|
1581
|
-
|
|
1582
|
-
---
|
|
1583
|
-
|
|
1584
|
-
## Story Lifecycle Visualization
|
|
235
|
+
### Level 2-4 (BMad Method / Enterprise)
|
|
1585
236
|
|
|
1586
237
|
```
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
├──────────────────────────────────────────┐
|
|
1596
|
-
│ │
|
|
1597
|
-
▼ │
|
|
1598
|
-
┌─────────────────────┐ │
|
|
1599
|
-
│ Epic Tech Context │ → Optional per epic │
|
|
1600
|
-
│ (Once per epic) │ Provides technical │
|
|
1601
|
-
└─────────────────────┘ guidance │
|
|
1602
|
-
│ │
|
|
1603
|
-
▼ │
|
|
1604
|
-
┌─────────────────────────────────────────────────┤
|
|
1605
|
-
│ FOR EACH STORY IN QUEUE: │
|
|
1606
|
-
├─────────────────────────────────────────────────┤
|
|
1607
|
-
│ │
|
|
1608
|
-
▼ │
|
|
1609
|
-
┌─────────────────┐ │
|
|
1610
|
-
│ Create Story │ → Generates story file │
|
|
1611
|
-
│ (TODO → IN PROGRESS) │
|
|
1612
|
-
└────────┬────────┘ │
|
|
1613
|
-
│ │
|
|
1614
|
-
▼ │
|
|
1615
|
-
┌─────────────────┐ │
|
|
1616
|
-
│ Story Context │ → Assembles focused context │
|
|
1617
|
-
└────────┬────────┘ │
|
|
1618
|
-
│ │
|
|
1619
|
-
▼ │
|
|
1620
|
-
┌─────────────────┐ │
|
|
1621
|
-
│ Dev Story │ → Implements + tests │
|
|
1622
|
-
│ (IN PROGRESS) │ │
|
|
1623
|
-
└────────┬────────┘ │
|
|
1624
|
-
│ │
|
|
1625
|
-
▼ │
|
|
1626
|
-
┌─────────────────┐ │
|
|
1627
|
-
│ Code Review │ → Senior dev review │
|
|
1628
|
-
│ (IN PROGRESS → │ │
|
|
1629
|
-
│ READY FOR REVIEW) │
|
|
1630
|
-
└────────┬────────┘ │
|
|
1631
|
-
│ │
|
|
1632
|
-
┌────┴────┐ │
|
|
1633
|
-
│ Result? │ │
|
|
1634
|
-
└────┬────┘ │
|
|
1635
|
-
│ │
|
|
1636
|
-
┌────┼────────────────────┐ │
|
|
1637
|
-
│ │ │ │
|
|
1638
|
-
▼ ▼ ▼ │
|
|
1639
|
-
APPROVED APPROVED REQUEST │
|
|
1640
|
-
WITH COMMENTS CHANGES │
|
|
1641
|
-
│ │ │ │
|
|
1642
|
-
└─────────┴───────────────────┘ │
|
|
1643
|
-
│ │
|
|
1644
|
-
▼ │
|
|
1645
|
-
┌─────────────────┐ │
|
|
1646
|
-
│ Story Done │ → READY FOR REVIEW → DONE│
|
|
1647
|
-
└────────┬────────┘ │
|
|
1648
|
-
│ │
|
|
1649
|
-
├─────────────────────────────────────┘
|
|
1650
|
-
│ More stories?
|
|
1651
|
-
│
|
|
1652
|
-
▼
|
|
1653
|
-
┌────────────────┐
|
|
1654
|
-
│ Epic Complete? │
|
|
1655
|
-
└────────┬───────┘
|
|
1656
|
-
│
|
|
1657
|
-
┌────┼────┐
|
|
1658
|
-
│ │
|
|
1659
|
-
Yes No
|
|
1660
|
-
│ └──> Continue to next story
|
|
1661
|
-
│
|
|
1662
|
-
▼
|
|
1663
|
-
┌─────────────────┐
|
|
1664
|
-
│ Retrospective │ → Review epic, lessons learned
|
|
1665
|
-
└─────────────────┘
|
|
1666
|
-
│
|
|
1667
|
-
▼
|
|
1668
|
-
All epics done?
|
|
1669
|
-
│
|
|
1670
|
-
Yes → PROJECT COMPLETE
|
|
238
|
+
PRD + Architecture (PM/Architect)
|
|
239
|
+
→ solutioning-gate-check (Architect)
|
|
240
|
+
→ sprint-planning (SM, once)
|
|
241
|
+
→ [Per Epic]:
|
|
242
|
+
epic-tech-context (SM)
|
|
243
|
+
→ story loop (SM/DEV)
|
|
244
|
+
→ epic-retrospective (SM)
|
|
245
|
+
→ [Next Epic]
|
|
1671
246
|
```
|
|
1672
247
|
|
|
1673
248
|
---
|
|
1674
249
|
|
|
1675
|
-
##
|
|
1676
|
-
|
|
1677
|
-
### 1. One Story at a Time
|
|
1678
|
-
|
|
1679
|
-
**Focus on completing stories fully** before starting new ones. Don't parallelize stories unless you have multiple developers.
|
|
1680
|
-
|
|
1681
|
-
### 2. Always Run story-context
|
|
1682
|
-
|
|
1683
|
-
Don't skip context assembly. DEV agent performs better with focused, relevant context.
|
|
1684
|
-
|
|
1685
|
-
### 3. Write Tests First (ATDD)
|
|
1686
|
-
|
|
1687
|
-
For P0/P1 stories, write failing tests first (acceptance test-driven development), then implement to make them pass.
|
|
1688
|
-
|
|
1689
|
-
### 4. Code Review P0/P1 Stories
|
|
1690
|
-
|
|
1691
|
-
Always review critical stories. P2/P3 can be optional reviews.
|
|
1692
|
-
|
|
1693
|
-
### 5. Run Retrospectives
|
|
1694
|
-
|
|
1695
|
-
Don't skip retrospectives. They provide valuable insights that improve velocity in subsequent epics.
|
|
250
|
+
## Related Documentation
|
|
1696
251
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
### 7. Document Deviations
|
|
1702
|
-
|
|
1703
|
-
If you deviate from architecture or PRD, document why in story file.
|
|
252
|
+
- [Phase 2: Planning Workflows](./workflows-planning.md)
|
|
253
|
+
- [Phase 3: Solutioning Workflows](./workflows-solutioning.md)
|
|
254
|
+
- [Quick Spec Flow](./quick-spec-flow.md) - Level 0-1 fast track
|
|
255
|
+
- [Scale Adaptive System](./scale-adaptive-system.md) - Understanding project levels
|
|
1704
256
|
|
|
1705
257
|
---
|
|
1706
258
|
|
|
1707
|
-
##
|
|
1708
|
-
|
|
1709
|
-
### ❌ Starting Multiple Stories Simultaneously
|
|
1710
|
-
|
|
1711
|
-
"Let's parallelize 5 stories to go faster."
|
|
1712
|
-
→ **Result**: Context switching, incomplete stories, harder to track
|
|
1713
|
-
|
|
1714
|
-
### ❌ Skipping story-context
|
|
259
|
+
## Troubleshooting
|
|
1715
260
|
|
|
1716
|
-
|
|
1717
|
-
|
|
261
|
+
**Q: Which workflow should I run next?**
|
|
262
|
+
A: Run `workflow-status` - it reads the sprint status file and tells you exactly what to do.
|
|
1718
263
|
|
|
1719
|
-
|
|
264
|
+
**Q: Story needs significant changes mid-implementation?**
|
|
265
|
+
A: Run `correct-course` to analyze impact and route appropriately.
|
|
1720
266
|
|
|
1721
|
-
|
|
1722
|
-
|
|
267
|
+
**Q: Do I run epic-tech-context for every story?**
|
|
268
|
+
A: No! Run once per epic, not per story. Use `story-context` or `story-ready-for-dev` per story instead.
|
|
1723
269
|
|
|
1724
|
-
|
|
270
|
+
**Q: Do I have to use story-context for every story?**
|
|
271
|
+
A: No, it's optional. You can use `story-ready-for-dev` to mark a story ready without generating context XML.
|
|
1725
272
|
|
|
1726
|
-
|
|
1727
|
-
|
|
273
|
+
**Q: Can I work on multiple stories in parallel?**
|
|
274
|
+
A: Not recommended. Complete one story's full lifecycle before starting the next. Prevents context switching and ensures quality.
|
|
1728
275
|
|
|
1729
|
-
|
|
276
|
+
**Q: What if code review finds issues?**
|
|
277
|
+
A: DEV runs `develop-story` to make fixes, re-runs tests, then runs `code-review` again until it passes.
|
|
1730
278
|
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
- Review P0/P1 stories
|
|
1734
|
-
- Run retrospectives after epics
|
|
1735
|
-
- Use workflow-status for guidance
|
|
279
|
+
**Q: When do I run validations?**
|
|
280
|
+
A: Validations are optional quality gates. Use them when you want independent review of epic tech specs, story drafts, or story context before proceeding.
|
|
1736
281
|
|
|
1737
282
|
---
|
|
1738
283
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
Phase 4 Implementation follows a **story-centric workflow**:
|
|
1742
|
-
|
|
1743
|
-
| Workflow | Purpose | Frequency |
|
|
1744
|
-
| --------------------- | ------------------- | ----------------- |
|
|
1745
|
-
| **sprint-planning** | Initialize tracking | Once at start |
|
|
1746
|
-
| **epic-tech-context** | Technical guidance | Once per epic |
|
|
1747
|
-
| **create-story** | Generate story file | Per story |
|
|
1748
|
-
| **story-context** | Assemble context | Per story |
|
|
1749
|
-
| **dev-story** | Implement story | Per story |
|
|
1750
|
-
| **code-review** | Review quality | Per story (P0/P1) |
|
|
1751
|
-
| **correct-course** | Handle changes | As needed |
|
|
1752
|
-
| **retrospective** | Learn and improve | After each epic |
|
|
1753
|
-
|
|
1754
|
-
**Key Takeaway:** Implementation is iterative and incremental. Move one story through its full lifecycle before starting the next. Use retrospectives to continuously improve.
|
|
1755
|
-
|
|
1756
|
-
**Next:** Testing & QA (testarch workflows) run in parallel with implementation.
|
|
1757
|
-
|
|
1758
|
-
See: [workflows-testing.md](./workflows-testing.md)
|
|
284
|
+
_Phase 4 Implementation - One story at a time, done right._
|