test-driven-development
Write tests first, watch them fail, then implement minimal code to pass.
- Follows the red-green-refactor cycle: write a failing test, verify it fails correctly, implement minimal code to pass, then refactor while keeping tests green
- Requires deleting any production code written before tests exist; no exceptions for "reference" or "adaptation"
- Emphasizes watching tests fail as proof they actually test the right thing; tests that pass immediately prove nothing
- Covers common rationalizations (testing after, manual verification, sunk cost) with concrete rebuttals and a verification checklist to confirm TDD was followed
Test-Driven Development (TDD)
Overview
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
Violating the letter of the rules is violating the spirit of the rules.
When to Use
Always:
- New features
- Bug fixes
- Refactoring
- Behavior changes
Exceptions (ask your human partner):
More from obra/superpowers
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
152.3Kusing-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
92.7Ksystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
92.0Kwriting-plans
Use when you have a spec or requirements for a multi-step task, before touching code
91.3Krequesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
80.4Kexecuting-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
74.2K
More in Agent workflows
find-skills
Discover and install skills from skills.sh directly inside an agent session
vercel-labs/skillsagent-browser
Full browser automation: navigate, click, fill forms, extract data, and screenshot
vercel-labs/agent-browserskill-creator
Create, test, and publish new skills from within your agent
anthropics/skillsbrowser-use
Browser automation with visual understanding — interacts with pages based on what it sees
browser-use/browser-usesubagent-driven-development
Orchestrate specialized subagents for different parts of a task
obra/superpowers
More in Testing
webapp-testing
Web app testing patterns covering unit, integration, and end-to-end approaches
anthropics/skillsverification-before-completion
Force a verification pass before any task is marked done
obra/superpowersplaywright-best-practices
Playwright patterns: selectors, fixtures, parallelism, and CI integration
currents-dev/playwright-best-practices-skillplaywright-cli
Control a live browser via the Playwright CLI to record, inspect, and replay interactions
microsoft/playwright-cli