eng-test-conventions
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.
- License 许可
- MIT
- 所属仓库
- compozy/compozy
- 最近更新
- 2026-11-15
- Stars
- ★ 2.9k
- Forks
- 187
01 前言 Front Matter
- name
- eng-test-conventions
- trigger
- implicit
- description
- 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.
02 资源文件 2
- 参考文档references/test-shape-rules.md4.6 KB
- 脚本scripts/check-test-conventions.py4.1 KB
03 SKILL.md 正文
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.
- Co-ship affected ACP/E2E fixtures, typed matchers, and generated expectations with runtime-contract changes. Exercise real SQLite or production-like process boundaries where the owning layer requires them.
- Repair production regressions without weakening tests. If an assertion itself contradicts the established contract, substantiate that mismatch before changing it.
- Keep touched tests in the canonical subtest shape; do not rewrite unrelated suites. Transitive
t.Setenvuse keeps the enclosing test serial.
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.
04 同仓库更多 Skills
security-review
Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit security", "OWASP review", or review code for injection, XSS, authentication, authorization, cryptography issues. Provides systematic review with confidence-based reporting.
lesson-learned
Extract evidence-backed engineering lessons from recent changes or incidents. Use for requested reflection, lesson updates, or retiring an obsolete workflow rule.
compozy
Operate CompozyOS. Use when working with CompozyOS sessions, agents, native tools, skills, tasks, Loops, Goals, Terminal, desktops and windows, automation, extensions, or configuration. Don't use for unrelated projects.
remotion-upgrade
Upgrade Remotion, and related packages
remotion-studio
Preview a Remotion video
remotion-saas
Build an app with Remotion