ijfw-tdd

Solid

RED-GREEN-REFACTOR enforcement. Use when implementing a feature or bugfix before writing implementation code. Trigger: tdd, test first, red green refactor, /ijfw-tdd

AI & Automation 184 stars 32 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
75
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# IJFW TDD -- RED-GREEN-REFACTOR Write the test first. Watch it fail for the right reason. Write the minimum code to make it pass. Then improve structure without changing behavior. **Iron law:** No production code without a failing test first. If you wrote code before the test, delete it. Implement fresh from the test. This skill enforces three distinct moves. Each move has a green light that you must hit before advancing. Skipping a green light is not "pragmatic" -- it is the bug. --- ## Move 1: RED -- write a test that fails for the RIGHT reason Write ONE minimal test for ONE behavior. Use a descriptive name. Use real code (no mocks unless unavoidable). Before running the test, write down the failure message you EXPECT to see. Example: "AssertionError: expected 'Email required', got undefined" or "AttributeError: module has no attribute 'retryOperation'". Then run it: ```bash npm test path/to/test.ts # or pytest, cargo test, go test, etc. ``` Paste the actual failure into your scratch. Compare against what you predicted. **Green light to advance:** the test FAILS, and the failure message is the one you predicted (an assertion failure on the intended behavior, or a "missing symbol" error if the function does not exist yet). **Red flags that block advancing:** - Test passes immediately -- you are testing existing behavior. Rewrite. - Test errors on a typo, import, or syntax issue -- fix and re-run until it fails meaningfully. - Failure message surprises you -- y...

Details

Author
FerroxLabs
Repository
FerroxLabs/ijfw
Created
1 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category