red-phase-verifierlisted
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