tdd-workflow

Guide Test-Driven Development with the RED-GREEN-REFACTOR cycle and AAA pattern.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/devon87warren-afk/eboss-monorepo --skill tdd-workflow-devon87warren-afk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/devon87warren-afk/eboss-monorepo/tree/main/apps/manager/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/devon87warren-afk/eboss-monorepo --skill tdd-workflow-devon87warren-afk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies the principles and practices of Test-Driven Development (TDD) to guide developers in writing cleaner, more robust, and well-tested code.

Core Features & Use Cases

  • TDD Cycle Guidance: Provides a clear breakdown of the RED-GREEN-REFACTOR loop.
  • Principle Enforcement: Details the Three Laws of TDD and best practices for each phase.
  • Pattern Application: Explains the AAA (Arrange, Act, Assert) pattern for test structure.
  • Use Case: A developer starting a new feature can consult this Skill to ensure they are following TDD best practices from the outset, writing tests before implementation and refactoring effectively.

Quick Start

Follow the RED-GREEN-REFACTOR cycle for writing code.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
What is the RED-GREEN-REFACTOR cycle in test-driven development?

The RED-GREEN-REFACTOR cycle in test-driven development is a methodology where you write a failing test (RED), implement minimal code to pass it (GREEN), and then refactor the code for better quality while keeping tests green.

How do I structure tests using the AAA pattern in TDD?

To structure tests using the AAA pattern in TDD, you organize your test code into three distinct sections: Arrange the necessary preconditions and inputs, Act on the behavior being tested, and Assert the expected outcomes against the actual results.

What are the Three Laws of TDD and how do they guide software development?

The Three Laws of TDD are principles that enforce writing tests before implementation, ensuring every piece of software development has test coverage. They guide developers to write no production code without a failing test, maintaining continuous verification and code quality.

When should I apply refactoring techniques in the TDD workflow?

You should apply refactoring techniques in the TDD workflow during the REFACTOR phase, which occurs only after your tests pass in the GREEN phase. This ensures you can safely improve code quality and structure without changing its external behavior or breaking functionality.

Does test-driven development work for refactoring existing software features?

Yes, test-driven development works for refactoring existing software features by first writing tests that capture the current behavior, verifying they pass, and then using the RED-GREEN-REFACTOR cycle to safely improve the underlying code structure.

What is the best way to write minimal code implementation during TDD?

The best way to write minimal code implementation during TDD is to write only enough production code to make the failing test pass in the GREEN phase, deliberately avoiding premature optimization or extra features until the next test requires them.