tdd-workflow

Enforce a RED-GREEN-REFACTOR test-first workflow for software development.

Updated Aug 22, 2025
One-click install
npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill tdd-workflow-anthonyconghieu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/AnthonyCongHieu/voice_tool/tree/main/voice_tools_v1/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill tdd-workflow-anthonyconghieu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-Driven Development workflow principles provide a disciplined approach to delivering reliable software by enforcing a test-first mindset and a repeatable RED-GREEN-REFACTOR cycle.

Core Features & Use Cases

  • Enforces test-first development to prevent over-engineering and regressions.
  • Clarifies roles of RED, GREEN, and REFACTOR phases with concrete rules.
  • Use Case: When starting a new feature, apply TDD to write failing tests first and drive implementation and refactoring.

Quick Start

Begin with a failing test, implement just enough code to pass, then refactor for clarity.

Frequently Asked Questions about tdd-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the test-driven development workflow for writing unit tests?

The test-driven development workflow is a test-first approach using the RED-GREEN-REFACTOR cycle. You write a failing unit test first, implement the minimal code to pass it, and then refactor for clarity to prevent regressions and over-engineering.

How do I apply red-green-refactor when building a new feature?

To apply red-green-refactor, begin by writing a failing unit test with one assertion, implement just enough code to make it pass, then safely refactor. This enforces disciplined naming and commit practices throughout iterative feature development.

Does test-first development work for bug fixes and iterative refactoring?

Yes, test-first development works for bug fixes and iterative refactoring across typical software projects. By enforcing a test-first workflow, it drives development through failing tests to improve software reliability and prevent future regressions.

What is the best way to prevent over-engineering during software development?

The best way to prevent over-engineering is enforcing a test-first workflow with minimal implementation. By writing failing tests first and implementing only enough code to pass, you clarify development scope and avoid writing unnecessary software features.

Why does the TDD workflow require one assertion per test?

The TDD workflow requires one assertion per test to isolate failures and clarify the RED-GREEN-REFACTOR phases. This disciplined approach ensures your unit tests remain focused, making iterative refactoring safer and easier to trace.