Subprocess Implementation Status
Subprocess Pattern Implementation Status
Section titled βSubprocess Pattern Implementation StatusβDate: 2026-01-27 Status: Phase 5 - Subprocess Patterns
β Completed Implementations
Section titled ββ Completed Implementationsβ1. automate Workflow - COMPLETE β
Section titled β1. automate Workflow - COMPLETE β βPattern: Parallel API + E2E test generation
Files Created:
src/workflows/testarch/automate/steps-c/step-03a-subprocess-api.mdsrc/workflows/testarch/automate/steps-c/step-03b-subprocess-e2e.mdsrc/workflows/testarch/automate/steps-c/step-03c-aggregate.md- Updated:
src/workflows/testarch/automate/steps-c/step-03-generate-tests.md
Subprocesses:
- Subprocess A: API test generation β
/tmp/tea-automate-api-tests-{{timestamp}}.json - Subprocess B: E2E test generation β
/tmp/tea-automate-e2e-tests-{{timestamp}}.json - Aggregation: Reads both outputs, writes tests to disk, generates fixtures
Performance: ~50% faster (parallel vs sequential)
2. atdd Workflow - COMPLETE β
Section titled β2. atdd Workflow - COMPLETE β βPattern: Parallel FAILING API + E2E test generation (TDD RED PHASE)
Files Created:
src/workflows/testarch/atdd/steps-c/step-04a-subprocess-api-failing.mdsrc/workflows/testarch/atdd/steps-c/step-04b-subprocess-e2e-failing.mdsrc/workflows/testarch/atdd/steps-c/step-04c-aggregate.md- Updated:
src/workflows/testarch/atdd/steps-c/step-04-generate-tests.md
Subprocesses:
- Subprocess A: API failing tests (with test.skip()) β
/tmp/tea-atdd-api-tests-{{timestamp}}.json - Subprocess B: E2E failing tests (with test.skip()) β
/tmp/tea-atdd-e2e-tests-{{timestamp}}.json - Aggregation: TDD red phase validation, writes tests, generates ATDD checklist
Performance: ~50% faster (parallel vs sequential)
Special Features: TDD compliance validation (all tests have test.skip())
π¨ Implementation Guide for Remaining Workflows
Section titled βπ¨ Implementation Guide for Remaining Workflowsβ3. test-review Workflow - TO IMPLEMENT
Section titled β3. test-review Workflow - TO IMPLEMENTβPattern: 5 parallel quality dimension checks
Subprocess Architecture:
test-review/βββ step-XX-orchestrate.md (updated to launch subprocesses)βββ step-XXa-subprocess-determinism.mdβββ step-XXb-subprocess-isolation.mdβββ step-XXc-subprocess-maintainability.mdβββ step-XXd-subprocess-coverage.mdβββ step-XXe-subprocess-performance.mdβββ step-XXz-aggregate-scores.mdSubprocess Outputs: Each subprocess outputs JSON with:
{ "dimension": "determinism", "score": 85, "max_score": 100, "violations": [ { "file": "tests/api/user.spec.ts", "line": 42, "severity": "HIGH", "description": "Test uses Math.random() - non-deterministic", "suggestion": "Use faker with fixed seed" } ], "passed_checks": 12, "failed_checks": 3}Aggregation Logic:
- Read all 5 dimension outputs
- Calculate weighted score (0-100)
- Aggregate violations by severity
- Generate review report with actionable suggestions
Performance: ~60% faster (5 checks in parallel vs sequential)
Implementation Steps:
- Create 5 subprocess step files (one per quality dimension)
- Each subprocess analyzes test files for its specific dimension
- Create aggregation step to calculate overall score
- Update orchestration step to launch all 5 subprocesses in parallel
4. nfr-assess Workflow - TO IMPLEMENT
Section titled β4. nfr-assess Workflow - TO IMPLEMENTβPattern: 4 parallel NFR domain assessments
Subprocess Architecture:
nfr-assess/βββ step-XX-orchestrate.md (updated to launch subprocesses)βββ step-XXa-subprocess-security.mdβββ step-XXb-subprocess-performance.mdβββ step-XXc-subprocess-reliability.mdβββ step-XXd-subprocess-scalability.mdβββ step-XXz-aggregate-report.mdSubprocess Outputs: Each subprocess outputs JSON with:
{ "domain": "security", "risk_level": "MEDIUM", "findings": [ { "category": "Authentication", "status": "PASS", "description": "OAuth2 with JWT tokens implemented", "recommendations": [] }, { "category": "Data Encryption", "status": "CONCERN", "description": "Database encryption at rest not enabled", "recommendations": ["Enable database encryption", "Use AWS KMS"] } ], "compliance": { "SOC2": "PARTIAL", "GDPR": "PASS", "HIPAA": "N/A" }, "priority_actions": ["Enable database encryption within 30 days"]}Aggregation Logic:
- Read all 4 NFR domain outputs
- Calculate overall risk (max of all domain risks)
- Aggregate compliance status
- Identify cross-domain risks
- Generate executive summary with priority actions
Performance: ~67% faster (4 domains in parallel vs sequential)
Implementation Steps:
- Create 4 subprocess step files (one per NFR domain)
- Each subprocess assesses system for its specific domain
- Create aggregation step to synthesize findings
- Update orchestration step to launch all 4 subprocesses in parallel
5. trace Workflow - TO IMPLEMENT
Section titled β5. trace Workflow - TO IMPLEMENTβPattern: Two-phase workflow separation (not parallel, but clean separation)
Subprocess Architecture:
trace/βββ step-XX-phase-1-coverage-matrix.md (generates matrix β temp file)βββ step-XX-phase-2-gate-decision.md (reads matrix β applies decision tree)Phase 1 Output:
{ "requirements": [ { "id": "REQ-001", "description": "User can login", "priority": "P0", "tests": ["tests/auth/login.spec.ts::should login"], "coverage": "FULL" }, { "id": "REQ-002", "description": "User can reset password", "priority": "P1", "tests": [], "coverage": "NONE" } ], "total_requirements": 50, "covered_requirements": 42, "coverage_percentage": 84}Phase 2 Logic:
- Read Phase 1 coverage matrix
- Apply decision tree:
- P0 coverage == 100% AND overall >= 90% β PASS
- P0 coverage == 100% AND overall >= 75% β CONCERNS
- P0 coverage < 100% β FAIL
- Otherwise β WAIVED (manual review)
- Generate gate report with recommendations
Performance: Not about parallelization, but clean phase separation
Implementation Steps:
- Split current trace workflow into 2 phases
- Phase 1: Generate coverage matrix to temp file
- Phase 2: Read matrix, apply gate logic, generate report
- Subprocess-like isolation without actual parallel execution
π Implementation Summary
Section titled βπ Implementation Summaryβ| Workflow | Status | Subprocesses | Performance Gain | Complexity |
|---|---|---|---|---|
| automate | β Complete | 2 (API, E2E) | ~50% | Medium |
| atdd | β Complete | 2 (API RED, E2E RED) | ~50% | Medium |
| test-review | π¨ To Implement | 5 (quality dimensions) | ~60% | High |
| nfr-assess | π¨ To Implement | 4 (NFR domains) | ~67% | High |
| trace | π¨ To Implement | 2 phases (sequential) | N/A | Medium |
π― Implementation Priority
Section titled βπ― Implementation PriorityβPriority 1 (Highest Impact - Already Done):
- β automate - Most frequently used
- β atdd - Frequently used, TDD workflow
Priority 2 (Next to Implement):
- test-review - Complex validation, clear parallelization benefit
- nfr-assess - Independent domains, high parallelization benefit
Priority 3 (Good Separation):
- trace - Two-phase separation, clean design
π Next Steps
Section titled βπ Next StepsβFor test-review Implementation:
Section titled βFor test-review Implementation:β- Identify which step currently does quality checks
- Create 5 subprocess step files (determinism, isolation, maintainability, coverage, performance)
- Each subprocess analyzes test files for specific quality dimension
- Create aggregation step to calculate 0-100 score
- Update orchestration step to launch all 5 in parallel
For nfr-assess Implementation:
Section titled βFor nfr-assess Implementation:β- Identify which step currently does NFR assessment
- Create 4 subprocess step files (security, performance, reliability, scalability)
- Each subprocess assesses system for specific NFR domain
- Create aggregation step to synthesize findings
- Update orchestration step to launch all 4 in parallel
For trace Implementation:
Section titled βFor trace Implementation:β- Identify current trace workflow structure
- Split into Phase 1 (coverage matrix) and Phase 2 (gate decision)
- Phase 1 outputs to temp file
- Phase 2 reads temp file and applies decision logic
- Update workflow.yaml to point to new phase structure
π Testing Checklist
Section titled βπ Testing ChecklistβAfter implementing each workflow:
- Create subprocess step files
- Update orchestration step
- Test with real project data
- Verify subprocess outputs are valid JSON
- Verify aggregation logic works correctly
- Measure performance improvement
- Run BMad Builder validation (should score 100%)
- Document in subprocess-architecture.md
π References
Section titled βπ Referencesβ- Subprocess Architecture:
docs/explanation/subprocess-architecture.md - Step-File Architecture:
docs/explanation/step-file-architecture.md - Completed Examples:
src/workflows/testarch/automate/steps-c/step-03*src/workflows/testarch/atdd/steps-c/step-04*
Status: 2 of 5 workflows complete, 3 remaining (implementation guide provided) Next Action: Implement test-review, nfr-assess, trace following established patterns Expected Total Performance Gain: 40-67% across all applicable workflows