bmad-method 6.0.0-alpha.4 → 6.0.0-alpha.5

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.
Files changed (162) hide show
  1. package/.claude/commands/bmad/bmm/agents/architect.md +0 -1
  2. package/.claude/commands/bmad/bmm/agents/sm.md +1 -1
  3. package/.claude/commands/bmad/bmm/agents/tech-writer.md +82 -0
  4. package/.claude/commands/bmad/bmm/workflows/README.md +1 -1
  5. package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +15 -0
  6. package/.claude/commands/bmad/core/workflows/README.md +10 -0
  7. package/.claude/settings.local.json +4 -8
  8. package/CHANGELOG.md +305 -0
  9. package/README.md +88 -39
  10. package/bmad/_cfg/agent-manifest.csv +2 -1
  11. package/bmad/_cfg/agents/bmm-tech-writer.customize.yaml +42 -0
  12. package/bmad/_cfg/files-manifest.csv +40 -62
  13. package/bmad/_cfg/ides/claude-code.yaml +1 -1
  14. package/bmad/_cfg/manifest.yaml +4 -3
  15. package/bmad/_cfg/task-manifest.csv +4 -1
  16. package/bmad/_cfg/tool-manifest.csv +1 -0
  17. package/bmad/_cfg/workflow-manifest.csv +3 -1
  18. package/bmad/bmb/config.yaml +2 -2
  19. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  20. package/bmad/bmm/README.md +79 -120
  21. package/bmad/bmm/README.md.bak +169 -0
  22. package/bmad/bmm/agents/analyst.md.bak +67 -0
  23. package/bmad/bmm/agents/architect.md +0 -1
  24. package/bmad/bmm/agents/architect.md.bak +73 -0
  25. package/bmad/bmm/agents/dev.md.bak +69 -0
  26. package/bmad/bmm/agents/pm.md.bak +76 -0
  27. package/bmad/bmm/agents/sm.md +1 -1
  28. package/bmad/bmm/agents/sm.md.bak +85 -0
  29. package/bmad/bmm/agents/tea.md.bak +72 -0
  30. package/bmad/bmm/agents/tech-writer.md +82 -0
  31. package/bmad/bmm/agents/ux-designer.md.bak +71 -0
  32. package/bmad/bmm/config.yaml +2 -2
  33. package/bmad/bmm/docs/README.md +235 -0
  34. package/bmad/bmm/docs/agents-guide.md +1057 -0
  35. package/bmad/bmm/docs/brownfield-guide.md +471 -972
  36. package/bmad/bmm/docs/enterprise-agentic-development.md +680 -0
  37. package/bmad/bmm/docs/faq.md +589 -0
  38. package/bmad/bmm/docs/glossary.md +321 -0
  39. package/bmad/bmm/docs/party-mode.md +224 -0
  40. package/bmad/bmm/docs/quick-spec-flow.md +64 -57
  41. package/bmad/bmm/docs/quick-start.md +72 -47
  42. package/bmad/bmm/docs/scale-adaptive-system.md +332 -778
  43. package/bmad/bmm/docs/troubleshooting.md +680 -0
  44. package/bmad/bmm/{workflows/3-solutioning/architecture/README.md → docs/workflow-architecture-reference.md} +130 -77
  45. package/bmad/bmm/{workflows/document-project/README.md → docs/workflow-document-project-reference.md} +45 -2
  46. package/bmad/bmm/docs/workflows-analysis.md +670 -0
  47. package/bmad/bmm/docs/workflows-implementation.md +1758 -0
  48. package/bmad/bmm/docs/workflows-planning.md +1086 -0
  49. package/bmad/bmm/docs/workflows-solutioning.md +726 -0
  50. package/bmad/bmm/tasks/daily-standup.xml +1 -1
  51. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml.bak +60 -0
  52. package/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +1 -1
  53. package/bmad/bmm/workflows/techdoc/documentation-standards.md +2 -1
  54. package/bmad/bmm/workflows/techdoc/documentation-standards.md.bak +238 -0
  55. package/bmad/bmm/workflows/workflow-status/init/instructions.md +623 -242
  56. package/bmad/bmm/workflows/workflow-status/init/workflow.yaml.bak +27 -0
  57. package/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  58. package/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  59. package/{src/modules/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml → bmad/bmm/workflows/workflow-status/paths/method-brownfield.yaml} +33 -31
  60. package/{src/modules/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  61. package/{src/modules/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml → bmad/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml} +18 -18
  62. package/bmad/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  63. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  64. package/bmad/cis/agents/brainstorming-coach.md.bak +62 -0
  65. package/bmad/cis/agents/creative-problem-solver.md.bak +62 -0
  66. package/bmad/cis/agents/design-thinking-coach.md.bak +62 -0
  67. package/bmad/cis/agents/innovation-strategist.md.bak +62 -0
  68. package/bmad/cis/agents/storyteller.md.bak +59 -0
  69. package/bmad/cis/config.yaml +2 -2
  70. package/bmad/core/agents/bmad-master.md.bak +15 -13
  71. package/bmad/core/config.yaml +2 -2
  72. package/bmad/core/tasks/workflow.xml +1 -11
  73. package/package.json +1 -1
  74. package/src/core/tasks/workflow.xml +1 -11
  75. package/src/modules/bmb/workflows/audit-workflow/instructions.md +1 -1
  76. package/src/modules/bmm/README.md +1 -1
  77. package/src/modules/bmm/agents/architect.agent.yaml +0 -4
  78. package/src/modules/bmm/agents/game-dev.agent.yaml +8 -12
  79. package/src/modules/bmm/agents/sm.agent.yaml +1 -1
  80. package/src/modules/bmm/agents/{paige.agent.yaml → tech-writer.agent.yaml} +4 -4
  81. package/src/modules/bmm/docs/README.md +9 -9
  82. package/src/modules/bmm/docs/agents-guide.md +46 -98
  83. package/src/modules/bmm/docs/brownfield-guide.md +211 -90
  84. package/src/modules/bmm/docs/enterprise-agentic-development.md +380 -740
  85. package/src/modules/bmm/docs/faq.md +10 -10
  86. package/src/modules/bmm/docs/glossary.md +36 -42
  87. package/src/modules/bmm/docs/party-mode.md +110 -1122
  88. package/src/modules/bmm/docs/quick-spec-flow.md +33 -33
  89. package/src/modules/bmm/docs/quick-start.md +29 -29
  90. package/src/modules/bmm/docs/scale-adaptive-system.md +303 -453
  91. package/src/modules/bmm/docs/troubleshooting.md +1 -1
  92. package/src/modules/bmm/docs/workflows-implementation.md +20 -21
  93. package/src/modules/bmm/docs/workflows-solutioning.md +1 -1
  94. package/src/modules/bmm/tasks/daily-standup.xml +1 -1
  95. package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  96. package/src/modules/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  97. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  98. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  99. package/src/modules/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  100. package/src/modules/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  101. package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.yaml +2 -2
  102. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  103. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  104. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  105. package/src/modules/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  106. package/src/modules/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  107. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  108. package/src/modules/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  109. package/src/modules/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +1 -1
  110. package/src/modules/bmm/workflows/techdoc/documentation-standards.md +1 -1
  111. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +623 -242
  112. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  113. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  114. package/{bmad/bmm/workflows/workflow-status/paths/brownfield-level-3.yaml → src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml} +33 -31
  115. package/{bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  116. package/{bmad/bmm/workflows/workflow-status/paths/brownfield-level-1.yaml → src/modules/bmm/workflows/workflow-status/paths/quick-flow-brownfield.yaml} +18 -18
  117. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  118. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  119. package/bmad/bmm/tasks/retrospective.xml +0 -104
  120. package/bmad/bmm/testarch/README.md +0 -311
  121. package/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -113
  122. package/bmad/bmm/workflows/1-analysis/product-brief/README.md +0 -180
  123. package/bmad/bmm/workflows/1-analysis/research/README.md +0 -454
  124. package/bmad/bmm/workflows/2-plan-workflows/README.md +0 -258
  125. package/bmad/bmm/workflows/3-solutioning/README.md +0 -1
  126. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -177
  127. package/bmad/bmm/workflows/4-implementation/README.md +0 -221
  128. package/bmad/bmm/workflows/4-implementation/code-review/README.md +0 -69
  129. package/bmad/bmm/workflows/4-implementation/correct-course/README.md +0 -73
  130. package/bmad/bmm/workflows/4-implementation/create-story/README.md +0 -146
  131. package/bmad/bmm/workflows/4-implementation/dev-story/README.md +0 -206
  132. package/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -195
  133. package/bmad/bmm/workflows/4-implementation/retrospective/README.md +0 -77
  134. package/bmad/bmm/workflows/4-implementation/sprint-planning/README.md +0 -156
  135. package/bmad/bmm/workflows/4-implementation/story-context/README.md +0 -234
  136. package/bmad/bmm/workflows/README.md +0 -256
  137. package/bmad/bmm/workflows/document-project/templates/README.md +0 -38
  138. package/bmad/bmm/workflows/testarch/README.md +0 -26
  139. package/bmad/bmm/workflows/testarch/atdd/README.md +0 -672
  140. package/bmad/bmm/workflows/testarch/automate/README.md +0 -869
  141. package/bmad/bmm/workflows/testarch/ci/README.md +0 -493
  142. package/bmad/bmm/workflows/testarch/framework/README.md +0 -340
  143. package/bmad/bmm/workflows/testarch/nfr-assess/README.md +0 -469
  144. package/bmad/bmm/workflows/testarch/test-design/README.md +0 -493
  145. package/bmad/bmm/workflows/testarch/test-review/README.md +0 -775
  146. package/bmad/bmm/workflows/testarch/trace/README.md +0 -802
  147. package/bmad/bmm/workflows/workflow-status/README.md +0 -260
  148. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  149. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  150. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  151. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  152. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  153. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  154. package/src/modules/bmm/docs/brownfield-guide.md.backup +0 -1324
  155. package/src/modules/bmm/docs/workflows-testing.md +0 -1572
  156. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  157. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  158. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  159. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  160. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  161. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  162. /package/bmad/bmm/agents/{paige.md → paige.md.bak} +0 -0
@@ -1,493 +0,0 @@
1
- # CI/CD Pipeline Setup Workflow
2
-
3
- Scaffolds a production-ready CI/CD quality pipeline with test execution, burn-in loops for flaky test detection, parallel sharding, and artifact collection. This workflow creates platform-specific CI configuration optimized for fast feedback (< 45 min total) and reliable test execution with 20× speedup over sequential runs.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- bmad tea *ci
9
- ```
10
-
11
- The TEA agent runs this workflow when:
12
-
13
- - Test framework is configured and tests pass locally
14
- - Team is ready to enable continuous integration
15
- - Existing CI pipeline needs optimization or modernization
16
- - Burn-in loop is needed for flaky test detection
17
-
18
- ## Inputs
19
-
20
- **Required Context Files:**
21
-
22
- - **Framework config** (playwright.config.ts, cypress.config.ts): Determines test commands and configuration
23
- - **package.json**: Dependencies and scripts for caching strategy
24
- - **.nvmrc**: Node version for CI (optional, defaults to Node 20 LTS)
25
-
26
- **Optional Context Files:**
27
-
28
- - **Existing CI config**: To update rather than create new
29
- - **.git/config**: For CI platform auto-detection
30
-
31
- **Workflow Variables:**
32
-
33
- - `ci_platform`: Auto-detected (github-actions/gitlab-ci/circle-ci) or explicit
34
- - `test_framework`: Detected from framework config (playwright/cypress)
35
- - `parallel_jobs`: Number of parallel shards (default: 4)
36
- - `burn_in_enabled`: Enable burn-in loop (default: true)
37
- - `burn_in_iterations`: Burn-in iterations (default: 10)
38
- - `selective_testing_enabled`: Run only changed tests (default: true)
39
- - `artifact_retention_days`: Artifact storage duration (default: 30)
40
- - `cache_enabled`: Enable dependency caching (default: true)
41
-
42
- ## Outputs
43
-
44
- **Primary Deliverables:**
45
-
46
- 1. **CI Configuration File**
47
- - `.github/workflows/test.yml` (GitHub Actions)
48
- - `.gitlab-ci.yml` (GitLab CI)
49
- - Platform-specific optimizations and best practices
50
-
51
- 2. **Pipeline Stages**
52
- - **Lint**: Code quality checks (<2 min)
53
- - **Test**: Parallel execution with 4 shards (<10 min per shard)
54
- - **Burn-In**: Flaky test detection with 10 iterations (<30 min)
55
- - **Report**: Aggregate results and publish artifacts
56
-
57
- 3. **Helper Scripts**
58
- - `scripts/test-changed.sh`: Selective testing (run only affected tests)
59
- - `scripts/ci-local.sh`: Local CI mirror for debugging
60
- - `scripts/burn-in.sh`: Standalone burn-in execution
61
-
62
- 4. **Documentation**
63
- - `docs/ci.md`: Pipeline guide, debugging, secrets setup
64
- - `docs/ci-secrets-checklist.md`: Required secrets and configuration
65
- - Inline comments in CI configuration files
66
-
67
- 5. **Optimization Features**
68
- - Dependency caching (npm + browser binaries): 2-5 min savings
69
- - Parallel sharding: 75% time reduction
70
- - Retry logic: Handles transient failures (2 retries)
71
- - Failure-only artifacts: Cost-effective debugging
72
-
73
- **Performance Targets:**
74
-
75
- - Lint: <2 minutes
76
- - Test (per shard): <10 minutes
77
- - Burn-in: <30 minutes
78
- - **Total: <45 minutes** (20× faster than sequential)
79
-
80
- **Validation Safeguards:**
81
-
82
- - ✅ Git repository initialized
83
- - ✅ Local tests pass before CI setup
84
- - ✅ Framework configuration exists
85
- - ✅ CI platform accessible
86
-
87
- ## Key Features
88
-
89
- ### Burn-In Loop for Flaky Test Detection
90
-
91
- **Critical production pattern:**
92
-
93
- ```yaml
94
- burn-in:
95
- runs-on: ubuntu-latest
96
- steps:
97
- - run: |
98
- for i in {1..10}; do
99
- echo "🔥 Burn-in iteration $i/10"
100
- npm run test:e2e || exit 1
101
- done
102
- ```
103
-
104
- **Purpose**: Runs tests 10 times to catch non-deterministic failures before they reach main branch.
105
-
106
- **When to run:**
107
-
108
- - On PRs to main/develop
109
- - Weekly on cron schedule
110
- - After test infrastructure changes
111
-
112
- **Failure threshold**: Even ONE failure → tests are flaky, must fix before merging.
113
-
114
- ### Parallel Sharding
115
-
116
- **Splits tests across 4 jobs:**
117
-
118
- ```yaml
119
- strategy:
120
- matrix:
121
- shard: [1, 2, 3, 4]
122
- steps:
123
- - run: npm run test:e2e -- --shard=${{ matrix.shard }}/4
124
- ```
125
-
126
- **Benefits:**
127
-
128
- - 75% time reduction (40 min → 10 min per shard)
129
- - Faster feedback on PRs
130
- - Configurable shard count
131
-
132
- ### Smart Caching
133
-
134
- **Node modules + browser binaries:**
135
-
136
- ```yaml
137
- - uses: actions/cache@v4
138
- with:
139
- path: ~/.npm
140
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
141
- ```
142
-
143
- **Benefits:**
144
-
145
- - 2-5 min savings per run
146
- - Consistent across builds
147
- - Automatic invalidation on dependency changes
148
-
149
- ### Selective Testing
150
-
151
- **Run only tests affected by code changes:**
152
-
153
- ```bash
154
- # scripts/test-changed.sh
155
- CHANGED_FILES=$(git diff --name-only HEAD~1)
156
- npm run test:e2e -- --grep="$AFFECTED_TESTS"
157
- ```
158
-
159
- **Benefits:**
160
-
161
- - 50-80% time reduction for focused PRs
162
- - Faster feedback cycle
163
- - Full suite still runs on main branch
164
-
165
- ### Failure-Only Artifacts
166
-
167
- **Upload debugging materials only on test failures:**
168
-
169
- - Traces (Playwright): 5-10 MB per test
170
- - Screenshots: 100-500 KB each
171
- - Videos: 2-5 MB per test
172
- - HTML reports: 1-2 MB
173
-
174
- **Benefits:**
175
-
176
- - Reduces storage costs by 90%
177
- - Maintains full debugging capability
178
- - 30-day retention default
179
-
180
- ### Local CI Mirror
181
-
182
- **Debug CI failures locally:**
183
-
184
- ```bash
185
- ./scripts/ci-local.sh
186
- # Runs: lint → test → burn-in (3 iterations)
187
- ```
188
-
189
- **Mirrors CI environment:**
190
-
191
- - Same Node version
192
- - Same commands
193
- - Reduced burn-in (3 vs 10 for faster feedback)
194
-
195
- ### Knowledge Base Integration
196
-
197
- Automatically consults TEA knowledge base:
198
-
199
- - `ci-burn-in.md` - Burn-in loop patterns and iterations
200
- - `selective-testing.md` - Changed test detection strategies
201
- - `visual-debugging.md` - Artifact collection best practices
202
- - `test-quality.md` - CI-specific quality criteria
203
-
204
- ## Integration with Other Workflows
205
-
206
- **Before ci:**
207
-
208
- - **framework**: Sets up test infrastructure and configuration
209
- - **test-design** (optional): Plans test coverage strategy
210
-
211
- **After ci:**
212
-
213
- - **atdd**: Generate failing tests that run in CI
214
- - **automate**: Expand test coverage that CI executes
215
- - **trace (Phase 2)**: Use CI results for quality gate decisions
216
-
217
- **Coordinates with:**
218
-
219
- - **dev-story**: Tests run in CI after story implementation
220
- - **retrospective**: CI metrics inform process improvements
221
-
222
- **Updates:**
223
-
224
- - `bmm-workflow-status.md`: Adds CI setup to Quality & Testing Progress section
225
-
226
- ## Important Notes
227
-
228
- ### CI Platform Auto-Detection
229
-
230
- **GitHub Actions** (default):
231
-
232
- - Auto-selected if `github.com` in git remote
233
- - Free 2000 min/month for private repos
234
- - Unlimited for public repos
235
- - `.github/workflows/test.yml`
236
-
237
- **GitLab CI**:
238
-
239
- - Auto-selected if `gitlab.com` in git remote
240
- - Free 400 min/month
241
- - `.gitlab-ci.yml`
242
-
243
- **Circle CI** / **Jenkins**:
244
-
245
- - User must specify explicitly
246
- - Templates provided for both
247
-
248
- ### Burn-In Strategy
249
-
250
- **Iterations:**
251
-
252
- - **3**: Quick feedback (local development)
253
- - **10**: Standard (PR checks) ← recommended
254
- - **100**: High-confidence (release branches)
255
-
256
- **When to run:**
257
-
258
- - ✅ On PRs to main/develop
259
- - ✅ Weekly scheduled (cron)
260
- - ✅ After test infra changes
261
- - ❌ Not on every commit (too slow)
262
-
263
- **Cost-benefit:**
264
-
265
- - 30 minutes of CI time → Prevents hours of debugging flaky tests
266
-
267
- ### Artifact Collection Strategy
268
-
269
- **Failure-only collection:**
270
-
271
- - Saves 90% storage costs
272
- - Maintains debugging capability
273
- - Automatic cleanup after retention period
274
-
275
- **What to collect:**
276
-
277
- - Traces: Full execution context (Playwright)
278
- - Screenshots: Visual evidence
279
- - Videos: Interaction playback
280
- - HTML reports: Detailed results
281
- - Console logs: Error messages
282
-
283
- **What NOT to collect:**
284
-
285
- - Passing test artifacts (waste of space)
286
- - Large binaries
287
- - Sensitive data (use secrets instead)
288
-
289
- ### Selective Testing Trade-offs
290
-
291
- **Benefits:**
292
-
293
- - 50-80% time reduction for focused changes
294
- - Faster feedback loop
295
- - Lower CI costs
296
-
297
- **Risks:**
298
-
299
- - May miss integration issues
300
- - Relies on accurate change detection
301
- - False positives if detection is too aggressive
302
-
303
- **Mitigation:**
304
-
305
- - Always run full suite on merge to main
306
- - Use burn-in loop on main branch
307
- - Monitor for missed issues
308
-
309
- ### Parallelism Configuration
310
-
311
- **4 shards** (default):
312
-
313
- - Optimal for 40-80 test files
314
- - ~10 min per shard
315
- - Balances speed vs resource usage
316
-
317
- **Adjust if:**
318
-
319
- - Tests complete in <5 min → reduce shards
320
- - Tests take >15 min → increase shards
321
- - CI limits concurrent jobs → reduce shards
322
-
323
- **Formula:**
324
-
325
- ```
326
- Total test time / Target shard time = Optimal shards
327
- Example: 40 min / 10 min = 4 shards
328
- ```
329
-
330
- ### Retry Logic
331
-
332
- **2 retries** (default):
333
-
334
- - Handles transient network issues
335
- - Mitigates race conditions
336
- - Does NOT mask flaky tests (burn-in catches those)
337
-
338
- **When retries trigger:**
339
-
340
- - Network timeouts
341
- - Service unavailability
342
- - Resource constraints
343
-
344
- **When retries DON'T help:**
345
-
346
- - Assertion failures (logic errors)
347
- - Flaky tests (non-deterministic)
348
- - Configuration errors
349
-
350
- ### Notification Setup (Optional)
351
-
352
- **Supported channels:**
353
-
354
- - Slack: Webhook integration
355
- - Email: SMTP configuration
356
- - Discord: Webhook integration
357
-
358
- **Configuration:**
359
-
360
- ```yaml
361
- notify_on_failure: true
362
- notification_channels: 'slack'
363
- # Requires SLACK_WEBHOOK secret in CI settings
364
- ```
365
-
366
- **Best practice:** Enable for main/develop branches only, not PRs.
367
-
368
- ## Validation Checklist
369
-
370
- After workflow completion, verify:
371
-
372
- - [ ] CI configuration file created and syntactically valid
373
- - [ ] Burn-in loop configured (10 iterations)
374
- - [ ] Parallel sharding enabled (4 jobs)
375
- - [ ] Caching configured (dependencies + browsers)
376
- - [ ] Artifact collection on failure only
377
- - [ ] Helper scripts created and executable
378
- - [ ] Documentation complete (ci.md, secrets checklist)
379
- - [ ] No errors or warnings during scaffold
380
- - [ ] First CI run triggered and passes
381
-
382
- Refer to `checklist.md` for comprehensive validation criteria.
383
-
384
- ## Example Execution
385
-
386
- **Scenario 1: New GitHub Actions setup**
387
-
388
- ```bash
389
- bmad tea *ci
390
-
391
- # TEA detects:
392
- # - GitHub repository (github.com in git remote)
393
- # - Playwright framework
394
- # - Node 20 from .nvmrc
395
- # - 60 test files
396
-
397
- # TEA scaffolds:
398
- # - .github/workflows/test.yml
399
- # - 4-shard parallel execution
400
- # - Burn-in loop (10 iterations)
401
- # - Dependency + browser caching
402
- # - Failure artifacts (traces, screenshots)
403
- # - Helper scripts
404
- # - Documentation
405
-
406
- # Result:
407
- # Total CI time: 42 minutes (was 8 hours sequential)
408
- # - Lint: 1.5 min
409
- # - Test (4 shards): 9 min each
410
- # - Burn-in: 28 min
411
- ```
412
-
413
- **Scenario 2: Update existing GitLab CI**
414
-
415
- ```bash
416
- bmad tea *ci
417
-
418
- # TEA detects:
419
- # - Existing .gitlab-ci.yml
420
- # - Cypress framework
421
- # - No caching configured
422
-
423
- # TEA asks: "Update existing CI or create new?"
424
- # User: "Update"
425
-
426
- # TEA enhances:
427
- # - Adds burn-in job
428
- # - Configures caching (cache: paths)
429
- # - Adds parallel: 4
430
- # - Updates artifact collection
431
- # - Documents secrets needed
432
-
433
- # Result:
434
- # CI time reduced from 45 min → 12 min
435
- ```
436
-
437
- **Scenario 3: Standalone burn-in setup**
438
-
439
- ```bash
440
- # User wants only burn-in, no full CI
441
- bmad tea *ci
442
- # Set burn_in_enabled: true, skip other stages
443
-
444
- # TEA creates:
445
- # - Minimal workflow with burn-in only
446
- # - scripts/burn-in.sh for local testing
447
- # - Documentation for running burn-in
448
-
449
- # Use case:
450
- # - Validate test stability before full CI setup
451
- # - Debug intermittent failures
452
- # - Confidence check before release
453
- ```
454
-
455
- ## Troubleshooting
456
-
457
- **Issue: "Git repository not found"**
458
-
459
- - **Cause**: No .git/ directory
460
- - **Solution**: Run `git init` and `git remote add origin <url>`
461
-
462
- **Issue: "Tests fail locally but should set up CI anyway"**
463
-
464
- - **Cause**: Workflow halts if local tests fail
465
- - **Solution**: Fix tests first, or temporarily skip preflight (not recommended)
466
-
467
- **Issue: "CI takes longer than 10 min per shard"**
468
-
469
- - **Cause**: Too many tests per shard
470
- - **Solution**: Increase shard count (e.g., 4 → 8)
471
-
472
- **Issue: "Burn-in passes locally but fails in CI"**
473
-
474
- - **Cause**: Environment differences (timing, resources)
475
- - **Solution**: Use `scripts/ci-local.sh` to mirror CI environment
476
-
477
- **Issue: "Caching not working"**
478
-
479
- - **Cause**: Cache key mismatch or cache limit exceeded
480
- - **Solution**: Check cache key formula, verify platform limits
481
-
482
- ## Related Workflows
483
-
484
- - **framework**: Set up test infrastructure → [framework/README.md](../framework/README.md)
485
- - **atdd**: Generate acceptance tests → [atdd/README.md](../atdd/README.md)
486
- - **automate**: Expand test coverage → [automate/README.md](../automate/README.md)
487
- - **trace**: Traceability and quality gate decisions → [trace/README.md](../trace/README.md)
488
-
489
- ## Version History
490
-
491
- - **v4.0 (BMad v6)**: Pure markdown instructions, enhanced workflow.yaml, burn-in loop integration
492
- - **v3.x**: XML format instructions, basic CI setup
493
- - **v2.x**: Legacy task-based approach