bmad-method-test-architecture-enterprise 1.3.2 → 1.4.0

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 (47) hide show
  1. package/.github/ISSUE_TEMPLATE/feature_request.md +1 -1
  2. package/CHANGELOG.md +22 -16
  3. package/README.md +2 -2
  4. package/docs/explanation/step-file-architecture.md +26 -26
  5. package/docs/explanation/{subprocess-architecture.md → subagent-architecture.md} +61 -59
  6. package/docs/explanation/{subprocess-implementation-status.md → subagent-implementation-status.md} +48 -48
  7. package/docs/reference/configuration.md +121 -2
  8. package/docs/reference/troubleshooting.md +24 -9
  9. package/package.json +1 -1
  10. package/release_notes.md +8 -7
  11. package/src/module.yaml +54 -1
  12. package/src/workflows/testarch/README.md +1 -1
  13. package/src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +159 -57
  14. package/src/workflows/testarch/atdd/steps-c/{step-04a-subprocess-api-failing.md → step-04a-subagent-api-failing.md} +15 -15
  15. package/src/workflows/testarch/atdd/steps-c/{step-04b-subprocess-e2e-failing.md → step-04b-subagent-e2e-failing.md} +14 -14
  16. package/src/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +31 -15
  17. package/src/workflows/testarch/atdd/validation-report-20260127-102401.md +2 -2
  18. package/src/workflows/testarch/automate/steps-c/step-03-generate-tests.md +202 -103
  19. package/src/workflows/testarch/automate/steps-c/{step-03a-subprocess-api.md → step-03a-subagent-api.md} +16 -16
  20. package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-backend.md → step-03b-subagent-backend.md} +21 -21
  21. package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-e2e.md → step-03b-subagent-e2e.md} +15 -15
  22. package/src/workflows/testarch/automate/steps-c/step-03c-aggregate.md +38 -22
  23. package/src/workflows/testarch/automate/validation-report-20260127-102401.md +2 -2
  24. package/src/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +78 -1
  25. package/src/workflows/testarch/ci/validation-report-20260127-102401.md +2 -2
  26. package/src/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +94 -3
  27. package/src/workflows/testarch/framework/validation-report-20260127-102401.md +2 -2
  28. package/src/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +150 -36
  29. package/src/workflows/testarch/nfr-assess/steps-c/{step-04a-subprocess-security.md → step-04a-subagent-security.md} +9 -9
  30. package/src/workflows/testarch/nfr-assess/steps-c/{step-04b-subprocess-performance.md → step-04b-subagent-performance.md} +8 -8
  31. package/src/workflows/testarch/nfr-assess/steps-c/{step-04c-subprocess-reliability.md → step-04c-subagent-reliability.md} +8 -8
  32. package/src/workflows/testarch/nfr-assess/steps-c/{step-04d-subprocess-scalability.md → step-04d-subagent-scalability.md} +8 -8
  33. package/src/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +27 -10
  34. package/src/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +2 -2
  35. package/src/workflows/testarch/teach-me-testing/data/tea-resources-index.yaml +3 -3
  36. package/src/workflows/testarch/test-design/steps-c/step-05-generate-output.md +72 -1
  37. package/src/workflows/testarch/test-design/validation-report-20260127-102401.md +2 -2
  38. package/src/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +147 -46
  39. package/src/workflows/testarch/test-review/steps-c/{step-03a-subprocess-determinism.md → step-03a-subagent-determinism.md} +12 -12
  40. package/src/workflows/testarch/test-review/steps-c/{step-03b-subprocess-isolation.md → step-03b-subagent-isolation.md} +10 -10
  41. package/src/workflows/testarch/test-review/steps-c/{step-03c-subprocess-maintainability.md → step-03c-subagent-maintainability.md} +9 -9
  42. package/src/workflows/testarch/test-review/steps-c/{step-03e-subprocess-performance.md → step-03e-subagent-performance.md} +9 -9
  43. package/src/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +10 -10
  44. package/src/workflows/testarch/test-review/validation-report-20260127-102401.md +2 -2
  45. package/src/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +92 -1
  46. package/src/workflows/testarch/trace/validation-report-20260127-102401.md +2 -2
  47. package/website/astro.config.mjs +2 -2
@@ -22,7 +22,7 @@ Please check all that apply:
22
22
 
23
23
  - [ ] Workflows (test-design, automate, atdd, test-review, trace, nfr-assess, ci, framework)
24
24
  - [ ] Knowledge Base (new testing patterns or fragments)
25
- - [ ] Subprocess Architecture (parallel execution)
25
+ - [ ] Subagent Architecture (parallel execution)
26
26
  - [ ] Configuration (module variables or settings)
27
27
  - [ ] Documentation (guides, tutorials, or references)
28
28
  - [ ] Integrations (Playwright Utils, MCP, or other tools)
