con un clic
self-improvement
Instructions for adjusting outside-in-tdd skills and agents
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ú
Instructions for adjusting outside-in-tdd skills and agents
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
Implementation conventions for backend API routes and lib utilities. Loaded by tdd-implementer when the layer is backend.
Write Cypress end-to-end tests for business processes and cross-cutting infrastructure. Use for testing complete business workflows, authentication flows, and UI state verification.
Implementation conventions for frontend React components, hooks, and pages. Loaded by tdd-implementer when the layer is frontend.
Write Jest backend tests for Next.js API routes following established patterns. Use for testing API handlers, lib utilities, and backend logic.
Write Jest frontend tests for React components and hooks using React Testing Library. Use for testing pages, components, and custom hooks.
Outside-In TDD starting from E2E tests, drilling down to unit tests. Auto-triggers for new features. Trigger phrases include "implement", "add feature", "build", "create functionality". Does NOT trigger for bug fixes, documentation, or configuration changes.
| name | self-improvement |
| description | Instructions for adjusting outside-in-tdd skills and agents |
The outside-in-tdd workflow is split into two layers:
Generic Framework (reusable across projects):
.claude/agents/) — Process definitions for how each TDD phase agent behaves. Reference the registry for project-specific config..claude/agents/*-contract.md) — Data shape definitions for what flows between agents. Define WHAT data, never HOW to use it..claude/skills/outside-in-tdd/skill.md) — Workflow coordination across phases. References the registry for layers, commands, and routing.Project-Specific Extensions (per-project):
.claude/tdd-registry.md) — The plug-in mechanism. Maps layers to skills, defines test commands, failure routing, mutation config, layer dependencies, and file path → layer mapping..claude/business-processes.md) — Domain processes (Value, Personas, Steps) and user personas. The planner matches features to processes; the orchestrator adds new ones..claude/infrastructure.md) — Docker debugging, Prisma commands, cache management. Loaded on demand by agents.How layers are added: Create testing skill + implementation skill (optional), register both in the registry's Layers table, add file path mappings and failure routing entries.
Agent definitions (.claude/agents/ files not ending in -contract.md) define process behavior. They reference the registry to discover project-specific config. Common workflow behavior lives in agents; project-specific patterns live in skills loaded via the registry.
Skills (.claude/skills/) are project-specific instructions for specific tasks. Testing skills and implementation skills are separate — different agents load different skills to avoid context bloat.
Contracts (*-contract.md in .claude/agents/) define WHAT data flows between agents. HOW to populate the data lives in the orchestrator's field mapping tables. HOW to use the data lives in the agent definition.
Orchestrator: outside-in-tdd/skill.md
│
├─ Phase 1: PLAN
│ └─ tdd-planner → explores codebase, produces implementation plan with target files + batch
│ (spawns Explore agents internally)
│
├─ Phase 2: E2E TEST (conditional — skipped for single-unit changes)
│ └─ tdd-test-writer (layer: e2e) → writes failing E2E test
│ loads testing skill from registry (e.g., cypress-end-to-end-testing)
│
├─ Phase 3: INNER CYCLES (repeat until feature-complete test passes)
│ ├─ 3b RED: tdd-test-writer (layer from registry)
│ │ loads testing skill from registry
│ ├─ 3c GREEN: tdd-implementer → implements until tests pass
│ │ loads implementation skill from registry (if one exists for the layer)
│ └─ 3d REFACTOR: tdd-refactorer → evaluates and improves code quality
│ loads testing skill from registry
│
└─ Phase 4: COMPLETION
├─ 4a Full verification (command from registry) — may invoke tdd-test-writer in adjustment mode
└─ 4b Mutation gate (command from registry) — may invoke test-backfiller agents in parallel
Key files per agent:
| Agent | Definition | Contract |
|---|---|---|
| Orchestrator | .claude/skills/outside-in-tdd/skill.md | — |
| Planner | .claude/agents/tdd-planner.md | .claude/agents/tdd-planner-contract.md |
| Test Writer | .claude/agents/tdd-test-writer.md | .claude/agents/tdd-test-writer-contract.md |
| Implementer | .claude/agents/tdd-implementer.md | .claude/agents/tdd-implementer-contract.md |
| Refactorer | .claude/agents/tdd-refactorer.md | .claude/agents/tdd-refactorer-contract.md |
| Test Backfiller | .claude/agents/test-backfiller.md | .claude/agents/test-backfiller-contract.md |
Shared files:
.claude/agents/debug-protocol.md — Debug mode return format, referenced by all agents.claude/infrastructure.md. Layer config → registry.