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

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 (48) 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/subagent-architecture.md +189 -0
  6. package/docs/reference/configuration.md +134 -2
  7. package/docs/reference/troubleshooting.md +24 -9
  8. package/package.json +1 -1
  9. package/release_notes.md +5 -8
  10. package/src/module.yaml +54 -1
  11. package/src/workflows/testarch/README.md +1 -1
  12. package/src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +159 -57
  13. package/src/workflows/testarch/atdd/steps-c/{step-04a-subprocess-api-failing.md → step-04a-subagent-api-failing.md} +15 -15
  14. package/src/workflows/testarch/atdd/steps-c/{step-04b-subprocess-e2e-failing.md → step-04b-subagent-e2e-failing.md} +14 -14
  15. package/src/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +31 -15
  16. package/src/workflows/testarch/atdd/validation-report-20260127-102401.md +2 -2
  17. package/src/workflows/testarch/automate/steps-c/step-03-generate-tests.md +202 -103
  18. package/src/workflows/testarch/automate/steps-c/{step-03a-subprocess-api.md → step-03a-subagent-api.md} +16 -16
  19. package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-backend.md → step-03b-subagent-backend.md} +21 -21
  20. package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-e2e.md → step-03b-subagent-e2e.md} +15 -15
  21. package/src/workflows/testarch/automate/steps-c/step-03c-aggregate.md +38 -22
  22. package/src/workflows/testarch/automate/validation-report-20260127-102401.md +2 -2
  23. package/src/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +78 -1
  24. package/src/workflows/testarch/ci/validation-report-20260127-102401.md +2 -2
  25. package/src/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +94 -3
  26. package/src/workflows/testarch/framework/validation-report-20260127-102401.md +2 -2
  27. package/src/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +150 -36
  28. package/src/workflows/testarch/nfr-assess/steps-c/{step-04a-subprocess-security.md → step-04a-subagent-security.md} +9 -9
  29. package/src/workflows/testarch/nfr-assess/steps-c/{step-04b-subprocess-performance.md → step-04b-subagent-performance.md} +8 -8
  30. package/src/workflows/testarch/nfr-assess/steps-c/{step-04c-subprocess-reliability.md → step-04c-subagent-reliability.md} +8 -8
  31. package/src/workflows/testarch/nfr-assess/steps-c/{step-04d-subprocess-scalability.md → step-04d-subagent-scalability.md} +8 -8
  32. package/src/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +27 -10
  33. package/src/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +2 -2
  34. package/src/workflows/testarch/teach-me-testing/data/tea-resources-index.yaml +3 -3
  35. package/src/workflows/testarch/test-design/steps-c/step-05-generate-output.md +72 -1
  36. package/src/workflows/testarch/test-design/validation-report-20260127-102401.md +2 -2
  37. package/src/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +147 -46
  38. package/src/workflows/testarch/test-review/steps-c/{step-03a-subprocess-determinism.md → step-03a-subagent-determinism.md} +12 -12
  39. package/src/workflows/testarch/test-review/steps-c/{step-03b-subprocess-isolation.md → step-03b-subagent-isolation.md} +10 -10
  40. package/src/workflows/testarch/test-review/steps-c/{step-03c-subprocess-maintainability.md → step-03c-subagent-maintainability.md} +9 -9
  41. package/src/workflows/testarch/test-review/steps-c/{step-03e-subprocess-performance.md → step-03e-subagent-performance.md} +9 -9
  42. package/src/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +10 -10
  43. package/src/workflows/testarch/test-review/validation-report-20260127-102401.md +2 -2
  44. package/src/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +92 -1
  45. package/src/workflows/testarch/trace/validation-report-20260127-102401.md +2 -2
  46. package/website/astro.config.mjs +1 -2
  47. package/docs/explanation/subprocess-architecture.md +0 -578
  48. package/docs/explanation/subprocess-implementation-status.md +0 -327
@@ -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
  ````