package/CHANGELOG.md CHANGED
@@ -31,8 +31,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
31
  - `true` -> `"auto"` (recommended), `false` -> `"none"`
32
32
  - All workflow preflight steps updated to read `tea_browser_automation`
33
33
  - All browser-touching workflow steps updated with CLI/MCP/auto branching
34
- - Subprocess context passes `browser_automation` instead of `use_mcp_enhancements`
34
+ - Subagent context passes `browser_automation` instead of `use_mcp_enhancements`
35
35
  - Module subheader updated to reference Playwright CLI
36
+ - **Breaking**: Orchestration terminology standardized to `subagent` / `agent-team` (removed `subprocess` wording)
37
+ - Renamed worker step files from `*-subprocess-*` to `*-subagent-*` in `automate`, `atdd`, `nfr-assess`, and `test-review`
38
+ - Updated orchestration mode resolution examples to use `subagent` only
39
+ - Renamed architecture docs: `subprocess-architecture.md` -> `subagent-architecture.md`, `subprocess-implementation-status.md` -> `subagent-implementation-status.md`
40
+ - Updated docs navigation, troubleshooting references, and workflow/resource indexes to new names
41
+ - Updated workflow contract labels/examples from `subprocess` to `subagent` (for example `subagent_execution`, `subagentType`)
36
42
 
37
43
  ### Deprecated
38
44
 
@@ -83,17 +89,17 @@ All workflows implement the **trivariate step pattern** (Create/Edit/Validate):
83
89
 
84
90
  4. **ATDD (`AT` / `/bmad:tea:atdd`)**
85
91
  - Generate failing acceptance tests (TDD red phase)
86
- - **Subprocess Architecture**: Parallel API + E2E test generation
92
+ - **Subagent Architecture**: Parallel API + E2E test generation
87
93
  - Acceptance criteria validation checklist
88
94
 
89
95
  5. **Test Automation (`TA` / `/bmad:tea:automate`)**
90
96
  - Expand automation coverage systematically
91
- - **Subprocess Architecture**: Parallel API + E2E test generation
97
+ - **Subagent Architecture**: Parallel API + E2E test generation
92
98
  - Coverage gap analysis and prioritization
93
99
 
94
100
  6. **Test Review (`RV` / `/bmad:tea:test-review`)**
95
101
  - Comprehensive test quality audit (0-100 scoring)
96
- - **Subprocess Architecture**: Parallel evaluation across 5 quality dimensions
102
+ - **Subagent Architecture**: Parallel evaluation across 5 quality dimensions
97
103
  - Determinism
98
104
  - Isolation
99
105
  - Maintainability
@@ -108,24 +114,24 @@ All workflows implement the **trivariate step pattern** (Create/Edit/Validate):
108
114
 
109
115
  8. **NFR Assessment (`NR` / `/bmad:tea:nfr-assess`)**
110
116
  - Non-functional requirements evaluation
111
- - **Subprocess Architecture**: Parallel assessment across 4 NFR domains
117
+ - **Subagent Architecture**: Parallel assessment across 4 NFR domains
112
118
  - Security
113
119
  - Performance
114
120
  - Reliability
115
121
  - Scalability
116
122
  - Evidence-based scoring with recommendations
117
123
 
118
- #### Subprocess Architecture (Phase 5)
124
+ #### Subagent Architecture (Phase 5)
119
125
 
120
- - **19 Subprocess Step Files** for parallel execution:
121
- - `automate`: 3 subprocess files (2 parallel + aggregate)
122
- - `atdd`: 3 subprocess files (2 parallel + aggregate)
123
- - `test-review`: 6 subprocess files (5 parallel + aggregate)
124
- - `nfr-assess`: 5 subprocess files (4 parallel + aggregate)
126
+ - **19 Subagent Step Files** for parallel execution:
127
+ - `automate`: 3 subagent files (2 parallel + aggregate)
128
+ - `atdd`: 3 subagent files (2 parallel + aggregate)
129
+ - `test-review`: 6 subagent files (5 parallel + aggregate)
130
+ - `nfr-assess`: 5 subagent files (4 parallel + aggregate)
125
131
  - `trace`: Two-phase separation (coverage → gate decision)
126
- - **Temp File Outputs**: Each subprocess writes to `/tmp/bmad-tea-*` files
127
- - **Aggregation Step**: Consolidates subprocess results into final output
128
- - **Documentation**: Complete subprocess architecture documentation in `docs/explanation/`
132
+ - **Temp File Outputs**: Each subagent writes to `/tmp/bmad-tea-*` files
133
+ - **Aggregation Step**: Consolidates subagent results into final output
134
+ - **Documentation**: Complete subagent architecture documentation in `docs/explanation/`
129
135
 
130
136
  #### Knowledge Base System
