tdd-workflow

Orchestrate the RED-GREEN-REFACTOR-COMMIT TDD cycle with REQ-* traceability.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/foolishimp/ai_sdlc_method --skill tdd-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/foolishimp/ai_sdlc_method/tree/main/plugins/code-skills/skills/tdd/tdd-workflow
Command: npx skills add https://github.com/foolishimp/ai_sdlc_method --skill tdd-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest.

What problem does it solve?

Consistently applying the full Test-Driven Development (TDD) cycle with proper traceability can be challenging, requiring careful coordination and adherence to best practices.

Core Features & Use Cases

  • Full TDD Orchestration: Coordinates the entire RED → GREEN → REFACTOR → COMMIT workflow, guiding the AI through each phase.
  • Automated Quality Gates: Ensures tests are written first, pass, and code quality/technical debt are addressed before the final commit.
  • Requirement Traceability: Integrates REQ-* tagging throughout the process for complete lineage from requirement to code.
  • Use Case: To implement a new feature like "User Login" (REQ-ID 'UserLogin'), simply invoke this skill. It will guide the AI through writing failing tests, implementing minimal code, refactoring for quality, and creating a traceable commit.

Quick Start

Start the TDD workflow for REQ-ID 'UserLogin' to implement user authentication functionality.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I implement test-driven development with a complete RED-GREEN-REFACTOR-COMMIT workflow?

Test-driven development orchestrates writing failing tests first (RED), implementing minimal code to pass them (GREEN), improving code quality (REFACTOR), and committing with requirement traceability (COMMIT). This Skill automates that full cycle, enforcing discipline across all four phases while maintaining REQ-* lineage from requirement to code.

Can I use TDD workflow with pytest and git repositories?

Yes. The TDD workflow integrates pytest for test generation and execution, and requires a git repository for traceable commits linked to REQ-* identifiers. It automates quality gates to ensure tests pass and technical debt is addressed before committing.

What prerequisites do I need before starting a TDD workflow?

You need a git repository initialized, pytest installed, and a requirement identifier (REQ-*) that describes the feature to implement. The workflow validates these prerequisites before guiding you through test writing, code implementation, refactoring, and the final commit.

How does requirement traceability work in the TDD cycle?

Requirement traceability embeds REQ-* tags throughout the TDD workflow—from test generation through refactoring to the final commit. This creates complete lineage documentation showing how each code change connects back to the original requirement.

What's the difference between using TDD workflow versus running tests manually?

Manual testing lacks enforced discipline and traceability. TDD workflow coordinates the complete RED-GREEN-REFACTOR-COMMIT sequence, enforces quality gates automatically, ensures tests drive design, and generates traceable commits—eliminating gaps and inconsistency in the development cycle.

When should I use TDD workflow instead of other development approaches?

Use TDD workflow when implementing features that require audit trails, maintaining code quality standards, or working in environments demanding requirement traceability. It's essential for regulated development, team consistency, and preventing technical debt accumulation during feature implementation.