// Provides guidance on spec-driven, test-driven, iterative development methodology. Activated when user asks about MVP-first development, iterative workflows, TDD cycles, specification writing, or how to structure feature development.
| name | Iterative Development Practices |
| description | Provides guidance on spec-driven, test-driven, iterative development methodology. Activated when user asks about MVP-first development, iterative workflows, TDD cycles, specification writing, or how to structure feature development. |
| version | 0.1.0 |
This skill provides guidance on the iterative-dev methodology: a spec-driven, test-driven, MVP-first approach to building software.
Principle: Prove value quickly, then iterate toward the full solution.
Why:
How:
Principle: Clear specifications drive everything downstream.
Why:
Key Documents:
Research Findings (in scope doc) - use for:
ADRs - use only for:
Principle: Write failing tests before implementation.
The Cycle:
RED → Write failing test
GREEN → Write minimal code to pass
REFACTOR → Improve code, keep tests green
Why:
Principle: Everything works or nothing ships.
What to Avoid:
// ❌ Stubs
function processPayment(amount) {
// TODO: implement
return true;
}
// ❌ Placeholders
throw new Error('Not implemented');
// ❌ Empty handlers
catch (error) {
// handle error later
}
Why:
Goal: Understand the problem
Ask:
Output: vision.md
Goal: Define minimum viable scope
Research first (CRITICAL):
If research reveals complexity:
EnterPlanModeThen ask:
Output: scope-v<N>.md with Research Findings section
Goal: Create testable requirements
For each scope item:
Output: requirements-v<N>.md
Goal: Write failing tests
For each requirement:
Output: Test files, test-plan-v<N>.md
Goal: Make tests pass
For each requirement:
Output: Implementation files
Goal: Ensure quality
Check:
Output: validation-v<N>.md
Goal: Document and release
Actions:
Output: release-v<N>.md
Goal: Plan next iteration
Decide:
## FR-001: User Login
**Priority**: Critical
**Scope Item**: Authentication
**Description**:
Users can log in with email and password to access their account.
**Acceptance Criteria**:
1. **Given** a registered user with valid credentials
**When** they submit email and password
**Then** they receive an authentication token
2. **Given** invalid credentials
**When** login is attempted
**Then** error message is displayed (no token)
3. **Given** empty email or password
**When** login is attempted
**Then** validation error is shown
❌ Bad: "System should be fast" ✅ Good: "API responds in < 200ms for 95th percentile"
❌ Bad: "User experience should be good" ✅ Good: "User can complete checkout in ≤ 3 clicks"
❌ Bad: "Handle errors appropriately" ✅ Good: "Return 400 status with error message for invalid input"
it('should return token for valid credentials', () => {
// Arrange - set up test data
const credentials = { email: 'user@test.com', password: 'valid123' };
// Act - perform the action
const result = login(credentials);
// Assert - verify the outcome
expect(result.token).toBeDefined();
expect(result.token).toMatch(/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+/);
});
toBeTruthy())// ❌ Too vague
expect(result).toBeTruthy();
// ❌ Testing implementation
expect(mockDb.query).toHaveBeenCalledWith('SELECT...');
// ❌ Multiple concerns
it('should login and update profile and send email', () => {...});
// ❌ No assertion
it('should process data', () => {
processData(input);
// forgot to assert!
});
Use /iterative-dev:save when:
The session state includes:
After /clear, run /iterative-dev:resume to:
| Command | Purpose |
|---|---|
/iterative-dev <feature> | Start/continue feature |
/iterative-dev:init | Initialize project |
/iterative-dev:save | Save state manually |
/iterative-dev:resume | Resume from state |
/iterative-dev:adr <title> | Create architecture decision record |
| Location | Purpose |
|---|---|
docs/iterations/<feature>/ | Feature documents |
docs/adrs/ | Architecture decisions |
.claude/iterative-dev/ | Plugin state |
CLAUDE.md | Project context |
| Metric | Default |
|---|---|
| Line Coverage | 80% |
| Branch Coverage | 75% |
/iterative-dev:check for gap analysis/iterative-dev:save to checkpoint/clear to reset/iterative-dev:resume to continue