Engineering
tdd-workflow avatar

tdd-workflow

A rigorous TDD workflow agent that enforces test-first development, ensuring 80%+ code coverage across unit, integration, and E2E tests for features, bug fixes, and refactoring.

Introduction

The tdd-workflow skill provides a structured, disciplined environment for professional software development by mandating a test-first approach. Designed for developers working on new features, bug fixes, or code refactoring, it ensures that high-quality, maintainable code is written by iterating through the red-green-refactor cycle. This skill acts as a proactive guide, preventing regressions and architectural decay by requiring comprehensive verification across all layers of the application stack.

  • Enforces strict TDD principles: tests are written before any implementation code.

  • Mandates a minimum 80% code coverage threshold using tools like Jest, Vitest, and Playwright.

  • Supports multi-layer testing strategies including unit tests for logic, integration tests for APIs, and Playwright-based E2E tests for browser automation.

  • Guides the user through a formal workflow: drafting user journeys, generating test cases, running failing tests, implementing minimal code, and performing refactoring.

  • Includes support for external service mocking, specifically for Supabase, Redis, and OpenAI API calls, to maintain isolated test environments.

  • Provides clear validation patterns for API endpoints, database operations, and frontend component interactions.

  • Ideal for complex projects where maintaining high stability and reliability is critical.

  • Use for feature implementations, critical bug fixes, or structural refactoring tasks.

  • Inputs typically involve specific feature requirements or problem descriptions; outputs include generated test suites, implementation code, and updated coverage reports.

  • Operational constraint: A minimum 80% coverage threshold for branches, functions, and statements is enforced globally.

  • Best practices include utilizing semantic selectors for E2E tests, avoiding testing of internal component states, and prioritizing user-observable behavior over implementation details.

Repository Stats

Stars
250
Forks
27
Open Issues
4
Language
JavaScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 05:41 AM
View on GitHub