tdd-cycle

Guides red-green-refactor test-driven development cycles for feature implementation.

1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/dominionism/Noesis --skill tdd-cycle-dominionism
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-cycle
Source: https://github.com/dominionism/Noesis/tree/main/assets/skills/tdd-cycle
Command: npx skills add https://github.com/dominionism/Noesis --skill tdd-cycle-dominionism

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write code before tests, skip edge cases, or over-engineer implementations. This Skill enforces a disciplined red-green-refactor workflow so every feature is built test-first with minimal, verified code. ## Core Features & Use Cases - Red Phase Enforcement: Requires writing a failing test covering happy paths, edge cases, error conditions, and boundary values before any implementation. - Green Phase Discipline: Restricts implementation to the minimal code needed to pass the test, blocking premature optimization and scope creep. - Refactor Phase with Validation: Applies SOLID and DRY improvements while requiring lint checks and passing tests after every cycle. - Use Case: When implementing a new API endpoint, the Skill walks you through writing a failing test for the endpoint behavior, adding just enough handler code to pass, then refactoring for clarity before moving to the next task. ## Quick Start Ask the AI to implement your next feature using the TDD red-green-refactor cycle, starting with a failing test for the expected behavior.

Frequently Asked Questions about tdd-cycle

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

FAQPage Schema
How do I practice test-driven development step by step?▼

Follow the red-green-refactor cycle: write a failing test for the expected behavior, implement only enough code to make it pass, then refactor for quality while keeping tests green. Repeat this cycle for each small task until the feature is complete.

What should a failing test cover in TDD?▼

A red-phase test should cover the happy path, edge cases, error conditions, and boundary values for the expected behavior. If the test passes immediately, it is not testing new behavior and should be rewritten.

How much code should I write in the green phase of TDD?▼

Write only the minimal code needed to make the failing test pass. Avoid extra features, premature optimization, and nice-to-have additions, since those belong in later cycles or separate tasks.

When should I refactor during test-driven development?▼

Refactor only after tests pass, simplifying code without changing behavior. Apply SOLID principles, remove duplication, improve naming, and confirm all tests still pass plus lint reports zero warnings.

What are the limitations of strict TDD cycles?▼

Strict TDD adds overhead for exploratory prototypes, UI-heavy work, or throwaway scripts where behavior is unclear upfront. It works best for well-defined logic where expected behavior can be expressed as tests.