con un clic
tdd-workflow
Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
[WHAT] Standalone alignment auditor for north-star drift. [HOW] Scans codebase state, compares to canonical docs, classifies drift, proposes corrections. [WHEN] Use only for explicit deep-dive alignment audits. [WHY] Default alignment should run inside `work`; this remains for focused audit sessions. Triggers: "align lev", "check north star", "what's our direction", "audit alignment", "detect drift", "product pivot"
[WHAT] Builder workflow for developing `~/lev` and migrating proven work to core paths. [HOW] Assess existing code, run prior art checks, decide placement against `~/lev/docs`, apply patches, validate E2E. [WHEN] Use when formalizing POCs, placing modules, or migrating workshop output into production architecture. [WHY] Prevents drift and duplicate effort by enforcing file-based routing and docs-aligned placement. Triggers: "build feature", "migrate poc", "where should this go", "prior art check", "placement decision", "formalize"
Agentic UX design language and pattern library. Establishes CLI-as-Prompt paradigm where every CLI output is a prompt to the next agent. Includes Enriched Response Protocol, vernacular (Self-Injection, Teachable Touch, Bi-Directional), and implementation patterns for validation gates and trust calibration.
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Agent-human interaction protocol for AI agents. Use when agents need human approvals, selections, research direction, or async feedback. Triggers on "human in the loop", "approval", "agent interaction", "get human input", or "wait for response".
Think and reason like a software architect. Analyze systems through quality attributes, trade-off analysis, and architectural drivers. Use for system design, tech selection, ADRs, architecture reviews, C4 descriptions, fitness functions, and PR review. Triggers: "architect this", "design system", "architecture review", "ADR", "trade-off analysis", "quality attributes", "fitness functions", "C4 diagram", "system design", "review PR", "review this", "/review".
| name | tdd-workflow |
| description | Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle. |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
Write tests first, code second.
🔴 RED → Write failing test
↓
🟢 GREEN → Write minimal code to pass
↓
🔵 REFACTOR → Improve code quality
↓
Repeat...
| Focus | Example |
|---|---|
| Behavior | "should add two numbers" |
| Edge cases | "should handle empty input" |
| Error states | "should throw for invalid data" |
| Principle | Meaning |
|---|---|
| YAGNI | You Aren't Gonna Need It |
| Simplest thing | Write the minimum to pass |
| No optimization | Just make it work |
| Area | Action |
|---|---|
| Duplication | Extract common code |
| Naming | Make intent clear |
| Structure | Improve organization |
| Complexity | Simplify logic |
Every test follows:
| Step | Purpose |
|---|---|
| Arrange | Set up test data |
| Act | Execute code under test |
| Assert | Verify expected outcome |
| Scenario | TDD Value |
|---|---|
| New feature | High |
| Bug fix | High (write test first) |
| Complex logic | High |
| Exploratory | Low (spike, then TDD) |
| UI layout | Low |
| Priority | Test Type |
|---|---|
| 1 | Happy path |
| 2 | Error cases |
| 3 | Edge cases |
| 4 | Performance |
| ❌ Don't | ✅ Do |
|---|---|
| Skip the RED phase | Watch test fail first |
| Write tests after | Write tests before |
| Over-engineer initial | Keep it simple |
| Multiple asserts | One behavior per test |
| Test implementation | Test behavior |
| Agent | Role |
|---|---|
| Agent A | Write failing tests (RED) |
| Agent B | Implement to pass (GREEN) |
| Agent C | Optimize (REFACTOR) |
Remember: The test is the specification. If you can't write a test, you don't understand the requirement.
These techniques improve reliability by making intent, inputs, outputs, and fallback paths explicit. Keep this section concise and additive so existing domain guidance remains primary.
You are the prompt-architect-enhanced specialist for tdd-workflow, responsible for deterministic execution of this skill's guidance while preserving existing workflow and constraints.