test-driven-development

Enforce the RED-GREEN-REFACTOR cycle for new features and bug fixes.

6|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/HomericIntelligence/ProjectHephaestus --skill test-driven-development-homericintelligence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/HomericIntelligence/ProjectHephaestus/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/HomericIntelligence/ProjectHephaestus --skill test-driven-development-homericintelligence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often write production code before tests, leading to brittle designs and late defect discovery. This Skill enforces the RED-GREEN-REFACTOR cycle to ensure tests guide implementation and maintain code quality.

Core Features & Use Cases

  • Enforces test-first development by requiring a failing test before any new feature or bugfix.
  • Guides designers and engineers through a repeatable RED-GREEN-REFACTOR loop to improve reliability and maintainability.
  • Useful during feature development, refactoring, and behavior changes, with clear expectations and checks.

Quick Start

Write a failing test for the feature, then iteratively implement production code until the test passes.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce the red-green-refactor cycle for new feature development?

To enforce the red-green-refactor cycle, you must write a failing test before any production code, iteratively implement the feature until the test passes, and then refactor safely to maintain code quality.

Why does writing tests after production code lead to brittle software designs?

Writing tests after production code leads to late defect discovery and brittle designs because tests are retrofitted to existing logic rather than guiding the implementation, reducing reliability and maintainability.

When do I need to use test-first development during bug fixes?

Test-first development is needed during bug fixes to ensure a failing test reproduces the defect before code changes, guiding the fix and verifying behavior changes without introducing regressions.

Can I use test-driven development with my existing CI workflows and project tooling?

Yes, test-driven development aligns with existing project tooling and CI workflows by documenting the testing protocol and guiding when to run tests throughout the feature implementation process.

What is the best way to start test-first development for a software feature?

The best way to start test-first development is to write a failing test for the desired feature, then iteratively implement production code until the test passes, followed by safe refactoring.

Does test-driven development work for behavior changes and refactoring existing code?

Yes, test-driven development is useful during behavior changes and refactoring, guiding engineers through a repeatable loop with clear expectations and checks to safely modify existing code.