test-driven-development
/test-driven-development
Wymusza cykl czerwony, zielony, refaktoryzacja przy każdej zmianie zachowania i wymaga testów, które faktycznie padają po zepsuciu kodu.
- Autor
- slayyyyer ↗
- Repozytorium
- freebuff-superpowers ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Wymusza cykl czerwony, zielony, refaktoryzacja przy każdej zmianie zachowania i wymaga testów, które faktycznie padają po zepsuciu kodu.
Oryginalny opis (EN)
Use whenever you add or change observable behavior. Enforces RED-GREEN-REFACTOR with real test runs, forbids production code written before a failing test, and requires tests that actually fail when the implementation breaks.
Jak działa
- The rule
- The cycle
- Test quality rules
- Running tests in Freebuff
- When TDD does not fit
Podgląd SKILL.md
--- name: test-driven-development description: Use whenever you add or change observable behavior. Enforces RED-GREEN-REFACTOR with real test runs, forbids production code written before a failing test, and requires tests that actually fail when the implementation breaks. license: MIT metadata: category: testing pack: freebuff-superpowers --- # Test-Driven Development ## The rule No production code without a failing test for it. If you already wrote the code, delete it or park it, write the test, and let the failure drive the implementation back. This is not a style preference. A test you never saw fail is a test you do not know can fail. ## The cycle ### RED Write the smallest test that expresses one behavior, through the interface a user of the code will actually use. Run it. - Confirm it fails **for the intended reason**. A syntax error, an import error, or a typo is not a red test; fix it and run again. - Read the failure message. It should describe the missing behavior, not the broken test. ### GREEN Write the minimal implementation that makes it pass. Run the test. - Then run the surrounding suite, not just the new case. - Resist generalizing. Duplication in the second case is cheaper than the wrong abstraction in the first. ### REFACTOR With tests green, remove duplication and improve names. Re-run after each refactor step. Never refactor and change behavior in the same step. ## Test quality rules - **Behavior, not implementation.** Assert on returned values, rendered output, HTTP responses, observable side effects. A test that breaks when you rename a private function is a liability. - **One behavior per test**, with a name that states the behavior. - **No weakened assertions to get green.** No `toBeTruthy` where `toEqual` belongs, no widened types, no `any`, no skipped tests, no `assert` deleted to make a suite pass. - **Prove the test can fail.** Temporarily break the implementation (or reason precisely about it) and confirm the test catches it. If it does not, the test is decoration. - **Deterministic.** No sleeps for timing; no dependence on network, clock, or test order. If you must control time or a random source, inject it. ## Running tests in Freebuff - Use the project's real command from `package.json`, `Makefile`, `pyproject.toml`, or CI config. Do not invent one. - Keep the exit status. If you pipe output through `head`, `tail`, or `grep`, use `set -o pipefail` so a failure cannot be masked by a successful pipe. - Read the failure output yourself. A red suite you did not read is not information. - Re-run the affected tests after every edit. An earlier green run does not cover a later change. ## When TDD does not fit Visual layout, exploratory spikes, generated code, and one-off config are legitimate exceptions. Say so explicitly, and substitute a concrete check: - UI: assert on DOM structure, accessible roles, and text through a test, not a screenshot you did not look at. - Spike: time-box it, throw it away, then write the real change test-first. - Config: validate by parsing it and asserting the resulting behavior. "The test would be annoying to write" is not an exception.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · slayyyyer/freebuff-superpowers | 90 | MIT |
| GanyuanRan/Aegis | 100 | MIT |
| lucasouzadev/agent-kit-skill | 100 | MIT |
| zeative/satgas | 100 | AGPL-3.0 |
| nikospavlopoulos/devops-mutant-powers | 100 | MIT |
| JohnStrunk/CommonCast | 100 | LGPL |
| Sanit-mann/The-Insectoids | 100 | MIT |
| mastro993/fstack | 100 | MIT |
| jelvodev/yaap | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 86d1a0318301 (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
- 95community-test-driven-development
Wymusza cykl czerwony, zielony, refaktoryzacja: najpierw test, potem implementacja przy każdej funkcji lub poprawce. - 100tdd
Wymusza ścisły cykl czerwony, zielony, refaktoryzacja: jeden nieudany test naraz i sprawdzenie pochodzenia testów. - 100tdd
Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów. - 100tdd
Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów. - 100tdd
Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów. - 100tdd
Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów.