bmad-method 6.0.0-alpha.4 → 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.
Files changed (225) hide show
  1. package/.claude/agents/bmad-analysis/api-documenter.md +102 -0
  2. package/.claude/agents/bmad-analysis/codebase-analyzer.md +82 -0
  3. package/.claude/agents/bmad-analysis/data-analyst.md +101 -0
  4. package/.claude/agents/bmad-analysis/pattern-detector.md +84 -0
  5. package/.claude/agents/bmad-planning/dependency-mapper.md +83 -0
  6. package/.claude/agents/bmad-planning/epic-optimizer.md +81 -0
  7. package/.claude/agents/bmad-planning/requirements-analyst.md +61 -0
  8. package/.claude/agents/bmad-planning/technical-decisions-curator.md +168 -0
  9. package/.claude/agents/bmad-planning/trend-spotter.md +115 -0
  10. package/.claude/agents/bmad-planning/user-journey-mapper.md +123 -0
  11. package/.claude/agents/bmad-planning/user-researcher.md +72 -0
  12. package/.claude/agents/bmad-research/market-researcher.md +51 -0
  13. package/.claude/agents/bmad-research/tech-debt-auditor.md +106 -0
  14. package/.claude/agents/bmad-review/document-reviewer.md +102 -0
  15. package/.claude/agents/bmad-review/technical-evaluator.md +68 -0
  16. package/.claude/agents/bmad-review/test-coverage-analyzer.md +108 -0
  17. package/.claude/commands/bmad/bmm/agents/architect.md +0 -1
  18. package/.claude/commands/bmad/bmm/agents/sm.md +1 -1
  19. package/.claude/commands/bmad/bmm/agents/{paige.md → tech-writer.md} +3 -3
  20. package/.claude/commands/bmad/bmm/workflows/README.md +3 -3
  21. package/.claude/commands/bmad/bmm/workflows/epic-tech-context.md +15 -0
  22. package/.claude/commands/bmad/bmm/workflows/prd.md +1 -1
  23. package/.claude/commands/bmad/bmm/workflows/tech-spec.md +3 -3
  24. package/.claude/settings.local.json +3 -8
  25. package/CHANGELOG.md +305 -0
  26. package/CONTRIBUTING.md +1 -13
  27. package/README.md +88 -39
  28. package/bmad/_cfg/agent-manifest.csv +1 -6
  29. package/bmad/_cfg/files-manifest.csv +40 -114
  30. package/bmad/_cfg/ides/claude-code.yaml +4 -3
  31. package/bmad/_cfg/manifest.yaml +3 -4
  32. package/bmad/_cfg/task-manifest.csv +0 -1
  33. package/bmad/_cfg/workflow-manifest.csv +3 -7
  34. package/bmad/bmb/config.yaml +2 -2
  35. package/bmad/bmb/workflows/audit-workflow/instructions.md +1 -1
  36. package/bmad/bmm/README.md +79 -120
  37. package/bmad/bmm/agents/architect.md +0 -1
  38. package/bmad/bmm/agents/sm.md +1 -1
  39. package/bmad/bmm/agents/{paige.md → tech-writer.md} +3 -3
  40. package/bmad/bmm/config.yaml +4 -3
  41. package/bmad/bmm/tasks/daily-standup.xml +1 -1
  42. package/bmad/bmm/workflows/2-plan-workflows/create-ux-design/instructions.md +1 -19
  43. package/bmad/bmm/workflows/2-plan-workflows/prd/checklist.md +10 -9
  44. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/epics-template.md +23 -34
  45. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/instructions.md +105 -331
  46. package/bmad/bmm/workflows/2-plan-workflows/prd/create-epics-and-stories/workflow.yaml +23 -11
  47. package/bmad/bmm/workflows/2-plan-workflows/prd/instructions.md +23 -38
  48. package/bmad/bmm/workflows/2-plan-workflows/prd/workflow.yaml +1 -1
  49. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/epics-template.md +38 -16
  50. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/instructions.md +1 -19
  51. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/user-story-template.md +35 -32
  52. package/bmad/bmm/workflows/2-plan-workflows/tech-spec/workflow.yaml +2 -2
  53. package/bmad/bmm/workflows/3-solutioning/architecture/instructions.md +7 -18
  54. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/instructions.md +1 -18
  55. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/workflow.yaml +6 -6
  56. package/bmad/bmm/workflows/4-implementation/epic-tech-context/workflow.yaml +1 -1
  57. package/bmad/bmm/workflows/techdoc/documentation-standards.md +26 -2
  58. package/bmad/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  59. package/bmad/bmm/workflows/workflow-status/init/instructions.md +623 -242
  60. package/bmad/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  61. package/bmad/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  62. package/bmad/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml → method-brownfield.yaml} +33 -31
  63. package/{src/modules/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → bmad/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  64. package/bmad/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml → quick-flow-brownfield.yaml} +18 -18
  65. package/bmad/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  66. package/bmad/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  67. package/bmad/core/config.yaml +2 -2
  68. package/bmad/core/tasks/workflow.xml +1 -11
  69. package/package.json +1 -1
  70. package/src/core/tasks/workflow.xml +1 -11
  71. package/src/modules/bmb/workflows/audit-workflow/instructions.md +1 -1
  72. package/src/modules/bmm/README.md +1 -1
  73. package/src/modules/bmm/_module-installer/install-config.yaml +5 -0
  74. package/src/modules/bmm/agents/architect.agent.yaml +0 -4
  75. package/src/modules/bmm/agents/game-dev.agent.yaml +8 -12
  76. package/src/modules/bmm/agents/sm.agent.yaml +1 -1
  77. package/src/modules/bmm/agents/{paige.agent.yaml → tech-writer.agent.yaml} +4 -4
  78. package/src/modules/bmm/docs/README.md +19 -18
  79. package/src/modules/bmm/docs/agents-guide.md +47 -99
  80. package/src/modules/bmm/docs/brownfield-guide.md +216 -96
  81. package/src/modules/bmm/docs/enterprise-agentic-development.md +380 -740
  82. package/src/modules/bmm/docs/faq.md +16 -16
  83. package/src/modules/bmm/docs/glossary.md +44 -50
  84. package/src/modules/bmm/docs/party-mode.md +110 -1122
  85. package/src/modules/bmm/docs/quick-spec-flow.md +36 -36
  86. package/src/modules/bmm/docs/quick-start.md +34 -34
  87. package/src/modules/bmm/docs/scale-adaptive-system.md +304 -454
  88. package/{bmad/bmm/testarch/README.md → src/modules/bmm/docs/test-architecture.md} +56 -38
  89. package/src/modules/bmm/docs/troubleshooting.md +7 -7
  90. package/src/modules/bmm/docs/workflows-analysis.md +64 -28
  91. package/src/modules/bmm/docs/workflows-implementation.md +196 -1671
  92. package/src/modules/bmm/docs/workflows-planning.md +74 -35
  93. package/src/modules/bmm/docs/workflows-solutioning.md +47 -17
  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 +25 -2
  111. package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +2 -2
  112. package/src/modules/bmm/workflows/workflow-status/init/instructions.md +623 -242
  113. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +120 -0
  114. package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +108 -0
  115. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-3.yaml → method-brownfield.yaml} +33 -31
  116. package/{bmad/bmm/workflows/workflow-status/paths/greenfield-level-2.yaml → src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml} +31 -21
  117. package/src/modules/bmm/workflows/workflow-status/paths/{brownfield-level-1.yaml → quick-flow-brownfield.yaml} +18 -18
  118. package/src/modules/bmm/workflows/workflow-status/paths/{greenfield-level-1.yaml → quick-flow-greenfield.yaml} +16 -18
  119. package/src/modules/bmm/workflows/workflow-status/workflow-status-template.yaml +4 -4
  120. package/tools/cli/installers/lib/core/config-collector.js +39 -11
  121. package/tools/cli/installers/lib/core/ide-config-manager.js +3 -1
  122. package/tools/cli/installers/lib/core/installer.js +20 -9
  123. package/tools/cli/installers/lib/core/manifest-generator.js +3 -1
  124. package/tools/cli/installers/lib/core/manifest.js +6 -2
  125. package/tools/cli/installers/lib/modules/manager.js +6 -0
  126. package/tools/cli/lib/config.js +3 -1
  127. package/tools/cli/lib/ui.js +5 -5
  128. package/tools/cli/lib/yaml-format.js +2 -1
  129. package/tools/schema/agent.js +2 -0
  130. package/.claude/commands/bmad/bmm/workflows/tech-spec-sm.md +0 -15
  131. package/bmad/_cfg/agents/cis-brainstorming-coach.customize.yaml +0 -42
  132. package/bmad/_cfg/agents/cis-creative-problem-solver.customize.yaml +0 -42
  133. package/bmad/_cfg/agents/cis-design-thinking-coach.customize.yaml +0 -42
  134. package/bmad/_cfg/agents/cis-innovation-strategist.customize.yaml +0 -42
  135. package/bmad/_cfg/agents/cis-storyteller.customize.yaml +0 -42
  136. package/bmad/bmb/agents/bmad-builder.md.bak +0 -70
  137. package/bmad/bmb/workflows/audit-workflow/workflow.yaml.bak +0 -23
  138. package/bmad/bmb/workflows/create-module/workflow.yaml.bak +0 -42
  139. package/bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml.bak +0 -39
  140. package/bmad/bmb/workflows/create-workflow/workflow.yaml.bak +0 -40
  141. package/bmad/bmb/workflows/edit-agent/workflow.yaml.bak +0 -33
  142. package/bmad/bmb/workflows/edit-module/workflow.yaml.bak +0 -34
  143. package/bmad/bmb/workflows/edit-workflow/workflow.yaml.bak +0 -27
  144. package/bmad/bmb/workflows/module-brief/workflow.yaml.bak +0 -29
  145. package/bmad/bmb/workflows/redoc/workflow.yaml.bak +0 -32
  146. package/bmad/bmm/docs/brownfield-guide.md +0 -1260
  147. package/bmad/bmm/docs/quick-spec-flow.md +0 -645
  148. package/bmad/bmm/docs/quick-start.md +0 -341
  149. package/bmad/bmm/docs/scale-adaptive-system.md +0 -1045
  150. package/bmad/bmm/tasks/retrospective.xml +0 -104
  151. package/bmad/bmm/workflows/1-analysis/brainstorm-project/README.md +0 -113
  152. package/bmad/bmm/workflows/1-analysis/product-brief/README.md +0 -180
  153. package/bmad/bmm/workflows/1-analysis/research/README.md +0 -454
  154. package/bmad/bmm/workflows/2-plan-workflows/README.md +0 -258
  155. package/bmad/bmm/workflows/3-solutioning/README.md +0 -1
  156. package/bmad/bmm/workflows/3-solutioning/architecture/README.md +0 -318
  157. package/bmad/bmm/workflows/3-solutioning/solutioning-gate-check/README.md +0 -177
  158. package/bmad/bmm/workflows/4-implementation/README.md +0 -221
  159. package/bmad/bmm/workflows/4-implementation/code-review/README.md +0 -69
  160. package/bmad/bmm/workflows/4-implementation/correct-course/README.md +0 -73
  161. package/bmad/bmm/workflows/4-implementation/create-story/README.md +0 -146
  162. package/bmad/bmm/workflows/4-implementation/dev-story/README.md +0 -206
  163. package/bmad/bmm/workflows/4-implementation/epic-tech-context/README.md +0 -195
  164. package/bmad/bmm/workflows/4-implementation/retrospective/README.md +0 -77
  165. package/bmad/bmm/workflows/4-implementation/sprint-planning/README.md +0 -156
  166. package/bmad/bmm/workflows/4-implementation/story-context/README.md +0 -234
  167. package/bmad/bmm/workflows/README.md +0 -256
  168. package/bmad/bmm/workflows/document-project/README.md +0 -444
  169. package/bmad/bmm/workflows/document-project/templates/README.md +0 -38
  170. package/bmad/bmm/workflows/testarch/README.md +0 -26
  171. package/bmad/bmm/workflows/testarch/atdd/README.md +0 -672
  172. package/bmad/bmm/workflows/testarch/automate/README.md +0 -869
  173. package/bmad/bmm/workflows/testarch/ci/README.md +0 -493
  174. package/bmad/bmm/workflows/testarch/framework/README.md +0 -340
  175. package/bmad/bmm/workflows/testarch/nfr-assess/README.md +0 -469
  176. package/bmad/bmm/workflows/testarch/test-design/README.md +0 -493
  177. package/bmad/bmm/workflows/testarch/test-review/README.md +0 -775
  178. package/bmad/bmm/workflows/testarch/trace/README.md +0 -802
  179. package/bmad/bmm/workflows/workflow-status/README.md +0 -260
  180. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  181. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  182. package/bmad/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  183. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  184. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  185. package/bmad/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  186. package/bmad/cis/README.md +0 -153
  187. package/bmad/cis/agents/README.md +0 -104
  188. package/bmad/cis/agents/brainstorming-coach.md +0 -62
  189. package/bmad/cis/agents/creative-problem-solver.md +0 -62
  190. package/bmad/cis/agents/design-thinking-coach.md +0 -62
  191. package/bmad/cis/agents/innovation-strategist.md +0 -62
  192. package/bmad/cis/agents/storyteller.md +0 -59
  193. package/bmad/cis/config.yaml +0 -10
  194. package/bmad/cis/teams/creative-squad.yaml +0 -6
  195. package/bmad/cis/workflows/README.md +0 -139
  196. package/bmad/cis/workflows/design-thinking/README.md +0 -56
  197. package/bmad/cis/workflows/design-thinking/design-methods.csv +0 -31
  198. package/bmad/cis/workflows/design-thinking/instructions.md +0 -200
  199. package/bmad/cis/workflows/design-thinking/template.md +0 -111
  200. package/bmad/cis/workflows/design-thinking/workflow.yaml +0 -32
  201. package/bmad/cis/workflows/innovation-strategy/README.md +0 -56
  202. package/bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +0 -31
  203. package/bmad/cis/workflows/innovation-strategy/instructions.md +0 -274
  204. package/bmad/cis/workflows/innovation-strategy/template.md +0 -189
  205. package/bmad/cis/workflows/innovation-strategy/workflow.yaml +0 -32
  206. package/bmad/cis/workflows/problem-solving/README.md +0 -56
  207. package/bmad/cis/workflows/problem-solving/instructions.md +0 -250
  208. package/bmad/cis/workflows/problem-solving/solving-methods.csv +0 -31
  209. package/bmad/cis/workflows/problem-solving/template.md +0 -165
  210. package/bmad/cis/workflows/problem-solving/workflow.yaml +0 -32
  211. package/bmad/cis/workflows/storytelling/README.md +0 -58
  212. package/bmad/cis/workflows/storytelling/instructions.md +0 -291
  213. package/bmad/cis/workflows/storytelling/story-types.csv +0 -26
  214. package/bmad/cis/workflows/storytelling/template.md +0 -113
  215. package/bmad/cis/workflows/storytelling/workflow.yaml +0 -32
  216. package/bmad/core/agents/bmad-master.md.bak +0 -69
  217. package/src/modules/bmm/docs/brownfield-guide.md.backup +0 -1324
  218. package/src/modules/bmm/docs/workflows-testing.md +0 -1572
  219. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-0.yaml +0 -54
  220. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-2.yaml +0 -76
  221. package/src/modules/bmm/workflows/workflow-status/paths/brownfield-level-4.yaml +0 -88
  222. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-0.yaml +0 -45
  223. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-3.yaml +0 -73
  224. package/src/modules/bmm/workflows/workflow-status/paths/greenfield-level-4.yaml +0 -75
  225. /package/bmad/_cfg/agents/{bmm-paige.customize.yaml → bmm-tech-writer.customize.yaml} +0 -0
