Documentation
README
TDD Skill
Write the test. Watch it fail. Make it pass. Clean up. Repeat.
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
If you're writing production code and no test just failed, you're doing it wrong.
When to Apply
OMC_TDD_MODEis enabled (guided or enforced)- Implementing a new feature or behavior
- Fixing a bug (write the test that reproduces it first)
- Unsure how to structure tests for a piece of logic
- When the
tdd_enforcerhook blocks an edit
Red-Green-Refactor Cycle
RED: Write a Failing Test
- Write ONE test that describes the desired behavior
- Run the test suite
- Verify it fails for the RIGHT reason (not a syntax error, not a missing import)
- If it passes, your test is wrong or the feature already exists
This is the opening of the README. Read the full README on GitHub.