tdd-workflow
/tdd-workflow
Implement features using TDD workflow with requirements-first approach. Use when implementing new features, adding functionality, or when user asks to build something.
- Author
- kookr-ai ↗
- Repository
- kookr ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Implement features using TDD workflow with requirements-first approach. Use when implementing new features, adding functionality, or when user asks to build something.
Original author description
Implement features using TDD workflow with requirements-first approach. Use when implementing new features, adding functionality, or when user asks to build something.
How it works
- When to Use
- Steps
- Requirement ID Schema
- Requirement Template
- Before Commit Checklist
- See Also
SKILL.md preview
---
name: tdd-workflow
description: Implement features using TDD workflow with requirements-first approach. Use when implementing new features, adding functionality, or when user asks to build something.
keywords: tdd, test-driven, red-green-refactor, requirements, feature implementation
related: testing-patterns, safe-refactoring
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task
---
# TDD Workflow
Implement features using Test-Driven Development with requirements-first approach.
## When to Use
- Implementing new features
- Adding functionality
- User asks to "build", "create", "add", "implement"
- Changes that should be tested
## Steps
### 1. Requirement First
Before any code:
1. Add/update the canonical requirement in `docs/requirements.md`
2. Use "shall" for mandatory, active voice, positive statements, quantifiable criteria
3. Assign unique ID: `{CATEGORY}-{AREA}-{NUMBER}` (FR-*, NFR-*, API-*, DR-*)
4. Define testable acceptance criteria
### 2. Test Second (TDD)
Write tests BEFORE implementation:
```typescript
describe('FR-AUTH-001: User authentication', () => {
it('shall authenticate valid credentials', () => { ... });
});
```
Map acceptance criteria to test cases.
### 3. Implement
Write minimal code to pass tests. If deviation needed, STOP and ask:
```
Implementation needs to differ because [reason]. Should I:
A) Update requirement, or B) Find different approach?
```
### 4. Verify Coherence
Run tests. Check:
- [ ] Requirements match implementation
- [ ] Modified requirements have tests
- [ ] Test specs up to date
- [ ] Traceability current
- [ ] No orphaned/untested items
### 5. Commit
Reference requirement: `git commit -m "feat: implement FR-AUTH-001 user authentication"`
Include code + docs in same commit when possible.
## Requirement ID Schema
| Category | Prefix | Example |
|----------|--------|---------|
| Functional | FR | FR-AUTH-001 |
| Non-Functional | NFR | NFR-PERF-001 |
| API | API | API-TASK-001 |
| Data | DR | DR-USER-001 |
| Test | TS | TS-AUTH-001 |
## Requirement Template
```markdown
### {ID}: {Short Title}
**Status:** Draft | Approved | Implemented | Deprecated
**Priority:** Critical | High | Medium | Low
**Requirement:** The system shall {action} {object} {condition}.
**Rationale:** {Why}
**Acceptance Criteria:**
- [ ] Given {context}, when {action}, then {result}
**Linked Tests:** TS-{AREA}-{NUM}
**Dependencies:** {Other IDs}
```
## Before Commit Checklist
- [ ] `pnpm test` passes
- [ ] `pnpm typecheck` clean
- [ ] `git status` shows intended files only
- [ ] Requirement documented in `docs/requirements.md`
- [ ] Tests cover the new/changed behavior
## See Also
- [[testing-patterns]] -- Test configuration and isolation
- [[playwright-e2e-patterns]] -- E2E test patterns
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · kookr-ai/kookr | 100 | Apache-2.0 |
| drvoss/everything-copilot-cli | 100 | MIT |
| momochenisme/speclink | 100 | MIT |
| travisjneuman/.claude | 100 | MIT |
| Reprograme/redevkit | 100 | MIT |
| madappgang/magus | 100 | MIT |
| aAAaqwq/AGI-Super-Team | 100 | MIT |
| affaan-m/ECC | 100 | MIT |
| affaan-m/ECC | 100 | MIT |
Database snapshot: 13.11.2026 · package version 1fbb89b929dd (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 96tdd
Use when implementing features or bug fixes test-first. - 100code-implementer
Guides the implementation of code using Test-Driven Development (TDD) and clean code principles. Trigger when implementing new features, fixing bugs, or refactoring existing code. - 100workflow-build-feature
Build a feature end to end: spec and TDD, implement, unit tests, Playwright check, PR. Use when "build a feature" or "implement this end-to-end". Spec/TDD loop only → workflow-spec-tdd. One bug → workflow-fix-and-ship. - 96sp-tdd
Use when implementing any feature or bugfix, before writing implementation code - 84spec
Specification-first development (BDD/TDD). Use when implementing new features, creating new components, or when requirements need clarification through tests. - 96tdd-workflows-tdd-refactor
Use when working with tdd workflows tdd refactor