Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

red-phase-verifier

/red-phase-verifier

Pilnuje fazy red w TDD i sprawdza, czy napisane testy faktycznie padają, zanim powstanie implementacja.

Repozytorium
ai-kit ↗
Licencja
MIT
Ostatnia zmiana repozytorium
15.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 15.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pilnuje fazy red w TDD i sprawdza, czy napisane testy faktycznie padają, zanim powstanie implementacja.

Wyzwalacze z opisu

write tests firstrun TDDverify red phasecheck failing tests
Oryginalny opis (EN)

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.

Jak działa

  1. Purpose
  2. Activation Triggers
  3. Verification Process
  4. Warning Cases
  5. Enforcement
  6. Expected Failure Types
  7. Dev Loop Integration
Sekcje z nagłówków SKILL.md, w oryginale · 177 linii, 499 słów
Podgląd SKILL.md
---
name: red-phase-verifier
description: 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.
---

# 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 assertions
3. Implementation already exists

Action: Regenerate stricter tests
```

### Case 2: Partial Failures

```
PARTIAL RED PHASE

Tests failing: 3/5
Tests passing: 2/5

Passing tests may be:
1. Testing existing functionality (OK)
2. Trivial assertions (NOT OK)

Review passing tests:
- test_helper_exists: assert helper <- TRIVIAL
- test_constant: assert X == X <- TRIVIAL

Action: Strengthen or remove trivial tests
```

### Case 3: Wrong Failure Type

```
UNEXPECTED FAILURE TYPE

test_create_user: SyntaxError in test file

Tests should fail due to:
- AssertionError (expected behavior not met)
- AttributeError (method doesn't exist yet)
- NotImplementedError (placeholder)

NOT due to:
- SyntaxError (test file broken)
- ImportError (missing dependency)
- TypeError (wrong arguments)

Action: Fix test file syntax
```

## Enforcement

When red phase not verified:

```
CANNOT PROCEED TO GREEN PHASE

Red phase requirements not met:
- 2 tests passed before implementation
- 1 test has syntax error

Fix issues, then run verification again.
```

## Expected Failure Types

### Good Failures (Proceed)

- `AssertionError` - Assertion failed (expected)
- `AttributeError` - Method/attribute doesn't exist yet
- `NotImplementedError` - Placeholder implementation
- `ModuleNotFoundError` - Module not created yet

### Bad Failures (Fix First)

- `SyntaxError` - Test code is broken
- `IndentationError` - Test code formatting issue
- `NameError` - Undefined variable in test
- `TypeError` - Wrong arguments in test setup

## Dev Loop Integration

When integrated with /dev-loop:

1. Tests written -> Run red phase verifier
2. If all fail correctly -> Proceed to implementation
3. If some pass -> Warn and suggest fixes
4. If wrong failures -> Block until fixed

```
TDD LOOP: RED PHASE

Running red phase verification...

test_create_user: FAILED (AttributeError)
test_validate_email: FAILED (AssertionError)
test_duplicate_email: FAILED (AssertionError)
test_get_user: FAILED (NotImplementedError)
test_list_users: FAILED (NotImplementedError)

Red phase: 5/5 tests failing correctly

Proceeding to GREEN phase...
```

Wersje

W bazie nie ma innych skilli o nazwie red-phase-verifier.

Migawka bazy z 13.11.2026 · wersja paczki b1b5e911cb6f (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100test-driven-development
    Prowadzi przez TDD: pętlę red-green-refactor, wybór kolejnego testu, projektowanie przez testy oraz sytuacje, w których TDD ma sens lub nie.
  • 100tdd
    Włącza pełny tryb TDD, gdy użytkownik prosi o test-driven, test first lub red-green-refactor, i pilnuje kolejności testów.
  • 100test-driven-development
    Opisuje metodykę TDD i workflow red-green-refactor: pisanie testów przed kodem, projektowanie testów przed implementacją i przegląd podejść test-first.
  • 100tdd
    Opisuje metodykę TDD i workflow red-green-refactor: pisanie testów najpierw, projektowanie testów przed implementacją i przegląd podejść test-first, bez specyfiki Vitest i mockowania MSW.
  • 95tdd-workflow
    Egzekwuje metodykę TDD: testy przed implementacją, cykl red-green-refactor i wymagania dotyczące pokrycia kodu.
  • 100red-green-refactor
    Prowadzi przez cykl TDD red-green-refactor: najpierw test, który pada, potem minimalny kod przechodzący test i refaktoryzacja przy zielonych testach.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.