test-driven-developmentlisted
Install: claude install-skill techmefr/forge-ops
# TDD in the forge-ops sequence
TDD generated by an agent can be faked or worked around if nobody checks that it proves something real. This discipline is the guardrail.
## Non-negotiable cycle
1. **Red**: write a test that fails for the right reason (missing behavior), not because of a setup, typing or import error. Run it and read the failure before going on.
2. **Green**: write the minimum code to make that test pass. No anticipation of future features nobody asked for.
3. **Simplify**: once green, clean up without changing the behavior. The already green tests are your safety net to refactor without fear — that is the role of `/CODE-SIMPLIFY`.
## What invalidates a test
- A test that passes the moment it is written, before any implementation: it tests nothing.
- A mock that replaces the logic under test itself rather than an external dependency.
- A red test made to pass by modifying the assertion rather than the code.
## Link with the forge-ops sequence
`/TEST` ends with red tests, proven by `.claude/evidence/<REFERENCE>/tests.md` (checkpoint `tests_written`). `/BUILD` ends with those same tests green, proven by `build.md` (checkpoint `build_done`). The cases to cover come from the twin test story, not from your judgment of the moment.
If a failure repeats identically during `/BUILD`, do not insist in a loop: two identical occurrences are a stop signal. Diagnose with `systematic-debugging`, and if the cause resists, escalate to the human.
A test that passes the