@@ -1,340 +0,0 @@
1
- # Test Framework Setup Workflow
2
-
3
- Initializes a production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, configuration, and industry best practices. This workflow scaffolds the complete testing infrastructure for modern web applications, providing a robust foundation for test automation.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- bmad tea *framework
9
- ```
10
-
11
- The TEA agent runs this workflow when:
12
-
13
- - Starting a new project that needs test infrastructure
14
- - Migrating from an older testing approach
15
- - Setting up testing from scratch
16
- - Standardizing test architecture across teams
17
-
18
- ## Inputs
19
-
20
- **Required Context Files:**
21
-
22
- - **package.json**: Project dependencies and scripts to detect project type and bundler
23
-
24
- **Optional Context Files:**
25
-
26
- - **Architecture docs** (architecture.md, tech-spec.md): Informs framework configuration decisions
27
- - **Existing tests**: Detects current framework to avoid conflicts
28
-
29
- **Workflow Variables:**
30
-
31
- - `test_framework`: Auto-detected (playwright/cypress) or manually specified
32
- - `project_type`: Auto-detected from package.json (react/vue/angular/next/node)
33
- - `bundler`: Auto-detected from package.json (vite/webpack/rollup/esbuild)
34
- - `test_dir`: Root test directory (default: `{project-root}/tests`)
35
- - `use_typescript`: Prefer TypeScript configuration (default: true)
36
- - `framework_preference`: Auto-detection or force specific framework (default: "auto")
37
-
38
- ## Outputs
39
-
40
- **Primary Deliverables:**
41
-
42
- 1. **Configuration File**
43
- - `playwright.config.ts` or `cypress.config.ts` with production-ready settings
44
- - Timeouts: action 15s, navigation 30s, test 60s
45
- - Reporters: HTML + JUnit XML
46
- - Failure-only artifacts (traces, screenshots, videos)
47
-
48
- 2. **Directory Structure**
49
-
50
- ```
51
- tests/
52
- ├── e2e/ # Test files (organize as needed)
53
- ├── support/ # Framework infrastructure (key pattern)
54
- │ ├── fixtures/ # Test fixtures with auto-cleanup
55
- │ │ ├── index.ts # Fixture merging
56
- │ │ └── factories/ # Data factories (faker-based)
57
- │ ├── helpers/ # Utility functions
58
- │ └── page-objects/ # Page object models (optional)
59
- └── README.md # Setup and usage guide
60
- ```
61
-
62
- **Note**: Test organization (e2e/, api/, integration/, etc.) is flexible. The **support/** folder contains reusable fixtures, helpers, and factories - the core framework pattern.
63
-
64
- 3. **Environment Configuration**
65
- - `.env.example` with `TEST_ENV`, `BASE_URL`, `API_URL`, auth credentials
66
- - `.nvmrc` with Node version (LTS)
67
-
68
- 4. **Test Infrastructure**
69
- - Fixture architecture using `mergeTests` pattern
70
- - Data factories with auto-cleanup (faker-based)
71
- - Sample tests demonstrating best practices
72
- - Helper utilities for common operations
73
-
74
- 5. **Documentation**
75
- - `tests/README.md` with comprehensive setup instructions
76
- - Inline comments explaining configuration choices
77
- - References to TEA knowledge base
78
-
79
- **Secondary Deliverables:**
80
-
81
- - Updated `package.json` with minimal test script (`test:e2e`)
82
- - Sample test demonstrating fixture usage
83
- - Network-first testing patterns
84
- - Selector strategy guidance (data-testid)
85
-
86
- **Validation Safeguards:**
87
-
88
- - ✅ No existing framework detected (prevents conflicts)
89
- - ✅ package.json exists and is valid
90
- - ✅ Framework auto-detection successful or explicit choice provided
91
- - ✅ Sample test runs successfully
92
- - ✅ All generated files are syntactically correct
93
-
94
- ## Key Features
95
-
96
- ### Smart Framework Selection
97
-
98
- - **Auto-detection logic** based on project characteristics:
99
- - **Playwright** recommended for: Large repos (100+ files), performance-critical apps, multi-browser support, complex debugging needs
100
- - **Cypress** recommended for: Small teams prioritizing DX, component testing focus, real-time test development
101
- - Falls back to Playwright as default if uncertain
102
-
103
- ### Production-Ready Patterns
104
-
105
- - **Fixture Architecture**: Pure function → fixture → `mergeTests` composition pattern
106
- - **Auto-Cleanup**: Fixtures automatically clean up test data in teardown
107
- - **Network-First**: Route interception before navigation to prevent race conditions
108
- - **Failure-Only Artifacts**: Screenshots/videos/traces only captured on failure to reduce storage
109
- - **Parallel Execution**: Configured for optimal CI performance
110
-
111
- ### Industry Best Practices
112
-
113
- - **Selector Strategy**: Prescriptive guidance on `data-testid` attributes
114
- - **Data Factories**: Faker-based factories for realistic test data
115
- - **Contract Testing**: Recommends Pact for microservices architectures
116
- - **Error Handling**: Comprehensive timeout and retry configuration
117
- - **Reporting**: Multiple reporter formats (HTML, JUnit, console)
118
-
119
- ### Knowledge Base Integration
120
-
121
- Automatically consults TEA knowledge base:
122
-
123
- - `fixture-architecture.md` - Pure function → fixture → mergeTests pattern
124
- - `data-factories.md` - Faker-based factories with auto-cleanup
125
- - `network-first.md` - Network interception before navigation
126
- - `playwright-config.md` - Playwright-specific best practices
127
- - `test-config.md` - General configuration guidelines
128
-
129
- ## Integration with Other Workflows
130
-
131
- **Before framework:**
132
-
133
- - **prd** (Phase 2): Determines project scope and testing needs
134
- - **workflow-status**: Verifies project readiness
135
-
136
- **After framework:**
137
-
138
- - **ci**: Scaffold CI/CD pipeline using framework configuration
139
- - **test-design**: Plan test coverage strategy for the project
140
- - **atdd**: Generate failing acceptance tests using the framework
141
-
142
- **Coordinates with:**
143
-
144
- - **architecture** (Phase 3): Aligns test structure with system architecture
145
- - **tech-spec**: Uses technical specifications to inform test configuration
146
-
147
- **Updates:**
148
-
149
- - `bmm-workflow-status.md`: Adds framework initialization to Quality & Testing Progress section
150
-
151
- ## Important Notes
152
-
153
- ### Preflight Checks
154
-
155
- **Critical requirements** verified before scaffolding:
156
-
157
- - package.json exists in project root
158
- - No modern E2E framework already configured
159
- - Architecture/stack context available
160
-
161
- If any check fails, workflow **HALTS** and notifies user.
162
-
163
- ### Framework-Specific Guidance
164
-
165
- **Playwright Advantages:**
166
-
167
- - Worker parallelism (significantly faster for large suites)
168
- - Trace viewer (powerful debugging with screenshots, network, console logs)
169
- - Multi-language support (TypeScript, JavaScript, Python, C#, Java)
170
- - Built-in API testing capabilities
171
- - Better handling of multiple browser contexts
172
-
173
- **Cypress Advantages:**
174
-
175
- - Superior developer experience (real-time reloading)
176
- - Excellent for component testing
177
- - Simpler setup for small teams
178
- - Better suited for watch mode during development
179
-
180
- **Avoid Cypress when:**
181
-
182
- - API chains are heavy and complex
183
- - Multi-tab/window scenarios are common
184
- - Worker parallelism is critical for CI performance
185
-
186
- ### Selector Strategy
187
-
188
- **Always recommend:**
189
-
190
- - `data-testid` attributes for UI elements (framework-agnostic)
191
- - `data-cy` attributes if Cypress is chosen (Cypress-specific)
192
- - Avoid brittle CSS selectors or XPath
193
-
194
- ### Standalone Operation
195
-
196
- This workflow operates independently:
197
-
198
- - **No story required**: Can be run at project initialization
199
- - **No epic context needed**: Works for greenfield and brownfield projects
200
- - **Autonomous**: Auto-detects configuration and proceeds without user input
201
-
202
- ### Output Summary Format
203
-
204
- After completion, provides structured summary:
205
-
206
- ```markdown
207
- ## Framework Scaffold Complete
208
-
209
- **Framework Selected**: Playwright (or Cypress)
210
-
211
- **Artifacts Created**:
212
-
213
- - ✅ Configuration file: playwright.config.ts
214
- - ✅ Directory structure: tests/e2e/, tests/support/
215
- - ✅ Environment config: .env.example
216
- - ✅ Node version: .nvmrc
217
- - ✅ Fixture architecture: tests/support/fixtures/
218
- - ✅ Data factories: tests/support/fixtures/factories/
219
- - ✅ Sample tests: tests/e2e/example.spec.ts
220
- - ✅ Documentation: tests/README.md
221
-
222
- **Next Steps**:
223
-
224
- 1. Copy .env.example to .env and fill in environment variables
225
- 2. Run npm install to install test dependencies
226
- 3. Run npm run test:e2e to execute sample tests
227
- 4. Review tests/README.md for detailed setup instructions
228
-
229
- **Knowledge Base References Applied**:
230
-
231
- - Fixture architecture pattern (pure functions + mergeTests)
232
- - Data factories with auto-cleanup (faker-based)
233
- - Network-first testing safeguards
234
- - Failure-only artifact capture
235
- ```
236
-
237
- ## Validation Checklist
238
-
239
- After workflow completion, verify:
240
-
241
- - [ ] Configuration file created and syntactically valid
242
- - [ ] Directory structure exists with all folders
243
- - [ ] Environment configuration generated (.env.example, .nvmrc)
244
- - [ ] Sample tests run successfully (npm run test:e2e)
245
- - [ ] Documentation complete and accurate (tests/README.md)
246
- - [ ] No errors or warnings during scaffold
247
- - [ ] package.json scripts updated correctly
248
- - [ ] Fixtures and factories follow patterns from knowledge base
249
-
250
- Refer to `checklist.md` for comprehensive validation criteria.
251
-
252
- ## Example Execution
253
-
254
- **Scenario 1: New React + Vite project**
255
-
256
- ```bash
257
- # User runs framework workflow
258
- bmad tea *framework
259
-
260
- # TEA detects:
261
- # - React project (from package.json)
262
- # - Vite bundler
263
- # - No existing test framework
264
- # - 150+ files (recommends Playwright)
265
-
266
- # TEA scaffolds:
267
- # - playwright.config.ts with Vite detection
268
- # - Component testing configuration
269
- # - React Testing Library helpers
270
- # - Sample component + E2E tests
271
- ```
272
-
273
- **Scenario 2: Existing Node.js API project**
274
-
275
- ```bash
276
- # User runs framework workflow
277
- bmad tea *framework
278
-
279
- # TEA detects:
280
- # - Node.js backend (no frontend framework)
281
- # - Express framework
282
- # - Small project (50 files)
283
- # - API endpoints in routes/
284
-
285
- # TEA scaffolds:
286
- # - playwright.config.ts focused on API testing
287
- # - tests/api/ directory structure
288
- # - API helper utilities
289
- # - Sample API tests with auth
290
- ```
291
-
292
- **Scenario 3: Cypress preferred (explicit)**
293
-
294
- ```bash
295
- # User sets framework preference
296
- # (in workflow config: framework_preference: "cypress")
297
-
298
- bmad tea *framework
299
-
300
- # TEA scaffolds:
301
- # - cypress.config.ts
302
- # - tests/e2e/ with Cypress patterns
303
- # - Cypress-specific commands
304
- # - data-cy selector strategy
305
- ```
306
-
307
- ## Troubleshooting
308
-
309
- **Issue: "Existing test framework detected"**
310
-
311
- - **Cause**: playwright.config._ or cypress.config._ already exists
312
- - **Solution**: Use `upgrade-framework` workflow (TBD) or manually remove existing config
313
-
314
- **Issue: "Cannot detect project type"**
315
-
316
- - **Cause**: package.json missing or malformed
317
- - **Solution**: Ensure package.json exists and has valid dependencies
318
-
319
- **Issue: "Sample test fails to run"**
320
-
321
- - **Cause**: Missing dependencies or incorrect BASE_URL
322
- - **Solution**: Run `npm install` and configure `.env` with correct URLs
323
-
324
- **Issue: "TypeScript compilation errors"**
325
-
326
- - **Cause**: Missing @types packages or tsconfig misconfiguration
327
- - **Solution**: Ensure TypeScript and type definitions are installed
328
-
329
- ## Related Workflows
330
-
331
- - **ci**: Scaffold CI/CD pipeline → [ci/README.md](../ci/README.md)
332
- - **test-design**: Plan test coverage → [test-design/README.md](../test-design/README.md)
333
- - **atdd**: Generate acceptance tests → [atdd/README.md](../atdd/README.md)
334
- - **automate**: Expand regression suite → [automate/README.md](../automate/README.md)
335
-
336
- ## Version History
337
-
338
- - **v4.0 (BMad v6)**: Pure markdown instructions, enhanced workflow.yaml, comprehensive README
339
- - **v3.x**: XML format instructions
340
- - **v2.x**: Legacy task-based approach