tdd-workflow

Guide AI agents through the red-green-refactor TDD cycle with atomic commits.

6|3|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Jitsusama/agentic-harness.pi --skill tdd-workflow-jitsusama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/Jitsusama/agentic-harness.pi/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/Jitsusama/agentic-harness.pi --skill tdd-workflow-jitsusama

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides the agent through the Test-Driven Development (TDD) process, ensuring code is written with robust testing from the outset and improving code quality and maintainability.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Enforces the core TDD methodology.
  • Stubbing Guidance: Teaches when and how to create stubs for failing tests.
  • Commit Cadence: Promotes atomic commits for each TDD cycle.
  • Use Case: When developing a new feature, the agent will first write a failing test, then write the minimal code to pass it, and finally refactor the code while ensuring tests remain green.

Quick Start

Use the tdd_phase tool to signal the start of a new TDD cycle, describing the behavior to be tested.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
What is the red-green-refactor cycle in Test-Driven Development?

The red-green-refactor cycle in Test-Driven Development involves writing a failing test, implementing minimal code to pass it, and then refactoring while ensuring tests remain green. This methodology improves code quality and maintainability from the outset.

How do I start a TDD workflow for a new feature?

To start a TDD workflow, signal the beginning of a new cycle using the tdd_phase tool, describing the behavior to be tested. The agent will then guide you through stubbing, writing minimal passing code, and performing an atomic commit.

When do I need stubbing guidance during TDD?

Stubbing guidance during TDD is needed when creating failing tests for new behaviors. It teaches when and how to create stubs for validation, ensuring the test correctly fails for the right reasons before any actual implementation logic is written.

Does this TDD methodology enforce commit cadence?

Yes, this TDD methodology enforces a commit cadence by promoting atomic commits for each completed red-green-refactor cycle. This ensures your development workflow maintains granular, logical version control increments tied directly to test validation.

What's the best way to refactor code while maintaining test coverage?

The best way to refactor code while maintaining test coverage is to follow the TDD cycle: write failing tests, implement minimal passing code, and refactor only while ensuring tests remain green. This prevents regressions during agile development.