tdd-design

Write failing tests first, then implement minimal code to pass.

Updated Mar 12, 2019
One-click install
npx skills add https://github.com/gustavofsantos/dot-files --skill tdd-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-design
Source: https://github.com/gustavofsantos/dot-files/tree/main/skills/tdd-design
Command: npx skills add https://github.com/gustavofsantos/dot-files --skill tdd-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drive implementation using Test-Driven Development as a design tool, not just a testing strategy. Use this skill whenever the user is about to write new production code, implement a function, add a behavior, or fix a bug with a reproducible case.

Core Features & Use Cases

  • Write tests first to capture intent and guide design decisions.
  • Translate behavioral contracts from tests into minimal production code that passes.
  • Refactor confidently after tests pass, preserving behavior.

Quick Start

Write a failing test for the next unimplemented behavior, then implement the minimal code required to pass.

Frequently Asked Questions about tdd-design

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

FAQPage Schema
How do I use TDD to design software instead of just testing it?

Use test-driven development by writing failing tests first to capture intent, translating those behavioral contracts into minimal production code, and refactoring confidently while preserving behavior.

What is the red-green-refactor workflow for writing tests first?

The red-green-refactor workflow involves writing a failing test for unimplemented behavior, implementing minimal code to pass, and refactoring while preserving behavior to drive robust code design.

When should I write tests first instead of writing production code directly?

Write tests first when creating new functionality, implementing a behavior, or fixing a bug with reproducible cases to treat tests as design contracts that guide implementation decisions.

Can I apply contract-based testing when fixing a reproducible bug?

Yes, contract-based testing applies when fixing bugs with reproducible cases by writing a failing test that captures intended behavior, then implementing minimal code to make it pass.

Does test-driven development work without external testing frameworks or dependencies?

Test-driven development works without external testing dependencies by focusing purely on the red-green-refactor workflow to translate behavioral contracts from tests into minimal production code.