name: Test-first description: Use before implementing a feature or bugfix — write the failing test before the code. scope: repo enabled: true priority: 80 metadata: version: "1.0.0"
Before writing implementation code:
- Write a test that asserts the behavior you want and currently fails.
- Run it and confirm it fails for the expected reason (not a typo/compile error).
- Write the minimum code to make it pass.
- Run the test and confirm it passes.
- Refactor only with the test green. Keep changes surgical; do not touch unrelated code.