Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# TDD Workflow
> Write tests first, code second.
---
## 1. The TDD Cycle
```
🔴 RED → Write failing test
↓
🟢 GREEN → Write minimal code to pass
↓
🔵 REFACTOR → Improve code quality
↓
Repeat...
```
---
## 2. The Three Laws of TDD
1. Write production code only to make a failing test pass
2. Write only enough test to demonstrate failure
3. Write only enough code to make the test pass
---
## 3. RED Phase Principles
### What to Write
| Focus | Example |
|-------|---------|
| Behavior | "should add two numbers" |
| Edge cases | "should handle empty input" |
| Error states | "should throw for invalid data" |
### RED Phase Rules
- Test must fail first
- Test name describes expected behavior
- One assertion per test (ideally)
---
## 4. GREEN Phase Principles
### Minimum Code
| Principle | Meaning |
|-----------|---------|
| **YAGNI** | You Aren't Gonna Need It |
| **Simplest thing** | Write the minimum to pass |
| **No optimization** | Just make it work |
### GREEN Phase Rules
- Don't write unneeded code
- Don't optimize yet
- Pass the test, nothing more
---
## 5. REFACTOR Phase Principles
### What to Improve
| Area | Action |
|------|--------|
…
The line at the top of this page pins the label git:20260502.38d5305, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_wb5iq5ywyw2as4hb
GET https://markdownregistry.com/api/v1/resolve?ref=vodailocz/kilo-kit-mcp/tdd-workflow
GET https://markdownregistry.com/api/v1/blob/b8fceb81c0967e5beadb7a89e80bc6b199c5c203fb34de50514ba9742d530157
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
vodailocz/kilo-kit-mcp · skills/agent-frameworks/agent-memory/SKILL.md · Use when implementing or managing persistent, hierarchical memory systems for AI agents. Covers cross-session state…
vodailocz/kilo-kit-mcp · skills/agent-frameworks/mcp-agent-patterns/SKILL.md · Use when integrating or optimizing Model Context Protocol (MCP) servers and clients. Keywords: MCP, Model Context…
vodailocz/kilo-kit-mcp · skills/agent-frameworks/workflow-state-machines/SKILL.md · Use when designing, implementing, or debugging complex agentic workflows using state machine patterns. Keywords: state…
vodailocz/kilo-kit-mcp · skills/ai-media/ai-multimodal/SKILL.md · Process and generate multimedia content using Google Gemini API. Capabilities include analyze audio files…
vodailocz/kilo-kit-mcp · skills/ai-media/screenshot/SKILL.md · Use when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel…
affaan-m/ecc · .agents/skills/tdd-workflow/SKILL.md · Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+…
affaan-m/ecc · docs/es/skills/tdd-workflow/SKILL.md · Usar este skill al escribir nuevas funcionalidades, corregir bugs o refactorizar código. Aplica el desarrollo guiado…
affaan-m/ecc · .kiro/skills/tdd-workflow/SKILL.md · Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+…
travisjneuman/.claude · skills/tdd-workflow/SKILL.md · Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle. Use only when the user explicitly asks for…
naimkatiman/continuous-improvement · plugins/continuous-improvement/skills/tdd-workflow/SKILL.md · Enforces Law 3 (One Thing at a Time) and Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Use this…
harshadmadaye/opm · skills/tdd-workflow/SKILL.md · Drives test-driven development through a strict RED-GREEN-REFACTOR cycle with test-runner detection, a "fails for the…