jaktestowac/awesome-copilot-for-testers / plugins/test-driven-development/skills/test-driven-development
test-driven-development
VerifiedDrives implementation test-first through red-green-refactor cycles: one failing test, the minimal code to pass it, then cleanup under green. Use before writing production code for a new behavior, and whenever the request mentions TDD, test-driven, test-first, red-green-refactor, "write the test first", "start with a failing test", or reproducing a bug with a test before fixing it. Also use when implementation keeps landing before anyone knows how it will be verified.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 22.4 KB |
| resources/green-step-strategies.md | markdown | 5.8 KB |
| resources/tdd-cycle-log-template.md | markdown | 3.2 KB |
| resources/tdd-fit-check.md | markdown | 5.2 KB |
| resources/worked-example.md | markdown | 7.1 KB |
resources/tdd-cycle-log-template.md
View on GitHub# TDD Session Log
Use this to keep a long TDD session honest: what is queued, what each cycle proved, and what is still open.
## Session frame
- **Behavior or bug:**
- **Public interface under test:**
- **Seam the tests observe:**
- **Seam confirmed with the user:** yes / no
- **Loop shape:** inner only / double loop / interface-discovery
- **Out of scope for this session:**
- **Test runner and conventions detected:**
- **Command to run one test file:**
- **Command to run the full suite:**
- **Last green commit at start:**
## Test list
Smallest and most central behavior first. Add rows as cycles reveal new cases; never write these tests ahead of their cycle.
| # | Behavior | Status | Notes |
| --- | -------- | ------------------------------------- | ----- |
| 1 | | done / in progress / queued / dropped | |
| 2 | | | |
| 3 | | | |
## Fakes outstanding
Every deliberate fake needs a queued test that will remove it. Empty at session close.
| Fake (file:line) | Test list entry that removes it |
| ---------------- | ------------------------------- |
| | |
## Cycle record
Copy one block per cycle.
### Cycle N - <behavior>
**Red**
- Test name:
- Actual failure output:
- Failed for the right reason (behavioral, not mechanical): yes / no
- If no, what was fixed first:
- Passed immediately instead of failing: yes / no → if yes, what was decided:
**Green**
- Strategy: obvious implementation / fake it / triangulation
- Minimal change made:
- Deliberately left faked (and which queued test removes it):
- Doubles added, and the boundary each one stands at:
- Full suite result:
**Refactor**
- Cleanup applied (structure only):
- Behavior unchanged: yes / no
- Full suite result after refactor:
- Reverted anything: yes / no
**Outcome**
- Committed at green: yes / no
- Step size felt: too big / right / could be bigger
- Reverts needed this cycle:
- New cases discovered for the test list:
- Design signal noticed (hard setup, awkward seam, "and" in the name):
## Session close
- [ ] Every production change was preceded by a failing test that was actually run
- [ ] Every red step failed for a behavioral reason, with real output quoted
- [ ] Every expected value came from an independent source, not from the implementation
- [ ] No green step contained code the current test did not demand
- [ ] No fake remains without a queued test to remove it
- [ ] Test doubles stand only at boundaries the project does not own
- [ ] No existing assertion was weakened or removed to reach green
- [ ] Every refactor ran under a passing suite and changed no behavior
- [ ] Full suite passes now, and the result was quoted
- [ ] Any bug fixed here has a minimised, permanent regression test
- [ ] The original un-minimised scenario was re-checked after the fix
- [ ] The suite reads as a description of the feature
- [ ] Remaining test list entries are listed below, not silently dropped
**Where the loop was stepped out of** - which entry, why, and the substitute check that was run instead:
**Design findings surfaced by the loop:**
**Still open:**
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |