Skip to content
Back to skills

Test Driven Development

ASecurity

Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit code evidence mandatory.

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 29, 2026
ai-agentsgobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add a5c-ai/babysitter --skill test-driven-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Driven Development?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Driven Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-test-driven-development/badge)](https://www.skillsdirectory.com/skills/a5c-ai-test-driven-development)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-driven-development
description: Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit code evidence mandatory.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
---

# Test-Driven Development

## Overview

Enforces the TDD discipline in all CC10X BUILD workflows. The RED-GREEN-REFACTOR cycle is mandatory and cannot be skipped or deferred.

## TDD Cycle

1. **RED**: Write failing test first. Run with `CI=true npm test` or `--run` flag. Exit code MUST be 1.
2. **GREEN**: Write minimal code to make test pass. Exit code MUST be 0.
3. **REFACTOR**: Clean up implementation while keeping tests green. Exit code MUST remain 0.

## Non-Negotiable Rules

- Always use run mode (`CI=true npm test` or `--run` flag)
- NEVER use watch mode (prevents hanging processes)
- Use timeout guards (`timeout 60s`) as backup
- Record exit codes as evidence at each phase
- If tests fail 3 consecutive times in GREEN, report failure status
- Never skip RED phase (failing test must exist before implementation)
- Never defer tests to "later" -- TDD means tests first

## Scope Discipline

- If implementation requires >3 file changes, flag for scope review
- Architectural choices require user approval unless pre-approved in plan
- New dependencies require user approval

## When to Use

- Every feature implementation in BUILD workflow
- Every bug fix in DEBUG workflow (regression test)

## Agents Used

- `component-builder` (primary consumer)
- `bug-investigator` (regression tests)

Files in this skill

  • README.md261 B
  • SKILL.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…