| name | test-list |
| description | TDD Test List Phase. Creates an it.todo() list for a feature, scoped to base functionality (no edge cases, no advanced features). First step of the TDD cycle; invoked once per feature before the red phase.
|
TDD Test List Phase
You are now in the Test List Phase of TDD. Follow these instructions to create a comprehensive test list.
Your Mission
Create a test list using it.todo() for BASE FUNCTIONALITY ONLY:
- Identify the core/base functionality of the feature
- Break it down into discrete, testable behaviors
- Create test cases using
it.todo() - NO executable tests yet
- Order tests from simplest to most complex
- Avoid advanced features or edge cases
Inputs
The invoker provides:
- Feature name — what is being implemented
- Test file path — where the
.spec.ts should be created
- Implementation file path — the module under test
- Requirements / spec — the kata or feature specification
Test List Rules
What to Include (Base Functionality)
- Empty/zero cases: What happens with empty input?
- Single element cases: Simplest non-empty input
- Two element cases: Introduces interaction
- Multiple element cases: Generalizes the pattern
- Basic validation: Essential constraints only
What to Exclude (Save for Later)
- Advanced features
- Edge cases
- Performance optimizations
- Exotic inputs
- Error handling beyond basics
Process
Step 1: Understand the Feature
- What is the core functionality?
- What are the essential behaviors (not nice-to-haves)?
- What is the minimum viable feature?
Step 2: Identify Base Test Cases
List 3-6 test cases covering base functionality only.
Step 3: Order Tests (Simple → Complex)
Order from simplest to most complex. Early simple tests
force minimal implementations (hardcoded returns, no
generalization); later tests build pressure that drives
incremental generalization. Starting with a complex test
jumps straight to the general solution and loses the
stepwise pattern the Green phase relies on (hardcoded
→ conditional → reduce in the green-phase example).
- Simplest case (often empty/zero)
- Single element
- Two elements
- Multiple elements
- Basic validation
Step 4: Write Test File
Create the test file with it.todo() entries:
import { describe, it, expect } from "vitest";
import { functionName } from "./implementation.js";
describe("Feature Name", () => {
it.todo("should [simplest case]");
it.todo("should [next case]");
it.todo("should [more complex case]");
});
Step 5: Provide Summary
After creating the test list, output:
Test List Created:
**Feature**: [feature name]
**Test File**: [filename].spec.ts
**Base Functionality Tests**: [count]
**Test Cases** (ordered simple → complex):
1. [first test description]
2. [second test description]
3. [third test description]
...
**Advanced Features** (NOT included):
- [feature 1] - save for later
- [feature 2] - save for later
**Next Step**: Invoke `/red` to activate the first test.
Important Guidelines
DO
- Focus on base functionality only
- Order tests simple → complex
- Use
it.todo() for all tests
- Write clear, specific descriptions
- Keep tests independent
- One behavior per test
DON'T
- Include advanced features
- Write executable tests (use
it.todo())
- Think about implementation
- Include edge cases
- Order randomly
Completion
After completing the test list, proceed to Red phase:
Test List Phase Complete. Proceeding to Red phase with the first test.