Enforces Test-Driven Development: write failing tests first, then minimal code to pass, refactor. For implementation tasks, bug fixes needing regression tests, behavior changes.
npx claudepluginhub repozy/superpowers-optimizedThis skill uses the workspace's default tool permissions.
Write failing tests first. Then write minimal code to pass.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Write failing tests first. Then write minimal code to pass.
No production code before a failing test proves the behavior is missing.
If code was written first, delete it and restart from a test. No exceptions.
This is the hardest rule to follow and the most important. Every rationalization to skip it leads to untested behavior that breaks later.
Repeat per behavior. Never skip VERIFY steps.
Wrong — code first:
1. Write the handler function
2. Write tests to verify it works
3. All tests pass on first run ← this means the tests prove nothing
Right — test first:
1. Write test: POST /users returns 201 with valid body
2. Run test → FAILS (handler doesn't exist yet) ← good
3. Write minimal handler to return 201
4. Run test → PASSES ← test proved the behavior was missing, now it works
5. Refactor handler if needed, tests stay green
| Temptation | Why it fails |
|---|---|
| "This is too simple to test" | Simple code has the longest lifespan. It will be changed by someone who doesn't know the intent. |
| "I'll write tests after" | After never comes. And tests written after pass immediately, proving nothing. |
| "I'm just refactoring, no new behavior" | If behavior doesn't change, existing tests must stay green. Run them. |
| "Tests slow me down" | Tests save you from debugging sessions that take 10x longer. |
| "The type system catches this" | Types catch shape errors, not logic errors. Test the logic. |
| "I need to see the shape of the code first" | Spike in a scratch file. Then delete it and TDD the real implementation. |
test_expired_token_returns_401).For complex, high-risk, or hard-to-test behavior, go beyond basic unit tests while still following RED-GREEN-REFACTOR:
Choose appropriate frameworks and libraries for the current stack. Write tests that are fast, deterministic, and maintainable.
systematic-debugging to find root cause before writing the fix test.verification-before-completion before success claims.testing-anti-patterns.md when introducing heavy mocking.