@@ -0,0 +1,189 @@
1
+ ---
2
+ title: Subagent Architecture
3
+ description: How TEA uses subagents and agent teams across workflows
4
+ ---
5
+
6
+ # Subagents and Agent Teams in TEA
7
+
8
+ This guide explains how TEA orchestrates work when a workflow can split into
9
+ worker steps (independent workers or dependency-ordered work units).
10
+
11
+ ## Scope
12
+
13
+ This applies to these workflows:
14
+
15
+ - `automate`
16
+ - `atdd`
17
+ - `test-review`
18
+ - `nfr-assess`
19
+ - `framework`
20
+ - `ci`
21
+ - `test-design`
22
+ - `trace`
23
+
24
+ It does not apply to `teach-me-testing`.
25
+
26
+ ---
27
+
28
+ ## Core Model
29
+
30
+ TEA orchestration has three parts:
31
+
32
+ 1. Resolve execution mode (`tea_execution_mode` + optional runtime probe)
33
+ 2. Dispatch worker steps (independent or dependency-ordered, depending on workflow)
34
+ 3. Aggregate worker outputs into one deterministic final artifact
35
+
36
+ Workers are isolated and exchange data through structured outputs that the
37
+ aggregation step validates.
38
+
39
+ ---
40
+
41
+ ## Execution Modes
42
+
43
+ TEA supports four modes:
44
+
45
+ - `auto`
46
+ - `agent-team`
47
+ - `subagent`
48
+ - `sequential`
49
+
50
+ ### What Each Mode Means
51
+
52
+ - `auto`: Choose the best supported mode at runtime.
53
+ - `agent-team`: Prefer team/delegation orchestration when runtime supports it.
54
+ - `subagent`: Prefer isolated worker orchestration when runtime supports it.
55
+ - `sequential`: Run worker steps one-by-one.
56
+
57
+ ### Fallback Behavior
58
+
59
+ When `tea_capability_probe: true`, TEA can fallback safely:
60
+
61
+ - `auto` falls back in order: `agent-team` -> `subagent` -> `sequential`
62
+ - explicit `agent-team` or `subagent` falls back to next supported mode
63
+ - `sequential` always stays sequential
64
+
65
+ When `tea_capability_probe: false`, TEA honors the requested mode strictly and
66
+ fails if runtime cannot execute it.
67
+
68
+ ### Runtime Scheduling
69
+
70
+ In `agent-team` and `subagent` modes, runtime decides concurrency and timing.
71
+ TEA does not impose its own parallel worker limit.
72
+
73
+ ---
74
+
75
+ ## Verbal Override Rules
76
+
77
+ During a run, explicit user phrasing can override config for that run only.
78
+
79
+ Supported normalized terms:
80
+
81
+ - `agent team` or `agent teams` -> `agent-team`
82
+ - `agentteam` -> `agent-team`
83
+ - `subagent`, `subagents`, `sub agent`, or `sub agents` -> `subagent`
84
+ - `sequential` -> `sequential`
85
+ - `auto` -> `auto`
86
+
87
+ Resolution precedence:
88
+
89
+ 1. Explicit run-level request (if present)
90
+ 2. `tea_execution_mode` in config
91
+ 3. Runtime fallback (when probing is enabled)
92
+
93
+ ---
94
+
95
+ ## Workflow Coverage Map
96
+
97
+ ### `automate`
98
+
99
+ - Worker split: API + E2E/backend test generation workers
100
+ - Aggregation: merges generated tests, fixtures, and summary stats
101
+ - Mode effect: changes orchestration style only, not output contract
102
+
103
+ ### `atdd`
104
+
105
+ - Worker split: failing API + failing E2E test generation workers
106
+ - Aggregation: validates red-phase output and merges artifacts
107
+ - Mode effect: changes orchestration style only, not red-phase requirements
108
+
109
+ ### `test-review`
110
+
111
+ - Worker split: quality-dimension evaluations (determinism, isolation,
112
+ maintainability, performance)
113
+ - Aggregation: computes combined quality score/report
114
+ - Mode effect: changes orchestration style only, not scoring schema
115
+
116
+ ### `nfr-assess`
117
+
118
+ - Worker split: security, performance, reliability, scalability assessments
119
+ - Aggregation: computes overall risk, compliance summary, priority actions
120
+ - Mode effect: changes orchestration style only, not report schema
121
+
122
+ ### `framework`
123
+
124
+ - Worker split: scaffold work units (structure/config, fixtures, samples)
125
+ - Aggregation: consolidates generated framework setup outputs
126
+ - Mode effect: changes orchestration style only
127
+
128
+ ### `ci`
129
+
130
+ - Worker split: orchestration-capable mode resolution for pipeline generation
131
+ - Aggregation: deterministic single pipeline artifact
132
+ - Mode effect: mostly impacts orchestration policy; final pipeline contract is
133
+ unchanged
134
+
135
+ ### `test-design`
136
+
137
+ - Worker split: orchestration-capable mode resolution for output generation
138
+ - Aggregation: deterministic design artifact output
139
+ - Mode effect: orchestration policy only; output schema unchanged
140
+
141
+ ### `trace`
142
+
143
+ - Worker split: phase/work-unit separation with dependency ordering
144
+ - Aggregation: merges gap analysis + coverage/gate data
145
+ - Mode effect: orchestration policy only; final decision/report contract
146
+ unchanged
147
+
148
+ ---
149
+
150
+ ## Design Guarantees
151
+
152
+ TEA maintains these guarantees across all modes:
153
+
154
+ - Same output schema for a given workflow
155
+ - Same validation and aggregation rules
156
+ - Same deterministic fallback semantics
157
+ - Same failure behavior for missing/invalid worker outputs
158
+
159
+ Mode selection changes orchestration behavior, not artifact contracts.
160
+
161
+ ---
162
+
163
+ ## Practical Guidance
164
+
165
+ Recommended defaults:
166
+
167
+ ```yaml
168
+ tea_execution_mode: 'auto'
169
+ tea_capability_probe: true
170
+ ```
171
+
172
+ Use `sequential` when you need strict single-threaded execution or debugging
173
+ clarity.
174
+
175
+ Use explicit `agent-team` or `subagent` only when you intentionally want that
176
+ mode and understand runtime support in your environment.
177
+
178
+ ---
179
+
180
+ ## Troubleshooting Signals
181
+
182
+ Common causes of orchestration confusion:
183
+
184
+ - Explicit run-level override text was provided and took precedence over config
185
+ - Runtime did not support requested mode and fallback changed final mode
186
+ - Probe disabled (`tea_capability_probe: false`) with unsupported explicit mode
187
+
188
+ Check resolved mode logs in the workflow execution report to confirm what mode
189
+ actually ran.