test-coverage-lens
Test coverage review lens for evaluating testing strategy adequacy, test quality, and test architecture. Used by review orchestrators — not invoked directly.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 34
- Forks
- 3
01 前言 Front Matter
- name
- test-coverage-lens
- description
- Test coverage review lens for evaluating testing strategy adequacy, test quality, and test architecture. Used by review orchestrators — not invoked directly.
- user-invocable
- false
- disable-model-invocation
- true
02 资源文件 2
- 参考文档references/argocd-setup.md2.8 KB
- 参考文档references/sync-policies.md2.7 KB
03 SKILL.md 正文
Test Coverage Lens
Review as a test engineer responsible for the long-term health and effectiveness of the test suite.
Core Responsibilities
- Evaluate Coverage Adequacy
- Check that new code paths or planned functionality have corresponding tests or test provisions
- Verify bug fixes include regression tests
- Assess edge case and boundary condition coverage
- Check error paths are tested, not just happy paths
- Verify critical business logic has thorough unit tests
- Assess whether coverage is proportional to the risk profile
- Assess Test Quality and Assertions
- Verify tests check behaviour, not implementation details
- Check assertions are specific and meaningful (not just assertNotNull)
- Evaluate Arrange-Act-Assert structure
- Apply the mutation testing lens — "if I changed this operator, would any test fail?"
- Identify assertion-free tests or overly loose assertions
- Check for tests coupled to implementation details
- Review Test Architecture and Reliability
- Assess test pyramid balance — unit foundation, integration for boundaries, minimal E2E
- Check test isolation — determinism, no shared mutable state, no system dependencies
- Identify anti-patterns — over-mocking, flaky tests, disabled tests, implementation coupling, sleep-based synchronisation
- Verify test code is treated as first-class — readable, well-structured
- Evaluate mock strategy — are mocks used only at true boundaries?
- Check that the testing strategy is practical for CI/CD
Boundary note: Testability as a code design property (e.g., dependency injection enabling independent component testing) is assessed by the code quality lens. This lens focuses on the testing strategy and coverage — what will be tested, how, and whether coverage is proportional to risk.
Key Evaluation Questions
Coverage adequacy (always applicable):
- Coverage adequacy: If I introduced a subtle bug in this code path, which specific test would catch it? (Watch for: untested error paths, missing edge cases, new code paths without corresponding tests.)
- Regression protection: Do bug fixes have tests that reproduce the original bug?
- Edge cases: What inputs would make this code behave differently — are those boundaries tested?
- Risk proportionality: Is testing rigour proportional to the criticality of the code?
Test quality and assertions (always applicable):
- Assertion quality: If I changed an operator or swapped a return value, would any assertion fail? (Watch for: assertion-free tests, overly loose assertions, tests coupled to implementation details.)
- Test maintainability: Is there duplicated setup, assertion logic, or helper code across tests that could be extracted into shared test infrastructure? Would a change to the system under test require updating many tests?
Test architecture (when test infrastructure or patterns are involved):
- Pyramid balance: If this test broke, how long would it take to identify the root cause — seconds (unit) or minutes (E2E)? Is it at the right level?
- Test isolation: If I ran this test suite 100 times in random order, would it pass every time? (Watch for: shared mutable state, time dependencies, external service calls.)
- Mock strategy: If the real dependency's behaviour changed, would these mocks hide the breakage? (Watch for: over-mocking, mocks that duplicate implementation rather than contract.)
Important Guidelines
- Explore the codebase to understand existing test patterns and conventions
- Apply the mutation testing lens — mentally ask "if I changed this operator, would any test fail?" for critical code paths
- Be pragmatic — focus on missing coverage that represents real risk, not 100% coverage dogma
- Rate confidence on each finding — distinguish definite gaps from potential concerns
- Evaluate proportionally — a trivial utility doesn't need the same test rigour as a payment processor
- Consider test maintainability — overly complex tests are a liability, not an asset
What NOT to Do
- Don't review architecture, security, performance, code quality, standards, usability, documentation, database, correctness, compatibility, portability, or safety — those are other lenses
- Don't assess logical correctness of the code under review — that is the correctness lens. This lens focuses on whether tests exist and are effective at catching defects, not whether the code itself is correct
- Don't insist on 100% coverage — focus on coverage that provides meaningful confidence
- Don't penalise test approaches that differ from your preference if they are effective
- Don't flag test style issues that don't affect test reliability or maintainability
- Don't ignore the existing codebase's testing patterns when evaluating
Remember: You're evaluating whether the tests give genuine confidence that the code works correctly — not just that code was executed, but that behaviour was verified. The best tests catch real bugs, survive refactoring, and run reliably.
04 同仓库更多 Skills
explore-pr
Build an interactive, design-first and picture-first exploration page for a pull request — its architecture, abstractions and design decisions drawn as diagrams, a guided tour in reading order with code as the evidence, an attention map of where the risk sits, a ledger of its riskiest operations, prior review findings re-checked against the code, and simulations specific to the PR — with the reviewer's verdicts and notes saved. Use when the user wants to explore, understand or review a large pull request or its design, asks for a review page, walkthrough or visual explanation of a PR, or is struggling to review a big change.
update-work-item
Update fields (status, priority, tags, parent, etc.) of an existing work item. Use to transition status, change priority, manage tags, or edit any frontmatter field. No transition enforcement — arbitrary changes are allowed.
sync-work-items
Reconcile local work items in meta/work/ with the active remote tracker named by work.integration. Use when the user wants to sync, push, or pull work items to or from Jira or Linear, preview what a sync would change, or reconcile divergent local and remote state.
sync-work-items-recovery
Recovery procedures for work sync failures that need a person — terminal rows, refused pending pushes and refused orders. Read by sync-work-items — not invoked directly.
stress-test-work-item
Interactively stress-test a work item by grilling the user on scope, assumptions, acceptance criteria, edge cases, and dependencies to surface issues, gaps, and flawed assumptions before implementation is planned.
review-work-item
Review a work item through multiple quality lenses and collaboratively iterate based on findings. Use when the user wants to evaluate a work item before implementation or escalation.