testinglisted
Install: claude install-skill yacb2/aidex
# Testing
The write-time core: what to answer before a test is written, where it goes, what it
looks like and what to run. It is the single owner of the four questions and of the
one-owner rule; `coverage` owns the doctrine behind them (layers, selection, fixtures,
the E2E environment, the profile) and `bugfix` the RED→GREEN procedure.
## Before adding a test
Answer four questions; a missing answer means the test is not added yet.
1. What observable behaviour or contract does it protect?
2. What credible regression turns it red?
3. Why does no existing test already catch that? One contract has one owner test, at the
layer the layer model assigns; extend that test or its table before adding a sibling.
4. Does it need an export, flag or hook no production caller needs? Then test at the real
boundary instead.
A test that breaks under a behaviour-preserving refactor asserts implementation. A
change that opened no new way to fail needs no new test — say so instead of writing one.
## Layer
The lowest layer that can observe the failure, by the rubric in
`${CLAUDE_PLUGIN_ROOT}/skills/coverage/references/01-layer-model.md`: test the decision,
not the pixels — except when the browser is what decides. State the layer and a
one-sentence reason with the test.
## Shape
Read the project's `.context/profiles/testing.md`, take `testing_packs`, and open each
pack's `~/.claude/skills/<pack>/SKILL.md`: its "Question -> file" table names
the test-shapes reference for the layer at h