factory-tdd

Enforce Red-Green-Refactor cycles and extract test plans from acceptance criteria.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces the Test-Driven Development (TDD) methodology, ensuring that code is only written after a failing test has been created, leading to more robust and reliable software.

Core Features & Use Cases

  • Red-Green-Refactor Cycles: Guides users through the strict TDD cycle of writing a failing test, writing minimal code to pass, and then refactoring.
  • Acceptance Criteria Mapping: Extracts test plans directly from acceptance criteria defined in architectural documents.
  • Use Case: When developing a new user authentication feature, this Skill ensures that every aspect of the authentication logic, from input validation to successful login, is covered by a test before and during implementation.

Quick Start

Use the factory-tdd skill to start a Red-Green-Refactor cycle for the acceptance criteria in factory/architect/architect.md.

Frequently Asked Questions about factory-tdd

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

FAQPage Schema
How do I implement test-driven development using acceptance criteria?

You can implement test-driven development by extracting test plans directly from your acceptance criteria and using them to guide the Red-Green-Refactor cycle. This ensures code is written only after a failing test is created.

What is the Red-Green-Refactor cycle in software development?

The Red-Green-Refactor cycle is a test-driven development process where you write a failing test, create minimal code to pass the test, and then refactor the code. This enforces robust logic and regression prevention.

How do I manage edge cases and regression prevention during refactoring?

You manage edge cases and regression prevention by maintaining strict test cycles during feature development. The test-driven development process ensures existing tests catch regressions when you refactor minimal passing code.

Can I use test-driven development for both new features and bug fixes?

Yes, you can use test-driven development for both new features and bug fixes. The methodology manages test cycles and edge cases universally, ensuring reliable software regardless of the development context.

Do I need architectural documents to start writing tests first?

You need architectural documents containing acceptance criteria to start writing tests first. The test-driven development process extracts test plans directly from these defined criteria to guide the implementation cycle.

Why does writing tests first improve code quality?

Writing tests first improves code quality by enforcing the test-driven development methodology. This ensures every aspect of the logic is covered by a test before implementation, leading to more robust and reliable software.