tddlisted
Install: claude install-skill mblauberg/provenant
# Test-driven development
```text
NO NEW OR CHANGED OBSERVABLE BEHAVIOUR WITHOUT A RIGHT-REASON FAILURE FIRST
```
Never delete or overwrite unknown, pre-existing or user-authored work to create
a red state. If this run wrote production code before the test, preserve its
patch, remove only the exact run-owned hunks when authorised, witness the
right-reason failure, then reapply and minimise them. Existing code gets a
regression or characterisation seam before repair. Deliberate throwaway
prototypes, generated code and configuration may use an explicitly recorded
exception; deadline pressure is not one.
## Red -> green -> refactor
1. **Red:** write one test for one observable behaviour through the public
interface. Name it like a specification. Run it and confirm it fails because
the behaviour is missing, not from setup, import or typo. A test that passes
immediately needs sharpening.
2. **Green:** write only the simplest production change that passes. Avoid
speculative options and unrelated cleanup. Run the focused test each cycle,
affected checks at tranche boundaries, and the full required suite at the
enclosing verification gate; output must be clean.
3. **Refactor:** only while green, remove duplication, improve names and deepen
modules. Rerun tests after each structural step.
Work vertically: test -> implementation -> repeat. Start with one tracer bullet
through the full path, then add behaviours from what each cycle reveals. Never
write an imagi