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.
- package/.github/ISSUE_TEMPLATE/feature_request.md +1 -1
- package/CHANGELOG.md +22 -16
- package/README.md +2 -2
- package/docs/explanation/step-file-architecture.md +26 -26
- package/docs/explanation/{subprocess-architecture.md → subagent-architecture.md} +61 -59
- package/docs/explanation/{subprocess-implementation-status.md → subagent-implementation-status.md} +48 -48
- package/docs/reference/configuration.md +121 -2
- package/docs/reference/troubleshooting.md +24 -9
- package/package.json +1 -1
- package/release_notes.md +8 -7
- package/src/module.yaml +54 -1
- package/src/workflows/testarch/README.md +1 -1
- package/src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +159 -57
- package/src/workflows/testarch/atdd/steps-c/{step-04a-subprocess-api-failing.md → step-04a-subagent-api-failing.md} +15 -15
- package/src/workflows/testarch/atdd/steps-c/{step-04b-subprocess-e2e-failing.md → step-04b-subagent-e2e-failing.md} +14 -14
- package/src/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +31 -15
- package/src/workflows/testarch/atdd/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/automate/steps-c/step-03-generate-tests.md +202 -103
- package/src/workflows/testarch/automate/steps-c/{step-03a-subprocess-api.md → step-03a-subagent-api.md} +16 -16
- package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-backend.md → step-03b-subagent-backend.md} +21 -21
- package/src/workflows/testarch/automate/steps-c/{step-03b-subprocess-e2e.md → step-03b-subagent-e2e.md} +15 -15
- package/src/workflows/testarch/automate/steps-c/step-03c-aggregate.md +38 -22
- package/src/workflows/testarch/automate/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +78 -1
- package/src/workflows/testarch/ci/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +94 -3
- package/src/workflows/testarch/framework/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +150 -36
- package/src/workflows/testarch/nfr-assess/steps-c/{step-04a-subprocess-security.md → step-04a-subagent-security.md} +9 -9
- package/src/workflows/testarch/nfr-assess/steps-c/{step-04b-subprocess-performance.md → step-04b-subagent-performance.md} +8 -8
- package/src/workflows/testarch/nfr-assess/steps-c/{step-04c-subprocess-reliability.md → step-04c-subagent-reliability.md} +8 -8
- package/src/workflows/testarch/nfr-assess/steps-c/{step-04d-subprocess-scalability.md → step-04d-subagent-scalability.md} +8 -8
- package/src/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +27 -10
- package/src/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/teach-me-testing/data/tea-resources-index.yaml +3 -3
- package/src/workflows/testarch/test-design/steps-c/step-05-generate-output.md +72 -1
- package/src/workflows/testarch/test-design/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +147 -46
- package/src/workflows/testarch/test-review/steps-c/{step-03a-subprocess-determinism.md → step-03a-subagent-determinism.md} +12 -12
- package/src/workflows/testarch/test-review/steps-c/{step-03b-subprocess-isolation.md → step-03b-subagent-isolation.md} +10 -10
- package/src/workflows/testarch/test-review/steps-c/{step-03c-subprocess-maintainability.md → step-03c-subagent-maintainability.md} +9 -9
- package/src/workflows/testarch/test-review/steps-c/{step-03e-subprocess-performance.md → step-03e-subagent-performance.md} +9 -9
- package/src/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +10 -10
- package/src/workflows/testarch/test-review/validation-report-20260127-102401.md +2 -2
- package/src/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +92 -1
- package/src/workflows/testarch/trace/validation-report-20260127-102401.md +2 -2
- 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
|
-
- [ ]
|
|
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
|
-
-
|
|
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
|
-
- **
|
|
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
|
-
- **
|
|
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
|
-
- **
|
|
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
|
-
- **
|
|
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
|
-
####
|
|
124
|
+
#### Subagent Architecture (Phase 5)
|
|
119
125
|
|
|
120
|
-
- **19
|
|
121
|
-
- `automate`: 3
|
|
122
|
-
- `atdd`: 3
|
|
123
|
-
- `test-review`: 6
|
|
124
|
-
- `nfr-assess`: 5
|
|
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
|
|
127
|
-
- **Aggregation Step**: Consolidates
|
|
128
|
-
- **Documentation**: Complete
|
|
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
|
-
- **
|
|
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
|
|
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. **
|
|
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,
|
|
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
|
-
-
|
|
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.
|
|
156
|
+
### 5. Subagent Support
|
|
157
157
|
|
|
158
|
-
**Independent steps can run in parallel
|
|
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:
|
|
164
|
+
Step 3: Subagent A (API tests) + Subagent B (E2E tests) - PARALLEL
|
|
165
165
|
Step 4: Sequential (aggregate)
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
See [
|
|
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
|
-
├──
|
|
197
|
-
└──
|
|
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
|
-
├──
|
|
215
|
-
├──
|
|
216
|
-
├──
|
|
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
|
-
-
|
|
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 (
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
- ✅
|
|
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
|
|
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
|
|
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
|
|
542
|
-
├──
|
|
543
|
-
└──
|
|
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**:
|
|
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
|
|
569
|
+
**Issue**: Workflow too slow despite subagents
|
|
570
570
|
|
|
571
571
|
- **Diagnosis**: Not enough parallelization
|
|
572
|
-
- **Fix**: Identify more independent steps for
|
|
572
|
+
- **Fix**: Identify more independent steps for subagent pattern
|
|
573
573
|
|
|
574
574
|
---
|
|
575
575
|
|
|
576
576
|
## References
|
|
577
577
|
|
|
578
|
-
- **
|
|
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
|
|
598
|
+
**Next Steps**: Implement subagent patterns (see subagent-architecture.md)
|
|
599
599
|
````
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Subagent Architecture
|
|
3
3
|
description: Parallel execution pattern for TEA workflows
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
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 **
|
|
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
|
|
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
|
|
34
|
-
│ ├──
|
|
35
|
-
│ ├──
|
|
36
|
-
│ ├──
|
|
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
|
|
47
|
-
2. **Isolation**: Each
|
|
48
|
-
3. **Output Format**: All
|
|
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
|
|
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
|
-
│ ├──
|
|
68
|
-
│ └──
|
|
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
|
-
####
|
|
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
|
-
####
|
|
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
|
|
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
|
-
│ ├──
|
|
178
|
-
│ └──
|
|
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
|
-
####
|
|
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
|
-
│ ├──
|
|
206
|
-
│ ├──
|
|
207
|
-
│ ├──
|
|
208
|
-
│ ├──
|
|
209
|
-
│ └──
|
|
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
|
-
####
|
|
216
|
+
#### Subagent Output Format
|
|
217
217
|
|
|
218
|
-
Each quality dimension
|
|
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
|
-
│ ├──
|
|
285
|
-
│ ├──
|
|
286
|
-
│ ├──
|
|
287
|
-
│ └──
|
|
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
|
-
####
|
|
294
|
+
#### Subagent Output Format
|
|
295
295
|
|
|
296
|
-
Each NFR domain
|
|
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
|
|
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}-{
|
|
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
|
|
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
|
|
479
|
-
2. If any
|
|
480
|
-
3. Decide whether to continue (partial success) or fail (critical
|
|
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
|
-
**
|
|
484
|
+
**Subagent Isolation**:
|
|
485
485
|
|
|
486
|
-
- Each
|
|
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
|
-
-
|
|
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
|
|
496
|
+
- Implement proper synchronization (wait for all subagents to complete)
|
|
495
497
|
|
|
496
498
|
---
|
|
497
499
|
|
|
498
|
-
## Testing
|
|
500
|
+
## Testing Subagent Workflows
|
|
499
501
|
|
|
500
502
|
### Test Checklist
|
|
501
503
|
|
|
502
|
-
For each workflow with
|
|
504
|
+
For each workflow with subagents:
|
|
503
505
|
|
|
504
|
-
- [ ] **Unit Test**: Test each
|
|
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
|
|
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
|
|
519
|
+
- Measure subagent overhead
|
|
518
520
|
- Verify memory usage acceptable
|
|
519
521
|
|
|
520
522
|
- [ ] **Error Handling Test**: Test failure scenarios
|
|
521
|
-
- One
|
|
522
|
-
- Multiple
|
|
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
|
|
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 "
|
|
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. **
|
|
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
|
|
564
|
-
4. **Caching**: Cache
|
|
565
|
-
5. **Distributed Execution**: Run
|
|
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
|
|
572
|
-
-
|
|
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
|
|
580
|
+
**Next Steps**: Implement subagent patterns in workflow step files, test, document
|