tdd-workflow
Test-Driven Development (TDD) red-green-refactor cycle for GMailArchiver. Use when implementing features, fixing bugs, or following the 6-phase workflow. Triggers on: TDD, test-driven, red-green, failing test, write test first, implement feature, fix bug, development workflow, phase.
When & Why to Use This Skill
This Claude skill facilitates a structured Test-Driven Development (TDD) workflow, guiding developers through the essential Red-Green-Refactor cycle. It ensures high code quality and robust software architecture by enforcing a test-first methodology, specifically optimized for the GMailArchiver project's development lifecycle.
Use Cases
- Feature Implementation: Use the Red-Green-Refactor cycle to define requirements through failing tests before writing any functional code.
- Bug Fixing: Streamline debugging by creating reproduction test cases first, ensuring the fix is verified and preventing future regressions.
- Code Refactoring: Safely improve internal code structure and naming conventions while using the existing test suite to maintain functional integrity.
- Workflow Standardization: Maintain consistency across the development team by following the project's specific 6-phase development process and exit criteria.
| name | tdd-workflow |
|---|---|
| description | >- |
| Triggers on | TDD, test-driven, red-green, failing test, write test first, |
TDD Workflow for GMailArchiver
This skill provides guidance on the Test-Driven Development process.
Source Documentation
Always read the authoritative source:
docs/PROCESS.md - Development workflow containing:
- Phase 3: Test (TDD Red) - Writing failing tests first
- Phase 4: Code (TDD Green) - Making tests pass with minimal code
- Red-green-refactor cycle explanation
- Exit criteria for each phase
- Definition of done
Red-Green-Refactor Cycle
Red: Write a failing test
- Test describes expected behavior
- Verify test actually fails
Green: Write minimal code to pass
- Simplest solution that works
- Don't over-engineer
Refactor: Improve code quality
- Remove duplication
- Improve naming
- Verify tests still pass
Related Skills
- testing-guidelines - For test patterns and fixtures (docs/TESTING.md)
- coding-standards - For code style (docs/CODING.md)
Usage
When following TDD:
- Read
docs/PROCESS.mdPhase 3 and 4 for the workflow - Use
/testcommand for Phase 3 guidance - Use
/codecommand for Phase 4 guidance - If process changes, update
docs/PROCESS.md(not this skill)
The source documentation is the single source of truth - this skill just points you there.