test-audit
Test audit
Optimize for confidence and useful feedback at justified cost. Preserve meaningful contracts. Treat suspicious test shapes as leads requiring investigation rather than deletion verdicts.
1. Set scope and authority
Use the user's existing instructions to determine scope and mode:
- Audit: Inspect, review, or recommend without editing.
- Cleanup: A request to clean up, prune, repair, or implement findings authorizes scoped test and test-support edits. Inspect first, then continue without asking for approval already given.
- Campaign: For all tests in a repository, monorepo, or subsystem, read references/campaign.md. Use its exhaustive inventory and batch sequence with the criteria below. Campaign defines completeness; audit versus cleanup still determines editing authority.
For a bare invocation without a task, default to audit. Review the complete requested scope. Distinguish out-of-scope, unreviewed, and reviewed-but-blocked work. Continue independent work when a consequential decision is unresolved; ask only about the affected boundary.
Keep product behavior, public APIs, dependencies, CI gates, and coverage thresholds outside test cleanup unless separately authorized. Propose product fixes and production simplifications separately. Follow existing authorization for commits and publication.
Complete when the mode, in-scope tests, exclusions, and editing boundary are identified.