Eng test conventions

From compozy/compozy · View interactive version

Eng test conventions is an AI agent skill from the GitHub repository compozy/compozy. Go test-shape discipline for Compozy. Use when writing or editing *_test.go under cmd or internal after test placement is justified. Do not use for non-Go tests, fixture-only changes, or as a replacement for eng-consolidate-test-suites.

How to use this skill

Skill file

Compozy Test Conventions

Name the invariant, owning layer, and existing suite before changing coverage; reuse that working note. Use eng-consolidate-test-suites when placement is unclear, including a proposed new file with no obvious owner. No test is needed merely to raise coverage.

Read the nearby canonical suite and relevant sections of references/test-shape-rules.md for subtests, parallelism, errors/assertions, interfaces, tags, integration behavior, mocks, helpers, and race/cgo.

For changed Go test files, run the read-only heuristic checker:

python3 .agents/skills/eng/eng-test-conventions/scripts/check-test-conventions.py <file_path>

Fix real findings; document a demonstrated false positive without weakening the convention. Run the affected package's race-enabled tests with CGO_ENABLED=1 and the owning lint lane, reusing current evidence when those inputs are unchanged. Repository-wide gates run only in CI, per root CLAUDE.md; a local test change does not require opening a PR.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.