tdd-cycle

Applies t-wada style TDD practices to Red-Green-Refactor cycles with test-list-first planning.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/Hakkadaikon/hymme --skill tdd-cycle-hakkadaikon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-cycle
Source: https://github.com/Hakkadaikon/hymme/tree/main/skills/tdd-cycle
Command: npx skills add https://github.com/Hakkadaikon/hymme --skill tdd-cycle-hakkadaikon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams practicing TDD often run Red-Green-Refactor cycles without systematic coverage, skipping edge cases and error paths, refactoring unsafely, or losing track of which behaviors remain untested. This Skill adds t-wada style discipline on top of the standard TDD cycle so coverage is driven by an explicit test list tied to a T-ID ledger. ## Core Features & Use Cases - Test-list-first planning: Enumerate normal, boundary, and error cases as a checklist before writing any code, with completeness checks against equivalence partitioning, boundary values, and state transitions. - Safe Refactor phase rules: Keep tests green while restructuring code one small step at a time, applying the Rule of Three for deduplication and never changing tests and production code simultaneously. - T-ID ledger integration: Map each Red-Green-Refactor cycle to exactly one ledger item, verify the failure reason matches the item's intent, and close items only when generalized implementation passes. - Use Case: When implementing a new uint parser in TypeScript with vitest, write the test list covering zero, leading zeros, empty input, negative signs, and overflow first, then drive each item through one TDD cycle until the list is empty. ## Quick Start Ask the AI to apply the tdd-cycle skill to plan a test list and drive Red-Green-Refactor cycles for the new feature you are about to implement.

Frequently Asked Questions about tdd-cycle

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

FAQPage Schema
How do I practice TDD with a test list first?

Write a checklist of behaviors to implement before coding, covering normal cases, boundaries, and error cases. Work through one item per Red-Green-Refactor cycle, adding newly discovered cases to the list as you go, and finish when every item is checked off.

How do I refactor safely during TDD without breaking tests?

Refactor only while tests are green, changing one thing at a time and rerunning tests after each step. Never modify tests and production code simultaneously, and revert immediately if a step turns the suite red.

What is the Rule of Three in test-driven development?

The Rule of Three says to tolerate duplication the first two times it appears and only extract shared code on the third occurrence. This pairs with triangulation: once three similar test cases exist, the refactor phase generalizes the fake implementation into real logic.

Can I use TDD on legacy code without existing tests?

This cycle assumes greenfield code. For untested legacy code, first apply characterization testing to pin down current behavior as a safety net, then join the Red-Green-Refactor cycle once that coverage exists.

Why does my TDD test suite miss edge cases?

Missing edge cases usually means the initial test list was written ad hoc and biased toward happy paths. Derive list items systematically using equivalence partitioning, boundary value analysis, and state transition checks so error and boundary cases get equal weight.