Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

tdd-engineer

/tdd-engineer

Prowadzi implementację w cyklach czerwony, zielony, refaktor: jeden failujący test ze scenariusza, najprostsza zmiana, a potem refaktor z raportem wyników.

Repozytorium
ai-kaarkhana ↗
Licencja
MIT
Ostatnia zmiana repozytorium
02.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 02.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

Prowadzi implementację w cyklach czerwony, zielony, refaktor: jeden failujący test ze scenariusza, najprostsza zmiana, a potem refaktor z raportem wyników.

Oryginalny opis (EN)

Drives implementation through Red, Green, Refactor cycles: writes one failing test from a scenario, makes it pass with the simplest change, then refactors, reporting actual test results at every step. Use when implementing new behaviour.

Jak działa

  1. Purpose
  2. When to invoke
  3. Required input
  4. Execution instructions
  5. Expected output
  6. Validation checklist
  7. Example usage
  8. Sample prompts
  9. Common mistakes
  10. Related skills
Sekcje z nagłówków SKILL.md, w oryginale · 102 linii, 559 słów
Podgląd SKILL.md
---
name: tdd-engineer
description: "Drives implementation through Red, Green, Refactor cycles: writes one failing test from a scenario, makes it pass with the simplest change, then refactors, reporting actual test results at every step. Use when implementing new behaviour."
license: MIT
metadata:
  activity: testing
  difficulty: intermediate
  frameworks: "JUnit 5, pytest, Vitest"
  version: "1.0"
---

# TDD Engineer

## Purpose

Keep AI-assisted implementation small, specified by tests and verifiably correct, by enforcing the test-first loop and honest evidence of failure and success.

## When to invoke

- Implementing a function, class or endpoint whose behaviour is specified.
- Fixing a defect: first reproduce it as a failing test.
- An AI agent tends to generate large implementations with after-the-fact tests.

## Required input

- Scenario matrix or acceptance criteria with expected behaviours.
- Test framework, run command and an example of existing test style.
- The code under change, if any.

If a required input is missing, ask for it. Do not guess.

## Execution instructions

1. Pick the next scenario from the matrix, starting with the simplest behaviour.
2. RED: write one test that expresses the behaviour. Run it. Report the failure output and confirm it fails for the intended reason, not a compile error or missing import.
3. GREEN: write the smallest production change that passes. Run the whole relevant suite and report the result.
4. REFACTOR: improve names and structure without changing behaviour. Run the suite again.
5. Add the next scenario. Do not implement behaviour that no test requires.
6. When scenarios are done, review the tests for weak assertions and add boundary and negative cases from the matrix.
7. Report the final suite result with counts, and list scenarios not covered.

## Expected output

- For each cycle: test name, red output excerpt, change summary, green output excerpt.
- Final test run with command and pass/fail counts.
- Scenario coverage table: scenario ID -> test name.
- Remaining gaps and known limitations.

## Validation checklist

- [ ] Each test was seen failing for the right reason before the change.
- [ ] Test results quoted are from actually executed commands.
- [ ] No production code exists that no test demands.
- [ ] Assertions check behaviour, not just that code ran.
- [ ] Existing tests were not weakened or deleted to make things pass.

## Example usage

Input:

> Scenario SC-02: total of exactly 100.00 ships free.

Illustrative output (abridged, hand-written for this guide, not captured from a model run):

```text
RED: `shipping_is_free_at_threshold` fails: expected 0.00 but was 4.99.
GREEN: change `total > 100` to `total >= 100`. Suite: 6 passed.
REFACTOR: extract `FREE_SHIPPING_THRESHOLD`. Suite: 6 passed.
```

## Sample prompts

```text
Use the TDD Engineer skill with [pytest | JUnit 5 | Vitest]. Implement scenario [ID] from the matrix: write the test, run it and show the failure, make the minimal change, run the suite and show the result, then refactor. One scenario only. Matrix: [MATRIX]. Code: [CODE]
```

## Common mistakes

- Writing all tests and the full implementation in one step and calling it TDD.
- Claiming tests pass without running them.
- A red test that fails because of a typo, so it proves nothing.
- Modifying a failing test to match buggy behaviour.

## Related skills

- [Unit Test Engineer](../unit-test-engineer/SKILL.md)
- [Edge Case Hunter](../edge-case-hunter/SKILL.md)
- [Mutation Testing Specialist](../mutation-testing-specialist/SKILL.md)
- [Refactoring Specialist](../refactoring-specialist/SKILL.md)

## Related resources

Handbook:

- [Chapter 5: Test Driven Development](../../handbook/05_test_driven_development/README.md)

Prompts:

- [TDD Test Generation](../../prompts/testing/tdd-test-generation.md)
- [Unit Test Generation](../../prompts/testing/unit-test-generation.md)
- [Regression Test Generation](../../prompts/testing/regression-test-generation.md)

Workflows:

- [Build a new feature](../../workflows/01_feature_development.md)
- [Fix a defect](../../workflows/02_defect_fix.md)
- [Write unit and integration tests](../../workflows/07_unit_and_integration_testing.md)

Examples:

- [examples/python/README.md](../../examples/python/README.md) scenario S6 (TDD from requirement to passing tests)

Wersje

RepozytoriumWynikLicencja
Ta strona · arijeetganguli/ai-kaarkhana100MIT
arijeetganguli/ai-kaarkhana100MIT

Migawka bazy z 13.11.2026 · wersja paczki 7bcc9b0b1439 (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

  • 100tdd-workflow
    Pisze funkcje i poprawki test-first w cyklu czerwony, zielony, refaktor.
  • 100tdd
    Prowadzi cykl czerwony, zielony, refaktor z obserwowanymi błędami: najpierw failujący test, dopiero potem kod produkcyjny.
  • 90tdd-cycle
    Prowadzi pętlę TDD czerwony-zielony-refaktor z obowiązkowym sprawdzeniem fałszywie dodatnich wyników testu.
  • 90tdd-red-green-refactor
    Prowadzi zmianę w krótkich cyklach czerwony, zielony, refaktoryzacja, z Claude w roli dyscyplinowanego partnera i widoczną listą testów.
  • 90tdd
    Prowadzi cykl czerwony-zielony-refaktor przy zadaniach, których weryfikacja opiera się na testach, np. w pętli wdrożeniowej.
  • 100code-tdd
    Buduje zmianę metodą test-first w krokach czerwony, zielony i refaktor, przez publiczny interfejs i testy wejściowe.

Uwagi i zgłoszenia

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