tdd-workflow
npx skills add https://github.com/vineethsoma/agent-packages --skill tdd-workflow
Agent 安装分布
Skill 文档
TDD Workflow
Apply Test-Driven Development discipline with Red â Green â Refactor cycle, TDD commit convention, and compliance tracking.
What This Skill Provides
- TDD compliance checklist: Track TDD discipline throughout story
- TDD commit convention: ð´ð¢â»ï¸ emoji pattern for Red â Green â Refactor
- Metrics gathering: Collect coverage, test counts, commit patterns
- Validation: Verify TDD compliance before merge
- AI-guided verification: Review TDD discipline and test quality
When to Use
- Starting story implementation (initialize checklist)
- Throughout development (track TDD discipline)
- Before merge (validate compliance)
- In code review (verify test-first approach)
Quick Start
1. Initialize TDD Checklist
“`bash
From project root
./scripts/init-tdd-checklist.sh us-001 “`
Creates: “` specs/{feature}/stories/us-001/checklists/ âââ tdd-compliance.md â Track TDD discipline “`
2. Follow TDD Commit Convention
Red â Green â Refactor Cycle:
“`bash
ð´ RED: Write failing test
git add backend/tests/users.test.ts git commit -m “ð´ Test: POST /api/users validates email format”
�� GREEN: Implement to pass
git add backend/src/api/users.ts git commit -m “ð¢ Implement email validation in createUser”
â»ï¸ REFACTOR: Improve code quality
git add backend/src/api/users.ts backend/src/utils/validation.ts git commit -m “â»ï¸ Extract email validation to reusable utility” “`
Emoji Guide:
- ð´ `:red_circle:` – Failing test (Red phase)
- ð¢ `:green_circle:` – Passing implementation (Green phase)
- â»ï¸ `:recycle:` – Refactoring (Refactor phase)
3. Gather TDD Metrics
“`bash ./scripts/gather-tdd-metrics.sh us-001 “`
Collects:
- TDD commit counts (ð´ð¢â»ï¸)
- Test coverage (backend, frontend)
- Test-to-code ratio
- Test file counts
4. Validate Before Merge
“`bash ./scripts/validate-tdd-compliance.sh us-001 “`
Checks:
- All checklist items completed
- Coverage ⥠80%
- TDD commit pattern detected (ð´âð¢)
- No skipped or commented tests
Exit code 0 = passed, 1 = failed.
TDD Commit Convention Details
See TDD discipline instructions for full details on commit convention enforcement.
Integration with Other Skills
- Task-delegation: TDD compliance tracked per delegation
- Feature-orchestration: TDD checklist in story checklists/ directory
- Retrospective-workflow: TDD metrics included in retro
- CLAUDE-framework: TDD is part of coding standards
Scripts
- `init-tdd-checklist.sh ` – Initialize TDD compliance checklist
- `gather-tdd-metrics.sh ` – Collect TDD metrics
- `validate-tdd-compliance.sh ` – Verify compliance (exit 0/1)
Prompts
- `verify-tdd-compliance` – AI-guided TDD verification workflow
Templates
- `tdd-compliance.checklist.md` – TDD discipline tracking