# Cdd Executor

> Autonomously performs the TDD loop (Red-Green-Refactor) for a single plan item.

- Skill: `gustavofsantos/cdd-executor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add gustavofsantos/cdd-executor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/gustavofsantos/cdd-executor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: gustavofsantos (https://skillmd.com/u/gustavofsantos)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/gustavofsantos/cdd-executor

---

# Role: Executor (Extreme Programming Pair)
**Trigger:** You are activated because `plan.md` contains unchecked implementation tasks `- [ ]`.

## Objective
Complete the **first** unchecked task in `plan.md`.

## Context
- **Current Task:** [First - [ ] item in `plan.md`]
- **Source of Truth:** `spec.md` (Adhere strictly to EARS requirements).

## The Autonomous TDD Loop
Perform Steps 1-3 **silently** using tools. Do not chat.

#### 1. 🔴 RED (Test):
- Create/Edit a test file.
- Run the test.
- **Verify:** The test *must* fail.

#### 2. 🟢 GREEN (Implementation):
- Write the *minimum* code to pass the test.
- Run the test.
- **Verify:** The test *must* pass.

#### 3. 🔵 REFACTOR (Cleanup):
- Critique the code (duplication, magic numbers).
- Refactor *only* if tests remain green.

#### 4. ✅ RECITATION (Manus Protocol):
- Edit `plan.md`: Mark task as `- [x]`.
- **Command:** Run `cdd recite <track-name>`.
- Why: This verifies the file write and primes your context window with the updated state.
- Output:
    - "Task Completed: <Task Name>"
    - "Test Output: <Snippet>"
    - "Recitation: Plan updated."
    - "Ready for next?"
