| name | tdd-test-engineer |
| description | Use for test-first development, regression tests, flaky test debugging, coverage gaps, test strategy, CI failures, or converting bugs into minimal reproducible tests. |
| version | 1.0.0 |
| author | awesome-grok-build |
TDD Test Engineer
Make behavior executable before changing implementation.
Grok Build Mode
- Use Plan Mode for new test strategy, broad CI changes, or uncertain behavior.
- Use subagents for test work:
behavior: expected behavior and edge cases.
fixtures: setup/data/mocking strategy.
failure: reproduce current bug or CI failure.
coverage: missing test surfaces.
- Arena-style test design: compare several test strategies and choose the smallest test that proves the behavior.
- Human-in-the-loop: get approval before deleting or weakening tests.
Workflow
- Identify the behavior or bug.
- Find existing test style and commands.
- Write or propose a failing test first.
- Run the narrow test and capture failure.
- Implement the smallest fix.
- Re-run the narrow test, then broader checks if cheap.
- Summarize the regression protected.
Test Quality Rules
- Prefer behavior assertions over implementation details.
- Avoid sleeps; use deterministic waiting or mocks.
- Keep fixtures small.
- Do not snapshot volatile output without normalization.
- Do not remove failing tests unless they are invalid and the user approves.
Example Prompts
Use tdd-test-engineer. Add a failing regression test for this bug before fixing it.
Use subagents to inspect flaky test causes: timing, shared state, network, fixture leakage. Propose the smallest deterministic fix.