tdd

Enforce a Red-Green-Refactor cycle with context-isolated subagents for spec-driven code.

21|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/kirillgreen/skills --skill tdd-kirillgreen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/kirillgreen/skills/tree/main/tdd
Command: npx skills add https://github.com/kirillgreen/skills --skill tdd-kirillgreen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the common failure mode where AI agents write tests and implementation simultaneously, leading to rubber-stamp tests that fail to catch bugs or enforce minimal code. It enforces a rigorous, gated workflow that ensures tests are written against a locked specification before any implementation begins.

Core Features & Use Cases

  • Context-Isolated Subagents: Uses separate agents for RED (test writing), GREEN (implementation), and REFACTOR phases to prevent feedback-loop bias.
  • Three-Dimension Verification: Validates every cycle for Completeness, Traceability, and Coherence, with severity-tiered findings.
  • Spec-Defect Escape Hatch: Automatically halts the pipeline if the specification is found to be contradictory or unimplementable, preventing the encoding of bugs into the codebase.
  • Use Case: Use this when building new features where high reliability is required, such as payment logic, authentication flows, or complex data transformations.

Quick Start

Invoke the tdd skill to implement a new feature by typing /tdd followed by your feature requirement.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is strict spec-driven test-driven development and why use it for new features?

Strict spec-driven test-driven development (TDD) enforces a rigorous Red-Green-Refactor cycle to ensure high-quality implementation. It prevents AI agents from writing tests and code simultaneously, avoiding rubber-stamp tests that fail to catch bugs in complex new features.

How do I prevent AI from writing tests and implementation code at the same time?

To prevent AI from writing tests and implementation simultaneously, use a gated workflow with context-isolated subagents. This enforces strict separation where tests are written against a locked specification before any implementation begins, eliminating feedback-loop bias.

Do I need a specific test framework to enforce automated Red-Green-Refactor cycles?

Yes, enforcing automated Red-Green-Refactor cycles requires a supported test framework. You also need a structured specification to verify completeness, traceability, and coherence across all development phases.

What is the best way to implement TDD for high-reliability features like payment logic?

The best way to implement TDD for high-reliability features like payment logic is using context-isolated subagents for each phase. This approach validates every cycle for completeness and traceability, preventing regression in critical authentication flows or data transformations.

What happens if a specification is contradictory during spec-driven development?

If a specification is contradictory or unimplementable, a spec-defect escape hatch automatically halts the development pipeline. This prevents encoding bugs into the codebase by stopping implementation before errors propagate through the workflow.

When should I avoid using isolated subagents for test-driven development?

You should avoid using isolated subagents for test-driven development when you lack a structured specification or a supported test framework. This gated workflow is designed for new feature development requiring rigorous test coverage and spec-defect detection rather than rapid prototyping.