← ClaudeAtlas

red-phase-verifierlisted

This skill should be used when the user asks to "write tests first", "run TDD", "verify red phase", "check failing tests", or when practicing test-driven development. Ensures tests fail before implementation.
smicolon/ai-kit · ★ 3 · AI & Automation · score 64
Install: claude install-skill smicolon/ai-kit
# Red Phase Verifier Ensures tests are written BEFORE implementation and fail initially. ## Purpose In TDD: 1. **RED**: Write failing tests 2. **GREEN**: Implement to pass 3. **REFACTOR**: Improve while green This skill enforces Step 1. ## Activation Triggers This skill activates when: - Running /dev-loop command - Creating test files before implementation - Mentioning "write tests first" ## Verification Process ### Step 1: Check Implementation Exists ```python # If implementing UserService.create_user: # Check if method exists and has logic import inspect from app.services import UserService method = getattr(UserService, 'create_user', None) if method: source = inspect.getsource(method) if 'pass' not in source and 'raise NotImplementedError' not in source: # Implementation exists! WARN: "Implementation found before tests" ``` ### Step 2: Run Tests ```bash pytest tests/test_new_feature.py -v --tb=short ``` ### Step 3: Verify Failures Expected output: ``` FAILED tests/test_new_feature.py::test_create - AssertionError FAILED tests/test_new_feature.py::test_validate - AttributeError ``` ### Step 4: Report ``` RED PHASE VERIFICATION Tests written: 5 Tests failing: 5 Red phase confirmed! Implementation may now proceed. ``` ## Warning Cases ### Case 1: Tests Pass Before Implementation ``` WARNING: Tests passed before implementation! Failing tests: 0/5 This indicates: 1. Tests don't test new functionality 2. Tests have trivial assertio