Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

tdd

/tdd

Stosuje red-green-refactor z jednym testem w cyklu, zanim zmieni kod, przy budowie funkcji lub naprawie błędu.

Repozytorium
maestro ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.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 13.11.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

Stosuje red-green-refactor z jednym testem w cyklu, zanim zmieni kod, przy budowie funkcji lub naprawie błędu.

Oryginalny opis (EN)

Test-driven development: red-green-refactor, one test per cycle. Use when the task asks to build a feature, fix a bug or change behaviour, before you write the code.

Jak działa

  1. Seams: where tests go
  2. Anti-pattern
  3. Rules of the loop
Sekcje z nagłówków SKILL.md, w oryginale · 40 linii, 388 słów
Podgląd SKILL.md
---
name: tdd
description:
  "Test-driven development: red-green-refactor, one test per cycle. Use when the task asks to build a feature, fix a bug
  or change behaviour, before you write the code."
---

# Test-Driven Development

TDD is the red → green loop. This skill is the reference for the loop: where tests go, the anti-pattern, and the rules
of the loop. What makes a test worth keeping is [`good-tests`](../good-tests/SKILL.md). Every section applies on every
cycle: consult them before and during the loop, not after.

When exploring the codebase, read `GLOSSARY.md` (if it exists) so test names and interface vocabulary match the
project's domain language, and respect ADRs in the area you're touching.

## Seams: where tests go

A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests
live at seams, never against internals.

**Test only at seams the spec or the tester's map names.** Before writing any test, write down the seams under test. No
test goes at a seam neither names. You can't test everything, so naming the seams up front is how testing effort lands
on the critical paths and complex logic instead of every edge case.

When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the
interface should expose), read [`codebase-design`](../codebase-design/SKILL.md) for the vocabulary. It is the shared
source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult,
not a session to run.

## Anti-pattern

- **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you
  test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit
  to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one
  implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.

## Rules of the loop

- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or
  add speculative features.
- **The exception: tests the spec fixes.** Tests the spec fixes at the observable boundary come first, from the tester;
  write the rest of your tests in the vertical loop.
- **One slice at a time.** One seam, one test, one minimal implementation per cycle.
- **Refactoring is not part of the loop.** It belongs to the review stage, not the red → green implementation cycle.

Wersje

RepozytoriumWynikLicencja
Ta strona · dvalnn/maestro100MIT
kdlbs/kandev100AGPL-3.0
sentimony/skills100MIT
sentimony/skills100MIT
TerminalSkills/skills100Apache-2.0
duronext/jig100MIT
xoai/sage100MIT
rolemodel/skills100MIT
matteocodogno/wellforge100MIT

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

Pobrania w ostatnich 30 dniach: 0 · ranking

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

Podobne skille

  • 95tdd-workflow
    Egzekwuje metodykę TDD: testy przed implementacją, cykl red-green-refactor i wymagania dotyczące pokrycia kodu.
  • 100test-driven-development
    Prowadzi implementację test-first w cyklach red-green-refactor: jeden test, minimalny kod i porządki, także przy odtwarzaniu błędu testem przed poprawką.
  • 95test-driven-development
    Implementuje funkcję lub poprawkę najpierw przez testy, w krótkich cyklach red-green-cleanup, gdy użytkownik wprost prosi o TDD albo dowody red-green-refactor.
  • 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.
  • 100test-driven-development
    Wymusza cykl RED-GREEN-REFACTOR z podejściem test-first przy każdej funkcji i poprawce błędu, przed napisaniem kodu implementacji.
  • 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.

Uwagi i zgłoszenia

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