tdd-workflow

Enforce the RED-GREEN-REFACTOR cycle with an 80% coverage gate for Python pytest projects.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/a2mus/ecc-antigravity --skill tdd-workflow-a2mus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/a2mus/ecc-antigravity/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/a2mus/ecc-antigravity --skill tdd-workflow-a2mus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-Driven Development workflow that enforces the RED → GREEN → REFACTOR cycle with an 80% coverage gate, ensuring code is designed around tests and quality.

Core Features & Use Cases

  • Enforces the RED → GREEN → REFACTOR cycle to keep code robust and maintainable.
  • Encourages writing tests before implementation to clearly define contracts and expectations.
  • Validates test coverage thresholds (≥80%) to prevent regressions across features and fixes.

Quick Start

First write a failing test that defines the desired behavior, then implement just enough code to pass it and finally refactor while keeping all tests green.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce a strict test-driven development workflow in Python?▼

Enforce test-driven development by following the red, green, refactor cycle with pytest. Write a failing test first, implement minimal code to pass it, then refactor safely while keeping all tests green.

How does the red green refactor cycle guide code implementation?▼

The red green refactor cycle guides implementation by requiring a failing test first, adding just enough code to pass it, and then refactoring while tests stay green, ensuring code is designed around tests and quality.

How do I maintain test coverage thresholds during refactoring?▼

Maintain test coverage thresholds by enforcing an 80 percent coverage gate during the refactor stage. This ensures all features and fixes meet coverage requirements to prevent regressions across the project.

Can I use this TDD workflow for bug fixes and refactoring existing Python code?▼

Yes, this TDD workflow is applicable to every new feature, bug fix, or refactor in Python projects. It uses pytest to ensure tests guide implementation and meet coverage gates for existing code.

What is the best way to start writing tests before implementation?▼

Start writing tests before implementation by defining a failing test that clearly specifies the desired behavior and contract. Then implement just enough code to pass the test and finally refactor safely.