incremental-tdd

Enforce one failing test at a time in the Red-Green-Refactor cycle.

1|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/zgagnon/skills --skill incremental-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: incremental-tdd
Source: https://github.com/zgagnon/skills/tree/main/incremental-tdd
Command: npx skills add https://github.com/zgagnon/skills --skill incremental-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a strict, incremental approach to Test-Driven Development (TDD), preventing the common pitfall of writing multiple tests at once, which undermines the design discovery benefits of TDD.

Core Features & Use Cases

  • Enforces Single Failing Test: Guides the user to write only one failing test at a time.
  • Integrates Refactoring & ADR Review: Incorporates code quality checks and Architecture Decision Record (ADR) compliance within the refactoring phase.
  • Prevents Batch Testing: Actively counters rationalizations for writing multiple tests upfront.
  • Use Case: When implementing a new feature, this skill ensures you follow the "Red, Green, Refactor" cycle precisely, writing one test, making it pass, and then evaluating the design before proceeding to the next test.

Quick Start

Use the incremental-tdd skill to guide the TDD process for a new feature.

Frequently Asked Questions about incremental-tdd

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

FAQPage Schema
How do I enforce writing only one failing test at a time during TDD?

To stop writing multiple tests upfront in TDD, you enforce a strict incremental cycle of writing one failing test, making it pass, and refactoring. This actively counters rationalizations for batch testing that undermine incremental design discovery.

What is the best way to integrate ADR compliance checks during code refactoring?

Integrating ADR compliance during code refactoring involves evaluating your code quality against Architecture Decision Records immediately after the Green phase. This ensures your incremental design adjustments align with established architectural decisions before proceeding to the next test.

Why does writing multiple tests at once defeat the purpose of Test-Driven Development?

Writing multiple tests at once defeats Test-Driven Development because it skips the incremental design discovery process. Batch testing prevents you from evaluating and evolving the architecture after each individual test passes, locking in premature design choices.

How do I follow the Red Green Refactor cycle without skipping steps?

Following the Red Green Refactor cycle strictly requires writing one failing test, implementing the minimum code to make it pass, and then refactoring with ADR compliance checks. This disciplined repetition prevents common rationalizations that defeat incremental TDD.

When should I evaluate architectural decisions during the TDD process?

You should evaluate architectural decisions during the Refactor phase of the TDD process. After making a single failing test pass, incorporate Architecture Decision Record compliance checks to ensure your code quality and design meet established guidelines.