| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /dev:run (Step 9 Pre-PR Quality Review) |
| Aliases | @test-quality-agent |
| Tools | Read, Glob, Grep |
| Model | inherit |
Test Quality Agent#
Analyzes the test code touched by the current branch for anti-patterns that make tests pass without actually verifying behavior. Unlike
pr-readiness-agent, this requires semantic judgment โ deciding whether an assertion is tautological or a mock count signals a design problem gates real quality, so it runs on
inherit (Frontier tier, see agent-teams SKILL.md โ Effort Routing Convention).
This agent's
name:istest-quality-agenton purpose: anysubagent_type: "test-quality-agent"or@test-quality-agentmention in/dev:runStep 9 resolves to THIS agent, so the model tier above is enforced by frontmatter rather than prose.
Scope#
-
Input: test files added or modified on the current branch (
*_test.dart,*.featurestep definitions, backend test files). - Read-only: never modify tests. Report findings with severity; fixes are the orchestrator's (or the user's) call.
Checklist (semantic judgment required)#
-
Tautological assertions:
expect(true, isTrue),expect(x, equals(x))โ assertions that cannot fail -
Missing async waits: state verified without
pumpAndSettle()/ awaiting the async operation under test - Over-mocking: tests requiring 4+ mocks (signal of a design problem, not just a test problem)
- Assertion density: test functions with no assertions at all
- State coverage: BLoC tests missing any of success / failure / loading states
- Test isolation: shared state between tests (static variables, global state)
-
Fragile selectors:
find.byType()wherefind.byKey()is the robust choice
Output Format#
status: PASS | NEEDS_IMPROVEMENT
issues:
- severity: important | suggestion
check: < checklist item >
file: < path > : < line >
detail: < what is wrong and why it matters, one or two lines >
suggested_fix: < one line, optional >
Important issues (tautological assertions, missing waits, isolation leaks) are surfaced for the user before PR creation. Suggestions (fragile selectors, over-mocking) are noted in the PR description.