tdd-workflow

Apply RED-GREEN-REFACTOR cycles with AAA test patterns for test-driven development.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AnvinX1/med-rag --skill tdd-workflow-anvinx1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/AnvinX1/med-rag/tree/main/medical_genai_app/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/AnvinX1/med-rag --skill tdd-workflow-anvinx1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TDD workflow principles provide a disciplined method for validating software behavior by writing tests before code, reducing defects and improving maintainability.

Core Features & Use Cases

  • Clear RED-GREEN-REFACTOR cycle to guide development.
  • AAA testing pattern guidance (Arrange-Act-Assert) and test-first mindset.
  • Adaptable to unit, integration, and refactoring tasks across projects.

Quick Start

Provide a failing test first, then implement the minimal code to pass the test.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I apply the RED-GREEN-REFACTOR cycle to write unit tests?

To apply the RED-GREEN-REFACTOR cycle for unit testing, you write a failing test first, implement the minimal code required to make it pass, and then refactor the structure while maintaining correct behavior.

What is the AAA testing pattern in test-first development?

The AAA testing pattern in test-first development organizes tests into three distinct phases: Arrange the necessary preconditions and inputs, Act on the test object, and Assert the expected outcomes against the actual results.

How do I start test-driven development for a new software feature?

Start test-driven development by providing a failing unit test that defines the desired behavior, then implement the minimal code to pass that test before repeating the cycle for the next requirement.

Can I use the TDD workflow for both unit and integration testing?

Yes, the TDD workflow can be adapted for both unit and integration testing, providing a structured test-first mindset and repeatable refactoring guidance across various common software engineering tasks within your projects.

What is the best way to structure software development using test-first principles?

The best way to structure development using test-first principles is enforcing a repeatable workflow where tests dictate implementation, reducing defects by ensuring minimal code is written solely to pass structured AAA pattern tests.

When should I not use the test-first development approach?

You should avoid test-first development when exploring rapid prototypes with undefined behavior, as the strict requirement of writing failing tests before minimal implementation adds overhead to highly volatile software refactoring tasks.