scaffold/.claude/skills/tdd-planning/SKILL.md
Use when about to start TDD on a new feature or bugfix, before writing the first test — adds a design thinking phase that produces a test plan
npx skillsauth add gstredny/lauren-loop tdd-planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design before you test. Answer 4 questions, produce a test plan, then hand off to Red-Green-Refactor.
Core principle: The best tests come from deliberate design thinking, not from jumping straight to code. Planning what to test is separate from how to test it.
Before the superpowers:test-driven-development skill kicks in — after you know WHAT to build but before you write the first test.
digraph planning_flow {
rankdir=LR;
plan [label="TDD Planning\n(this skill)", shape=box, style=filled, fillcolor="#ffffcc"];
tdd [label="TDD Cycle\n(test-driven-development)", shape=box, style=filled, fillcolor="#ccffcc"];
plan -> tdd [label="test plan\nready"];
}
Skip when:
Answer these before writing any test code:
What functions, methods, parameters, or return types will be added or modified? Define the public API surface the tests will exercise.
Think: "What will the caller see?"
List the distinct behaviors the code must exhibit — happy paths, edge cases, error conditions. Each behavior becomes a test.
Think: "What are all the ways this can be used, misused, or fail?"
A deep module does a lot behind a simple interface. A shallow module exposes complexity to the caller. If the interface is as complex as the implementation, the design needs rethinking.
Think: "Is this hiding complexity or leaking it?"
If testing requires extensive mocking, global state manipulation, or complex setup — the design is too coupled. Simplify before writing tests, not after.
Think: "Can I test this with real objects and simple setup?"
After answering the 4 questions, produce a short test plan:
## Test Plan
**Interface:** <brief description of public API changes>
**Vertical slices** (implement in this order):
1. <simplest happy-path behavior> -> test name
2. <next behavior building on #1> -> test name
3. <edge case> -> test name
4. <error condition> -> test name
...
Each slice is one Red-Green-Refactor cycle. Order them so each builds on the last — simplest first, edge cases and errors after core behavior works.
Once the test plan exists, follow superpowers:test-driven-development for execution. Take the first vertical slice and enter the RED phase.
| Mistake | Fix | |---------|-----| | Planning too long — analysis paralysis | Cap at 5 minutes. Aim for 3-8 slices, not exhaustive coverage. | | Slices too large | Each slice = one test = one behavior. Split until atomic. | | Skipping question 4 (testability) | Untestable designs waste time in RED. Catch it here. | | Writing test code during planning | Planning produces a list, not code. Code starts in RED. |
development
Follow the end-to-end delivery workflow for planning, task-file management, execution, code review, verification, and closeout without relying on Claude-specific hooks or command conventions.
testing
Plan implementation work before coding by defining public interfaces, real collaborator boundaries, and vertical RED or VERIFY slices.
development
Manage task files in docs/tasks/open and docs/tasks/closed, including task discovery, resume/create rules, append-only Attempts logging, Left Off At updates, Code Review field handling, and needs verification closeout.
data-ai
Review an implementation plan before execution to catch missed success criteria, scope creep, constraint violations, unverified assumptions, and missed reuse opportunities.