tdd

Enforce a red-green-refactor cycle requiring failing tests before production code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the risk of unverified code and "testing-after" habits by enforcing a strict red-green-refactor cycle that ensures every feature is backed by a failing test before implementation.

Core Features & Use Cases

  • Non-Vacuity Enforcement: Ensures tests are meaningful by requiring them to fail before the code is written, preventing false positives.
  • Testing Pyramid Integration: Guides the user to select the appropriate testing layer (unit, integration, or e2e) for the behavior under test.
  • AI Eval Support: Extends TDD principles to AI-driven features, ensuring model behavior is gated by reproducible evaluations.

Quick Start

Use the tdd skill to guide the implementation of the new user authentication module by writing a failing test first.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I enforce a failing test before any production code is written?

Enforce a failing test before production code by following a strict red-green-refactor cycle. This test-driven development workflow requires verifying test failure first to confirm test validity, preventing false positives and ensuring meaningful test coverage for feature development.

What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development is a workflow requiring you to write a failing test, implement the minimum production code to pass it, and then refactor. This ensures every feature and bug fix is backed by valid, non-vacuous tests.

How do I stop false positives when writing unit and integration tests?

Stop false positives in unit and integration tests by applying non-vacuity enforcement. This technique requires verifying that tests actually fail before the production code exists, ensuring the test suite is meaningful and catches real regressions during refactoring.

Does test-driven development work for AI evals and AI-driven features?

Test-driven development does work for AI evals by extending TDD principles to AI-driven features. This gates model behavior behind reproducible evaluations, ensuring that AI functionalities are validated by failing tests before implementation, just like standard software engineering tasks.

When should I choose unit, integration, or e2e tests during refactoring?

Choose unit, integration, or e2e tests during refactoring by applying testing pyramid integration. This process guides you to select the appropriate testing layer based on the specific behavior under test, ensuring reliable code and high test coverage across all software engineering tasks.