tdd

Executes test-driven development plans using Red-Green-Refactor cycles and Tidy First principles.

Updated Jul 4, 2023
One-click install
npx skills add https://github.com/kohdice/dotfiles --skill tdd-kohdice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/kohdice/dotfiles/tree/main/config/agents/skills/tdd
Command: npx skills add https://github.com/kohdice/dotfiles --skill tdd-kohdice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It enforces disciplined test-driven development by executing plan files item by item, ensuring every behavior change is driven by a failing test and every structural change is validated against an unchanged test suite. ## Core Features & Use Cases - Plan-Driven Execution: Resolves plan files from the .plans/ directory, finds the next unchecked item, and works through Test:, Test (integration):, and Refactor: items in order. - Red-Green-Refactor Cycle: Writes a failing test, implements the minimum code to pass it, then refactors only when all tests pass, with fast-tier and slow-tier test runs at the right checkpoints. - Living Plan Management: Appends newly discovered test cases to the plan, reports phase completions, and keeps structural and behavioral commits separate. - Use Case: After creating a TDD plan for a new feature, invoke the skill with the plan filename and it implements each test increment, marking checkboxes and suggesting commits per phase. ## Quick Start Ask the AI to run the tdd skill on your plan file, for example by saying: execute the TDD plan in .plans/watch-refresh.md.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I run a TDD plan with this skill?▼

Invoke the skill with a plan filename, such as /tdd watch-refresh.md, and it resolves the file relative to the .plans directory. Without a filename it uses the most recent plan from the current session or asks which existing plan to use.

What is the Red-Green-Refactor cycle in test-driven development?▼

Red writes one failing test for a small behavior increment, Green implements the minimum code to make it pass, and Refactor cleans up structure only while all tests pass. Each phase runs the fast test tier to confirm the expected state.

When should integration tests run during TDD?▼

Integration tests in the slow tier run only when a Test (integration) plan item is current, when a phase or plan completes, or before a commit. Routine checkpoints run only the fast unit-test tier to keep feedback quick.

What happens if a new test passes without any code change?▼

An immediately passing test is treated as a signal, not a success. The skill inspects whether the behavior already exists, in which case the item is marked complete, or whether the test fails to exercise the intended path, in which case the test is fixed.

Can this skill handle refactoring without writing new tests?▼

Yes, standalone refactoring runs Phase 3 on its own with the invariant that all tests pass before and after. Structural changes are validated by comparing identical passing test name sets across both runs, and no tests are added or modified.

What are the limitations of plan-driven TDD execution?▼

The skill does not invent work when a plan is complete and never commits uninvited. Discovered tests must describe observable behavior of the project's own code, and tests for third-party library responsibilities are explicitly excluded.