test-discipline
Installation
SKILL.md
Context
Use this skill whenever a change affects an API, public interface, workflow contract, generated artifact, or user-observable behavior. A passing status-only test is not evidence that the intended artifact or contract is correct.
Patterns
- Update tests in the same change as an API, signature, export, or public-interface change.
- Make assertions name and inspect the offending artifact, output, or configuration field—not just an exit code or broad success status.
- Mutation-test critical gates by changing the real source or emitted artifact and proving the assertion turns red.
- Exercise every caller path for a changed parser, normalizer, or helper; isolated unit coverage can miss the integration path that invokes it differently.
- Reproduce working-tree-only failures locally when the contract depends on index, filesystem, line-ending, or generated-output state.
- Keep expected inventory arrays synchronized with the files they enumerate.