developer-test-driven-development

Implements test-driven development workflows using Red-Green-Refactor cycles, BDD scenarios, and mutation testing.

1|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/coreyone/software-maestro --skill developer-test-driven-development-coreyone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: developer-test-driven-development
Source: https://github.com/coreyone/software-maestro/tree/main/skills/developer-test-driven-development
Command: npx skills add https://github.com/coreyone/software-maestro --skill developer-test-driven-development-coreyone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing production code before tests leads to fragile systems, weak assertions, and bugs that escape into production without regression coverage. This Skill enforces a disciplined test-first workflow so every change is backed by failing-then-passing test evidence and quantitative quality gates. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Applies Kent Beck and Uncle Bob's three laws of TDD, requiring a failing test before any production code and minimal code to pass it. - BDD and Property-Based Testing: Translates Gherkin scenarios (Given/When/Then) into executable tests and uses property-based testing or fuzzing to verify invariants across randomized inputs. - Mutation Testing & Quality Gates: Runs mutation testing tools (Stryker, cargo-mutants, PIT) to measure mutant kill rates, plus complexity caps, coverage thresholds, and zero-tolerance static analysis gates. - Use Case: When fixing a production regression, use this Skill to write a failing regression test first, implement the minimal fix, verify the test passes, and add a monitor so the bug class cannot recur. ## Quick Start Ask the agent to fix a bug or implement a feature using test-driven development with a failing test written before any production code.

Frequently Asked Questions about developer-test-driven-development

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

FAQPage Schema
How do I apply test-driven development to a bug fix?▼

Write a failing regression test that reproduces the bug first, then write the minimal production code to make it pass, and refactor while keeping the test green. This Red-Green-Refactor cycle ensures the fix is verified and the bug cannot silently return.

What is mutation testing and why use it?▼

Mutation testing tools like Stryker, cargo-mutants, and PIT inject deliberate faults into green builds to verify tests actually fail when bugs are introduced. A high mutant kill rate proves assertion strength, whereas coverage alone cannot prove tests are meaningful.

Does TDD work with BDD and Gherkin scenarios?▼

Yes, Gherkin scenarios written as Given/When/Then translate directly into executable feature and integration tests. This keeps technical test suites mapped one-to-one with business acceptance criteria.

When should I use property-based testing instead of unit tests?▼

Use property-based testing or fuzzing when verifying invariants that should hold across many inputs, such as parser round-trips. Tools like Hypothesis, Fast-Check, or QuickCheck generate thousands of randomized inputs without prescriptive example lists.

What quality gates must code pass before production?▼

Code must stay under cyclomatic complexity caps (around 10 per function), meet branch coverage thresholds near 85 percent on core logic, pass linters and dependency audits with zero critical findings, and achieve a high mutant kill rate.

When is TDD not the right primary approach?▼

TDD guidance should not be the primary rule set for non-engineering tasks like product positioning, conversion copy, or visual design review. It fits code quality, test design, and performance engineering work.