agh-test-conventions
Installation
SKILL.md
AGH Test Conventions
40%+ of CodeRabbit review issues across all AGH PRs are test-shape violations. The CLAUDE.md rules are correct but agents keep ignoring them when adding "just one more case." This skill is the Go test-shape gate after consolidate-test-suites has justified the invariant, owning layer, and canonical suite.
Procedures
Step 0: Confirm Placement
- Use
consolidate-test-suitesbefore creating a new Go test file, moving coverage, or adding tests primarily for a task checklist or coverage target. - Record the invariant, owning layer, and canonical suite before applying Go-specific shape rules.
- If no invariant or owning layer exists, stop. Do not add a Go test just to raise coverage.
Step 1: Identify the Edit Surface
- Determine whether the edit creates a new test file, adds cases to an existing test, or refactors an existing test.
- Read the existing file (if any) so the new cases match the established subtest pattern.
- Read
references/test-shape-rules.mdfor the canonical rule list.
Step 2: Apply Subtest Discipline