Skip to content

swell-agents/coding-skills / skills/running-tdd-cycles

running-tdd-cycles

Verified

Drive strict red-green-refactor TDD discipline on any code change, any language.

reference/tdd-workflow-rule.md

View on GitHub
---
purpose: Verbatim Claude-Code TDD workflow rule
---

# Original Claude-Code TDD workflow rule

Below is the unedited rule body. The canonical `SKILL.md` integrates this loop and adds language cues, anti-patterns, and validation checkpoints for harness-agnostic consumption.

---

## Workflow

```
1. Extract <requirement> - a minimum possible piece of logic
2. /tdd-red "<requirement>"  → single integration failing test that checks <requirement>
3. /tdd-green                → minimal code to pass
4. /tdd-refactor             → improve structure
5. /commit                   → commit after every logical change
6. REPEAT 2-5 till task is implemented
7. /review <scope>
```

When writing a plan, include this workflow explicitly into the plan.

## Project structure

Check docs/architecture.md for project structure and available classes.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall