test-driven-development

Enforce the RED-GREEN-REFACTOR cycle for test-driven development.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/sQVe/cape --skill test-driven-development-sqve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/sQVe/cape/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/sQVe/cape --skill test-driven-development-sqve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces the RED-GREEN-REFACTOR cycle to ensure production code is justified by failing tests.

Core Features & Use Cases

  • Guiding the test-first workflow for feature implementation, bug fixes, and verifications with single-behavior-per-cycle discipline.
  • Ensuring tests drive design decisions and guard against regressions through incremental changes.
  • Use case: When adding a new feature, write a failing test first, observe it fail, implement the minimal code to pass, and refactor while keeping tests green.

Quick Start

Write a single failing test for the next behavior, then run cape:test-runner to drive the RED-GREEN-REFACTOR cycle.

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 test-first discipline during feature development?

Test-first discipline is enforced by following the RED-GREEN-REFACTOR cycle, requiring one failing test for a single behavior before writing minimal production code, then refactoring while keeping tests green.

What is the RED-GREEN-REFACTOR workflow for writing reliable code?

The RED-GREEN-REFACTOR workflow ensures reliable code by writing a failing test first, implementing minimal code to pass it, and refactoring safely. It drives design decisions through incremental changes guarded against regressions.

Do I need a test runner to apply TDD cycles for bug fixes?

Yes, you need a test runner like cape:test-runner to apply TDD cycles for bug fixes. The test infrastructure upholds test-first discipline by executing failing tests and verifying safe refactoring.

Can I use this TDD workflow for verifiable logic and feature implementation?

Yes, you can use this TDD workflow for verifiable logic and feature implementation. It guides developers through a single-behavior-per-cycle discipline, ensuring tests drive design decisions and guard against regressions.

What's the best way to start a single-behavior TDD cycle?

The best way to start a single-behavior TDD cycle is to write one failing test for the next behavior, then run a test runner like cape:test-runner to observe the failure before implementing minimal code to pass it.