enforcing-tdd

Enforces predefined scope and RED-GREEN-REFACTOR cycles for coding tasks.

8|2|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/TheMostlyGreat/safeword --skill enforcing-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enforcing-tdd
Source: https://github.com/TheMostlyGreat/safeword/tree/main/.claude/skills/safeword-enforcing-tdd
Command: npx skills add https://github.com/TheMostlyGreat/safeword --skill enforcing-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use this Skill to ensure work starts with a defined scope and failing tests, enforcing RED → GREEN → REFACTOR until acceptance criteria are met.

Core Features & Use Cases

  • Scope-First: Write tests before implementation.
  • RED → GREEN → REFACTOR discipline across features, bugs, and enhancements.
  • Use Case: You’re about to implement a feature; define its scope with tests first to prevent scope creep.

Quick Start

Create a scope with a failing test, then implement just enough code to pass it, and commit.

Frequently Asked Questions about enforcing-tdd

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

FAQPage Schema
How do I prevent scope creep when starting a new feature or bug fix?

Define scope with failing tests before writing implementation code. This RED–GREEN–REFACTOR discipline enforces a bounded task definition, test validation, and acceptance criteria upfront, stopping unbounded feature work at the start.

What is test-driven development and why start with failing tests?

Test-driven development writes test definitions before implementation to clarify requirements and prevent over-building. A failing test proves the feature doesn't exist; passing it proves the fix works and scope is met.

How do I follow the RED–GREEN–REFACTOR cycle in practice?

Document scope and acceptance criteria, write a failing test (RED), implement minimum code to pass it (GREEN), then refactor for quality (REFACTOR). Move through triage and each phase only after criteria validation.

Can I use this workflow for bug fixes and refactors, not just features?

Yes. This Skill enforces scope-first discipline across features, bug fixes, enhancements, and refactors. Each work type begins with a failing test and defined scope before any code changes.

What happens if I skip the test definition phase?

Without upfront test definitions, scope becomes unbounded and implementation drifts from intent. This Skill prevents that by requiring test definitions and a failing test to exist before implementation begins.

Related Skills