131
137
 
@@ -197,7 +203,7 @@ All workflows implement the **trivariate step pattern** (Create/Edit/Validate):
197
203
  - `steps-v/` (Validate mode) - 1 step per workflow
198
204
  - **Validation Reports**: Comprehensive validation with checklist scoring
199
205
  - **Documentation Links**: All internal links validated and fixed (309 → 0 broken links)
200
- - **Subprocess Optimization**: Parallel execution for faster workflow completion
206
+ - **Subagent Optimization**: Parallel execution for faster workflow completion
201
207
 
202
208
  ### Fixed
203
209
 
@@ -238,7 +244,7 @@ For users migrating from BMM-embedded TEA, see [`docs/MIGRATION.md`](docs/MIGRAT
238
244
 
239
245
  - **1.0.0** (2026-01-XX) - TEA Module Independence Release
240
246
  - Standalone module extraction from BMAD Method
241
- - 9 workflows with subprocess architecture
247
+ - 9 workflows with subagent architecture
242
248
  - 34 knowledge base fragments
243
249
  - Complete documentation suite
244
250
 
package/README.md CHANGED
@@ -60,7 +60,7 @@ flowchart LR
60
60
  4. **Step-by-step execution** — Only the current step file is in context (just-in-time loading). Each step explicitly names the next one (`nextStepFile: './step-02-...'`). The LLM reads, executes, saves output, then loads the next step. No future steps are ever preloaded.
61
61
  5. **Knowledge injection** — Step-01 reads `tea-index.csv` and selectively loads fragments by **tier** (core = always, extended = on-demand, specialized = only when relevant) and **config flags** (e.g., `tea_use_pactjs_utils`). This is deliberate context engineering: a backend project loads ~1,800 lines of fragments; a fullstack project loads ~4,500 lines. Conditional loading cuts context usage by 40-50%.
62
62
  6. **Templates** — When a step produces output (e.g., a traceability matrix or test review report), it reads the `*-template.md` file and fills in the `{PLACEHOLDER}` values with computed results. The template provides consistent structure; the step provides the content.
63
- 7. **Subprocess isolation** — Heavy workflows (e.g., `automate`) spawn parallel subprocesses that each run in an isolated context. Subprocesses write structured JSON to temp files. An aggregation step reads the JSON outputs — only the results enter the main context, not the full subprocess history.
63
+ 7. **Subagent isolation** — Heavy workflows (e.g., `automate`) spawn parallel subagents that each run in an isolated context. Subagents write structured JSON to temp files. An aggregation step reads the JSON outputs — only the results enter the main context, not the full subagent history.
64
64
  8. **Progress tracking** — Each step appends to an output file with YAML frontmatter (`stepsCompleted`, `lastStep`, `lastSaved`). Resume mode reads this frontmatter and routes to the next incomplete step.
65
65
  9. **Validation** — The `steps-v/` mode reads `checklist.md` and evaluates the workflow's output against its criteria, producing a pass/fail validation report.
66
66
 
@@ -73,7 +73,7 @@ BMad workflows and Claude Code Skills solve different problems at different scal
73
73
  | **Execution** | Single prompt, one shot | 5-9 sequential steps with explicit handoffs |
74
74
  | **State** | Stateless | YAML frontmatter tracking (`stepsCompleted`, `lastStep`) with resume |
75
75
  | **Knowledge** | Whatever fits in one prompt | Tiered index (40 fragments), conditional loading by config + stack detection |
76
- | **Context mgmt** | Everything in one shot | Just-in-time step loading, subprocess isolation (separate contexts) |
76
+ | **Context mgmt** | Everything in one shot | Just-in-time step loading, subagent isolation (separate contexts) |
77
77
  | **Output** | Freeform | Templates with `{PLACEHOLDER}` vars filled by specific steps |
78
78
  | **Validation** | None | Dedicated mode (`steps-v/`) evaluating against checklists |
79
79
  | **Configuration** | None | `module.yaml` with prompted config flags driving conditional behavior |
@@ -72,7 +72,7 @@ workflow/
72
72
  - Granular instructions → LLM focuses on one task
73
73
  - Clear exit conditions → LLM knows when to stop
74
74
  - Repeated context → LLM has all necessary info
75
- - Subprocess support → Parallel execution possible
75
+ - Subagent support → Parallel execution possible
76
76
 
77
77
  ---
78
78
 
@@ -153,19 +153,19 @@ Example:
153
153
  - ❌ Do NOT add features not requested
154
154
  ```
155
155
 
156
- ### 5. Subprocess Support
156
+ ### 5. Subagent Support
157
157
 
158
- **Independent steps can run in parallel subprocesses** - massive performance gain.
158
+ **Independent steps can run in parallel subagents** - massive performance gain.
159
159
 
160
160
  Example (automate workflow):
161
161
 
162
162
  ```
163
163
  Step 1-2: Sequential (setup)
164
- Step 3: Subprocess A (API tests) + Subprocess B (E2E tests) - PARALLEL
164
+ Step 3: Subagent A (API tests) + Subagent B (E2E tests) - PARALLEL
165
165
  Step 4: Sequential (aggregate)
166
166
  ```
167
167
 
168
- See [subprocess-architecture.md](./subprocess-architecture.md) for details.
168
+ See [subagent-architecture.md](./subagent-architecture.md) for details.
169
169
 
170
170
  ---
171
171
 
@@ -193,8 +193,8 @@ Step 1: Setup → Step 2: Configure → Step 3: Generate → Step 4: Validate
193
193
  Step 1: Setup
194
194
  Step 2: Load knowledge
195
195
  Step 3: PARALLEL
196
- ├── Subprocess A: Generate API tests
197
- └── Subprocess B: Generate E2E tests
196
+ ├── Subagent A: Generate API tests
197
+ └── Subagent B: Generate E2E tests
198
198
  Step 4: Aggregate + validate
199
199
  ```
200
200
 
@@ -211,9 +211,9 @@ Step 4: Aggregate + validate
211
211
  ```
212
212
  Step 1: Load context
213
213
  Step 2: PARALLEL
214
- ├── Subprocess A: Check dimension 1
215
- ├── Subprocess B: Check dimension 2
216
- ├── Subprocess C: Check dimension 3
214
+ ├── Subagent A: Check dimension 1
215
+ ├── Subagent B: Check dimension 2
216
+ ├── Subagent C: Check dimension 3
217
217
  └── (etc.)
218
218
  Step 3: Aggregate scores
219
219
  ```
@@ -237,7 +237,7 @@ Phase 2: Read matrix → Apply decision tree → Generate gate decision
237
237
 
238
238
  - Phase 2 depends on Phase 1 output
239
239
  - Not parallel, but clean separation of concerns
240
- - Subprocess-like phase isolation
240
+ - Subagent-like phase isolation
241
241
 
242
242
  ### Pattern 5: Risk-Based Planning (Design Workflows)
243
243
 
@@ -354,7 +354,7 @@ Load `steps/step-[N+1]-[action].md` and execute.
354
354
  ### Example: Step File for API Test Generation
355
355
 
356
356
  ````markdown
357
- # Step 3A: Generate API Tests (Subprocess)
357
+ # Step 3A: Generate API Tests (Subagent)
358
358
 
359
359
  ## Context (from previous steps)
360
360
 
@@ -397,7 +397,7 @@ Generate API tests for the 3 features identified above.
397
397
 
398
398
  ## What You MUST NOT Do
399
399
 
400
- - ❌ Do NOT generate E2E tests (that's Step 3B - parallel subprocess)
400
+ - ❌ Do NOT generate E2E tests (that's Step 3B - parallel subagent)
401
401
  - ❌ Do NOT generate fixtures yet (that's Step 4)
402
402
  - ❌ Do NOT run tests yet (that's Step 5)
403
403
  - ❌ Do NOT use custom fetch/axios (use apiRequest helper)
@@ -425,14 +425,14 @@ Output JSON to `/tmp/automate-api-tests-{timestamp}.json`:
425
425
 
426
426
  ## Exit Condition
427
427
 
428
- You may finish this subprocess when:
428
+ You may finish this subagent when:
429
429
 
430
430
  - ✅ All 3 features have API test files
431
431
  - ✅ All tests use Playwright Utils helpers
432
432
  - ✅ All tests use data factories
433
433
  - ✅ JSON output file written to /tmp/
434
434
 
435
- Subprocess complete. Main workflow will read output and proceed.
435
+ Subagent complete. Main workflow will read output and proceed.
436
436
 
437
437
  ````
438
438
 
@@ -450,7 +450,7 @@ All 9 TEA workflows score **100%** on BMad Builder validation. Validation report
450
450
  - ✅ Explicit exit conditions (LLM knows when to stop)
451
451
  - ✅ Context injection (each step self-contained)
452
452
  - ✅ Strict action boundaries (prevents improvisation)
453
- - ✅ Subprocess support (where applicable)
453
+ - ✅ Subagent support (where applicable)
454
454
 
455
455
  ### Real-Project Testing
456
456
 
@@ -479,7 +479,7 @@ Update step files when:
479
479
  1. **Knowledge fragments change**: Update fragment loading instructions
480
480
  2. **New patterns emerge**: Add new requirements/patterns to steps
481
481
  3. **LLM improvises**: Add stricter boundaries to prevent improvisation
482
- 4. **Performance issues**: Split steps further or add subprocesses
482
+ 4. **Performance issues**: Split steps further or add subagents
483
483
  5. **User feedback**: Clarify ambiguous instructions
484
484
 
485
485
  ### Best Practices
@@ -510,7 +510,7 @@ Update step files when:
510
510
  - test-review: ~5 minutes (5 quality checks sequentially)
511
511
  - nfr-assess: ~12 minutes (4 NFR domains sequentially)
512
512
 
513
- **After Step Files (Parallel Subprocesses)**:
513
+ **After Step Files (Parallel Subagents)**:
514
514
 
515
515
  - automate: ~5 minutes (API + E2E in parallel) - **50% faster**
516
516
  - test-review: ~2 minutes (all checks in parallel) - **60% faster**
@@ -538,9 +538,9 @@ When running workflows, users see:
538
538
  ```
539
539
  ✓ Step 1: Setup complete
540
540
  ✓ Step 2: Knowledge fragments loaded
541
- ⟳ Step 3: Generating tests (2 subprocesses running)
542
- ├── Subprocess A: API tests... ✓
543
- └── Subprocess B: E2E tests... ✓
541
+ ⟳ Step 3: Generating tests (2 subagents running)
542
+ ├── Subagent A: API tests... ✓
543
+ └── Subagent B: E2E tests... ✓
544
544
  ✓ Step 4: Aggregating results
545
545
  ✓ Step 5: Validation complete
546
546
  ```
@@ -556,7 +556,7 @@ When running workflows, users see:
556
556
  - **Diagnosis**: Step instructions too vague
557
557
  - **Fix**: Add more explicit requirements and forbidden actions
558
558
 
559
- **Issue**: Subprocess output not aggregating correctly
559
+ **Issue**: Subagent output not aggregating correctly
560
560
 
561
561
  - **Diagnosis**: Temp file path mismatch or JSON parsing error
562
562
  - **Fix**: Check temp file naming convention, verify JSON format
@@ -566,16 +566,16 @@ When running workflows, users see:
566
566
  - **Diagnosis**: Fragment loading instructions unclear
567
567
  - **Fix**: Make fragment usage requirements more explicit
568
568
 
569
- **Issue**: Workflow too slow despite subprocesses
569
+ **Issue**: Workflow too slow despite subagents
570
570
 
571
571
  - **Diagnosis**: Not enough parallelization
572
- - **Fix**: Identify more independent steps for subprocess pattern
572
+ - **Fix**: Identify more independent steps for subagent pattern
573
573
 
574
574
  ---
575
575
 
576
576
  ## References
577
577
 
578
- - **Subprocess Architecture**: [subprocess-architecture.md](./subprocess-architecture.md)
578
+ - **Subagent Architecture**: [subagent-architecture.md](./subagent-architecture.md)
579
579
  - **Knowledge Base System**: [knowledge-base-system.md](./knowledge-base-system.md)
580
580
  - **BMad Builder Validation Reports**: `src/workflows/testarch/*/validation-report-*.md`
581
581
  - **TEA Workflow Examples**: `src/workflows/testarch/*/steps/*.md`
@@ -595,5 +595,5 @@ When running workflows, users see:
595
595
  **Status**: Production-ready, 100% LLM compliance achieved
596
596
  **Validation**: All 9 workflows score 100% on BMad Builder validation
597
597
  **Testing**: All 9 workflows tested with real projects, zero improvisation issues
598
- **Next Steps**: Implement subprocess patterns (see subprocess-architecture.md)
598
+ **Next Steps**: Implement subagent patterns (see subagent-architecture.md)
599
599
  ````
@@ -1,9 +1,9 @@
1
1
  ---
2
- title: Subprocess Architecture
2
+ title: Subagent Architecture
3
3
  description: Parallel execution pattern for TEA workflows
4
4
  ---
5
5
 
6
- # Subprocess Architecture for TEA Workflows
6
+ # Subagent Architecture for TEA Workflows
7
7
 
8
8
  **Version**: 1.0
9
9
  **Date**: 2026-01-27
@@ -13,7 +13,7 @@ description: Parallel execution pattern for TEA workflows
13
13
 
14
14
  ## Overview
15
15
 
16
- TEA workflows use **subprocess patterns** to parallelize independent tasks, improving performance and maintaining clean separation of concerns. Five workflows benefit from this architecture:
16
+ TEA workflows use **subagent patterns** to parallelize independent tasks, improving performance and maintaining clean separation of concerns. Five workflows benefit from this architecture:
17
17
 
18
18
  1. **automate** - Parallel test generation (API + E2E)
19
19
  2. **atdd** - Parallel failing test generation (API + E2E)
@@ -23,17 +23,17 @@ TEA workflows use **subprocess patterns** to parallelize independent tasks, impr
23
23
 
24
24
  ---
25
25
 
26
- ## Core Subprocess Pattern
26
+ ## Core Subagent Pattern
27
27
 
28
28
  ### Architecture
29
29
 
30
30
  ```
31
31
  Main Workflow (Orchestrator)
32
32
  ├── Step 1: Setup & Context Loading
33
- ├── Step 2: Launch Subprocesses
34
- │ ├── Subprocess A → temp-file-a.json
35
- │ ├── Subprocess B → temp-file-b.json
36
- │ ├── Subprocess C → temp-file-c.json
33
+ ├── Step 2: Launch Subagents
34
+ │ ├── Subagent A → temp-file-a.json
35
+ │ ├── Subagent B → temp-file-b.json
36
+ │ ├── Subagent C → temp-file-c.json
37
37
  │ └── (All run in parallel, isolated 200k containers)
38
38
  └── Step 3: Aggregate Results
39
39
  ├── Read all temp files
@@ -43,11 +43,11 @@ Main Workflow (Orchestrator)
43
43
 
44
44
  ### Key Principles
45
45
 
46
- 1. **Independence**: Each subprocess is completely independent (no shared state)
47
- 2. **Isolation**: Each subprocess runs in separate 200k context container
48
- 3. **Output Format**: All subprocesses output structured JSON to temp files
46
+ 1. **Independence**: Each subagent is completely independent (no shared state)
47
+ 2. **Isolation**: Each subagent runs in separate 200k context container
48
+ 3. **Output Format**: All subagents output structured JSON to temp files
49
49
  4. **Aggregation**: Main workflow reads temp files and synthesizes final output
50
- 5. **Error Handling**: Each subprocess reports success/failure in JSON output
50
+ 5. **Error Handling**: Each subagent reports success/failure in JSON output
51
51
 
52
52
  ---
53
53
 
@@ -64,8 +64,8 @@ automate workflow
64
64
  ├── Step 1: Analyze codebase & identify features
65
65
  ├── Step 2: Load relevant knowledge fragments
66
66
  ├── Step 3: Launch parallel test generation
67
- │ ├── Subprocess A: Generate API tests → /tmp/api-tests-{timestamp}.json
68
- │ └── Subprocess B: Generate E2E tests → /tmp/e2e-tests-{timestamp}.json
67
+ │ ├── Subagent A: Generate API tests → /tmp/api-tests-{timestamp}.json
68
+ │ └── Subagent B: Generate E2E tests → /tmp/e2e-tests-{timestamp}.json
69
69
  ├── Step 4: Aggregate tests
70
70
  │ ├── Read API tests JSON
71
71
  │ ├── Read E2E tests JSON
@@ -74,7 +74,7 @@ automate workflow
74
74
  └── Step 6: Generate DoD summary
75
75
  ```
76
76
 
77
- #### Subprocess A: API Tests
77
+ #### Subagent A: API Tests
78
78
 
79
79
  **Input** (passed via temp file):
80
80
 
@@ -106,7 +106,7 @@ automate workflow
106
106
  }
107
107
  ```
108
108
 
109
- #### Subprocess B: E2E Tests
109
+ #### Subagent B: E2E Tests
110
110
 
111
111
  **Input** (passed via temp file):
112
112
 
@@ -141,7 +141,7 @@ automate workflow
141
141
  #### Step 4: Aggregation Logic
142
142
 
143
143
  ```javascript
144
- // Read both subprocess outputs
144
+ // Read both subagent outputs
145
145
  const apiTests = JSON.parse(fs.readFileSync('/tmp/api-tests-{timestamp}.json', 'utf8'));
146
146
  const e2eTests = JSON.parse(fs.readFileSync('/tmp/e2e-tests-{timestamp}.json', 'utf8'));
147
147
 
@@ -174,8 +174,8 @@ atdd workflow
174
174
  ├── Step 1: Load story acceptance criteria
175
175
  ├── Step 2: Load relevant knowledge fragments
176
176
  ├── Step 3: Launch parallel test generation
177
- │ ├── Subprocess A: Generate failing API tests → /tmp/atdd-api-{timestamp}.json
178
- │ └── Subprocess B: Generate failing E2E tests → /tmp/atdd-e2e-{timestamp}.json
177
+ │ ├── Subagent A: Generate failing API tests → /tmp/atdd-api-{timestamp}.json
178
+ │ └── Subagent B: Generate failing E2E tests → /tmp/atdd-e2e-{timestamp}.json
179
179
  ├── Step 4: Aggregate tests
180
180
  ├── Step 5: Verify tests fail (red phase)
181
181
  └── Step 6: Output ATDD checklist
@@ -183,7 +183,7 @@ atdd workflow
183
183
 
184
184
  **Key Difference from automate**: Tests must be written to **fail** before implementation exists.
185
185
 
186
- #### Subprocess Outputs
186
+ #### Subagent Outputs
187
187
 
188
188
  Same JSON structure as automate, but:
189
189
 
@@ -202,20 +202,20 @@ Same JSON structure as automate, but:
202
202
  test-review workflow
203
203
  ├── Step 1: Load test files & context
204
204
  ├── Step 2: Launch parallel quality checks
205
- │ ├── Subprocess A: Determinism check → /tmp/determinism-{timestamp}.json
206
- │ ├── Subprocess B: Isolation check → /tmp/isolation-{timestamp}.json
207
- │ ├── Subprocess C: Maintainability check → /tmp/maintainability-{timestamp}.json
208
- │ ├── Subprocess D: Coverage check → /tmp/coverage-{timestamp}.json
209
- │ └── Subprocess E: Performance check → /tmp/performance-{timestamp}.json
205
+ │ ├── Subagent A: Determinism check → /tmp/determinism-{timestamp}.json
206
+ │ ├── Subagent B: Isolation check → /tmp/isolation-{timestamp}.json
207
+ │ ├── Subagent C: Maintainability check → /tmp/maintainability-{timestamp}.json
208
+ │ ├── Subagent D: Coverage check → /tmp/coverage-{timestamp}.json
209
+ │ └── Subagent E: Performance check → /tmp/performance-{timestamp}.json
210
210
  └── Step 3: Aggregate findings
211
211
  ├── Calculate weighted score (0-100)
212
212
  ├── Synthesize violations
213
213
  └── Generate review report with suggestions
214
214
  ```
215
215
 
216
- #### Subprocess Output Format
216
+ #### Subagent Output Format
217
217
 
218
- Each quality dimension subprocess outputs:
218
+ Each quality dimension subagent outputs:
219
219
 
220
220
  ```json
221
221
  {
@@ -281,19 +281,19 @@ const report = {
281
281
  nfr-assess workflow
282
282
  ├── Step 1: Load system context
283
283
  ├── Step 2: Launch parallel NFR assessments
284
- │ ├── Subprocess A: Security assessment → /tmp/nfr-security-{timestamp}.json
285
- │ ├── Subprocess B: Performance assessment → /tmp/nfr-performance-{timestamp}.json
286
- │ ├── Subprocess C: Reliability assessment → /tmp/nfr-reliability-{timestamp}.json
287
- │ └── Subprocess D: Scalability assessment → /tmp/nfr-scalability-{timestamp}.json
284
+ │ ├── Subagent A: Security assessment → /tmp/nfr-security-{timestamp}.json
285
+ │ ├── Subagent B: Performance assessment → /tmp/nfr-performance-{timestamp}.json
286
+ │ ├── Subagent C: Reliability assessment → /tmp/nfr-reliability-{timestamp}.json
287
+ │ └── Subagent D: Scalability assessment → /tmp/nfr-scalability-{timestamp}.json
288
288
  └── Step 3: Aggregate NFR report
289
289
  ├── Synthesize domain assessments
290
290
  ├── Identify cross-domain risks
291
291
  └── Generate compliance documentation
292
292
  ```
293
293
 
294
- #### Subprocess Output Format
294
+ #### Subagent Output Format
295
295
 
296
- Each NFR domain subprocess outputs:
296
+ Each NFR domain subagent outputs:
297
297
 
298
298
  ```json
299
299
  {
@@ -377,7 +377,7 @@ trace workflow
377
377
  └── Step 7: Generate gate decision (PASS/CONCERNS/FAIL/WAIVED)
378
378
  ```
379
379
 
380
- **Note**: This isn't parallel subprocesses, but subprocess-like **phase separation** where Phase 2 depends on Phase 1 output.
380
+ **Note**: This isn't parallel subagents, but subagent-like **phase separation** where Phase 2 depends on Phase 1 output.
381
381
 
382
382
  #### Phase 1 Output Format
383
383
 
@@ -446,7 +446,7 @@ const report = {
446
446
  **Naming Convention**:
447
447
 
448
448
  ```
449
- /tmp/{workflow}-{subprocess-name}-{timestamp}.json
449
+ /tmp/{workflow}-{subagent-name}-{timestamp}.json
450
450
  ```
451
451
 
452
452
  **Examples**:
@@ -463,7 +463,7 @@ const report = {
463
463
 
464
464
  ### Error Handling
465
465
 
466
- Each subprocess JSON output must include:
466
+ Each subagent JSON output must include:
467
467
 
468
468
  ```json
469
469
  {
@@ -475,51 +475,53 @@ Each subprocess JSON output must include:
475
475
 
476
476
  Main workflow aggregation step must:
477
477
 
478
- 1. Check `success` field for each subprocess
479
- 2. If any subprocess failed, aggregate error messages
480
- 3. Decide whether to continue (partial success) or fail (critical subprocess failed)
478
+ 1. Check `success` field for each subagent
479
+ 2. If any subagent failed, aggregate error messages
480
+ 3. Decide whether to continue (partial success) or fail (critical subagent failed)
481
481
 
482
482
  ### Performance Considerations
483
483
 
484
- **Subprocess Isolation**:
484
+ **Subagent Isolation**:
485
485
 
486
- - Each subprocess runs in separate 200k context container
486
+ - Each subagent runs in separate 200k context container
487
487
  - No shared memory or state
488
488
  - Communication only via JSON files
489
489
 
490
490
  **Parallelization**:
491
491
 
492
- - Use Claude Code's subprocess/agent launching capabilities
492
+ - Resolve execution mode via config (`tea_execution_mode`, `tea_capability_probe`)
493
+ - Probe runtime support for agent-team and subagent launch before dispatch
494
+ - Fallback order in `auto` mode: `agent-team` → `subagent` → `sequential`
493
495
  - Ensure temp file paths are unique (timestamp-based)
494
- - Implement proper synchronization (wait for all subprocesses to complete)
496
+ - Implement proper synchronization (wait for all subagents to complete)
495
497
 
496
498
  ---
497
499
 
498
- ## Testing Subprocess Workflows
500
+ ## Testing Subagent Workflows
499
501
 
500
502
  ### Test Checklist
501
503
 
502
- For each workflow with subprocesses:
504
+ For each workflow with subagents:
503
505
 
504
- - [ ] **Unit Test**: Test each subprocess in isolation
506
+ - [ ] **Unit Test**: Test each subagent in isolation
505
507
  - Provide mock input JSON
506
508
  - Verify output JSON structure
507
509
  - Test error scenarios
508
510
 
509
511
  - [ ] **Integration Test**: Test full workflow
510
- - Launch all subprocesses
512
+ - Launch all subagents
511
513
  - Verify parallel execution
512
514
  - Verify aggregation logic
513
515
  - Test with real project data
514
516
 
515
517
  - [ ] **Performance Test**: Measure speedup
516
518
  - Benchmark sequential vs parallel
517
- - Measure subprocess overhead
519
+ - Measure subagent overhead
518
520
  - Verify memory usage acceptable
519
521
 
520
522
  - [ ] **Error Handling Test**: Test failure scenarios
521
- - One subprocess fails
522
- - Multiple subprocesses fail
523
+ - One subagent fails
524
+ - Multiple subagents fail
523
525
  - Temp file read/write errors
524
526
  - Timeout scenarios
525
527
 
@@ -547,32 +549,32 @@ For each workflow with subprocesses:
547
549
 
548
550
  ## Documentation for Users
549
551
 
550
- Users don't need to know about subprocess implementation details, but they should know:
552
+ Users don't need to know about subagent implementation details, but they should know:
551
553
 
552
554
  1. **Performance**: Certain workflows are optimized for parallel execution
553
555
  2. **Temp Files**: Workflows create temporary files during execution (cleaned up automatically)
554
- 3. **Progress**: When running workflows, they may see multiple "subprocess" indicators
556
+ 3. **Progress**: When running workflows, they may see multiple "subagent" indicators
555
557
  4. **Debugging**: If workflow fails, temp files may be preserved for troubleshooting
556
558
 
557
559
  ---
558
560
 
559
561
  ## Future Enhancements
560
562
 
561
- 1. **Subprocess Pooling**: Reuse subprocess containers for multiple operations
563
+ 1. **Subagent Pooling**: Reuse subagent containers for multiple operations
562
564
  2. **Adaptive Parallelization**: Dynamically decide whether to parallelize based on workload
563
- 3. **Progress Reporting**: Real-time progress updates from each subprocess
564
- 4. **Caching**: Cache subprocess outputs for identical inputs (idempotent operations)
565
- 5. **Distributed Execution**: Run subprocesses on different machines for massive parallelization
565
+ 3. **Progress Reporting**: Real-time progress updates from each subagent
566
+ 4. **Caching**: Cache subagent outputs for identical inputs (idempotent operations)
567
+ 5. **Distributed Execution**: Run subagents on different machines for massive parallelization
566
568
 
567
569
  ---
568
570
 
569
571
  ## References
570
572
 
571
- - BMad Builder subprocess examples: `_bmad/bmb/workflows/*/subprocess-*.md`
572
- - Claude Code agent/subprocess documentation
573
+ - BMad Builder subagent examples: `_bmad/bmb/workflows/*/subagent-*.md`
574
+ - Runtime-specific agent/subagent documentation (Codex, Claude Code, etc.)
573
575
  - TEA Workflow validation reports (proof of 100% compliance)
574
576
 
575
577
  ---
576
578
 
577
579
  **Status**: Ready for implementation across 5 workflows
578
- **Next Steps**: Implement subprocess patterns in workflow step files, test, document
580
+ **Next Steps**: Implement subagent patterns in workflow step files, test, document