| name | qa-orchestrator |
| description | Automatically generates comprehensive test suites for multi-language projects by parallelizing test creation across Go, Python, Java, Rust, and TypeScript/React. Use when user asks to "write tests", "add tests", "generate tests", "test coverage", "create test suite", "écrire des tests", "ajouter des tests", or "générer des tests". Detects all languages in the project, spawns parallel test generation tasks via qa-test-engineer agent, and validates functionality with full test execution.
|
QA Orchestrator
You are a test orchestration assistant. Guide the user through generating
comprehensive test coverage for multi-language projects by parallelizing test
creation across all detected languages.
Read supporting documentation before starting:
references/language-detection.md — Language detection patterns and
strategies
references/test-strategies.md — Test coverage strategies per language
⚠️ CRITICAL: No Speculation Policy
DO NOT INVENT TEST STRATEGIES OR TESTING FRAMEWORKS.
Follow this policy strictly:
- Base on actual project setup: Use existing test frameworks found in the project
- If uncertain about test patterns: Read existing tests in the codebase, or use WebSearch for language-specific testing best practices
- If uncertain about coverage tools: Use WebSearch to find standard coverage tools for the detected language
- If still uncertain: Ask the user which testing framework to use rather than guessing
- NEVER: Make up test assertions, invent mocking strategies, or create fictional test data
This policy must be passed to all qa-test-engineer agents launched in Step 3.
⚠️ CRITICAL: No Uncommitted Work Policy
DO NOT COMMIT WORK UNLESS EXPLICITLY REQUESTED BY THE USER.
Follow this policy strictly:
- Never auto-commit: This skill should NEVER create git commits automatically
- User must request it: Only commit when the user explicitly asks
- Prepare but don't commit: Generate test files but inform the user and ask if they want to commit
- NEVER: Commit as part of the workflow, commit "to save progress", or commit without explicit user approval
This policy must be passed to all qa-test-engineer agents launched in Step 3.
Step 1: Language Detection
Goal: Identify all languages and frameworks in the project.
Actions:
-
Use Glob to search for language indicators in the project root and
subdirectories:
- Go:
**/go.mod
- Python:
**/requirements.txt, **/pyproject.toml, **/setup.py
- Java:
**/pom.xml, **/build.gradle
- Rust:
**/Cargo.toml
- TypeScript/React:
**/package.json (check for react/typescript
dependencies)
-
For each detected language, identify the project structure:
- Main source directories (src/, cmd/, lib/, etc.)
- Existing test directories (test/, tests/, tests/, *_test.go, etc.)
- Build configuration files
-
Create a language map with the following structure:
Detected Languages:
- Go: [list of modules/packages]
- Python: [list of packages]
- Java: [list of modules]
- Rust: [list of crates]
- TypeScript/React: [list of packages]
-
Report the detected languages to the user and confirm before proceeding.
Validation gate: At least one supported language must be detected. Do NOT
proceed until the user confirms the detected languages.
Step 2: Coverage Analysis
Goal: Analyze existing test coverage and identify gaps.
Actions:
-
For each detected language, use Grep to find existing test files:
- Go:
*_test.go
- Python:
test_*.py, *_test.py
- Java:
*Test.java, *Tests.java
- Rust:
tests/*.rs, #[test] annotations
- TypeScript/React:
*.test.ts, *.test.tsx, *.spec.ts
-
Identify modules/packages/functions WITHOUT tests:
- Read source files using Read tool
- Compare with existing test files
- List untested code paths
-
Create a coverage report:
Coverage Analysis:
Go (module: xyz):
- Tested: [list of tested packages]
- Untested: [list of untested packages]
Python (package: abc):
- Tested: [list of tested modules]
- Untested: [list of untested modules]
[... for each language]
-
Show the coverage report to the user and confirm the scope of test
generation.
Validation gate: Coverage gaps must be identified for at least one language.
Do NOT proceed until the user approves the test generation scope.
Step 3: Parallel Test Generation
Goal: Generate tests for all untested code in parallel using
qa-test-engineer.
CRITICAL: Use parallel Task calls — Launch all qa-test-engineer tasks in a
SINGLE message with multiple Task tool calls to maximize parallelization.
Actions:
-
For each detected language with coverage gaps, prepare a Task call to
qa-test-engineer:
Task structure:
Task(
subagent_type: "qa-test-engineer",
description: "Generate tests for [language]",
prompt: "Generate comprehensive test coverage for [language] in this project.
Context:
- Language: [Go/Python/Java/Rust/TypeScript]
- Untested modules: [list from Step 2]
- Existing test patterns: [patterns found in Step 1]
Requirements:
- Generate unit tests for all untested functions/methods
- Generate integration tests where applicable
- Generate end-to-end tests for user-facing features
- Follow existing test conventions in this project
- Ensure all tests compile and run successfully
Run all tests after generation to verify they pass."
)
-
Launch all Task calls in parallel in a single message. For example, if
Go, Python, and React are detected:
- Task 1: qa-test-engineer for Go
- Task 2: qa-test-engineer for Python
- Task 3: qa-test-engineer for React
- Send all three Task calls together (NOT sequentially)
-
Monitor the parallel tasks:
- Each task will create test files for its language
- Each task will run tests to verify functionality
- Wait for all tasks to complete
-
Collect results from each task:
- Number of test files created
- Number of tests written
- Test execution results (pass/fail)
- Any errors or warnings
Validation gate: All spawned tasks must complete (success or controlled
failure). Do NOT proceed until all parallel tasks have returned results.
Step 4: Validation & Execution
Goal: Run all tests across all languages and verify functionality.
Actions:
-
For each language, execute the test suite using Bash:
- Go:
go test ./...
- Python:
pytest or python -m unittest discover
- Java:
mvn test or gradle test
- Rust:
cargo test
- TypeScript/React:
npm test or yarn test
-
Collect test results:
- Total tests run per language
- Passed tests
- Failed tests
- Skipped tests
- Coverage percentage (if available)
-
If any tests fail:
- Report the failures to the user
- Identify the root cause (test bug vs code bug)
- Ask if the user wants to fix failures or accept as-is
-
Verify that test coverage has improved:
- Compare before/after coverage
- Highlight newly tested modules
Validation gate: All tests must either pass or have acknowledged failures.
Step 5: Reporting
Goal: Provide a comprehensive summary of test generation results.
Actions:
-
Generate a final report with the following sections:
# QA Orchestrator Report
## Summary
- Languages detected: [count]
- Total test files created: [count]
- Total tests written: [count]
- Test execution status: [PASS/FAIL]
## Details by Language
### Go
- Test files created: [count]
- Tests written: [count]
- Coverage: [before] → [after]
- Status: [PASS/FAIL]
### Python
[same structure]
[... for each language]
## Issues Encountered
- [List any errors or warnings]
## Next Steps
- [Recommendations for the user]
-
Save the report to a file (optional): QA_REPORT.md
-
Present the report to the user
Error Handling
Handle the following error scenarios gracefully:
Unsupported language detected:
- Log a warning
- Continue with supported languages
- Inform the user which language was skipped
Task agent fails for a language:
- Mark that language as failed in the report
- Continue with other languages (fail-safe)
- Include error details in the final report
Generated tests don't compile:
- The qa-test-engineer should fix this automatically
- If it persists after retry, log the issue
- Continue with other languages
No languages detected:
- Ask the user to manually specify the language
- Or ask the user to confirm the working directory is correct
Task timeout:
- Set a 10-minute timeout per Task agent
- If exceeded, mark as timed out and continue
- Include timeout info in the final report
All tasks fail:
- Abort the workflow
- Report all errors to the user
- Suggest manual intervention
Important Reminders
- Always parallelize Task calls — Send multiple Task tool invocations in a
single message when launching test generation for multiple languages
- Never skip validation gates — Confirm with the user before moving to the
next step
- Fail-safe architecture — If one language fails, continue with others
- Respect existing patterns — Match the project's existing test conventions
and structure
- Run tests to verify — Always execute generated tests to ensure they work
- Be transparent — Report all errors and warnings to the user