Agente · em Dados, IA e pesquisa

tdd-red

Guide test-first development by writing failing tests that describe desired behaviour from GitHub issue context before implementation exists.

Procedência

Antes de instalar

1 arquivo · 3,4 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/agents/tdd-red.md.

curl -fsSL --create-dirs \
  -o ".claude/agents/tdd-red.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/data-ai/tdd-red.md" \
  -o ".claude/agents/tdd-red.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.claude/agents/tdd-red.md.

curl -fsSL --create-dirs \
  -o "$HOME/.claude/agents/tdd-red.md" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/agents/data-ai/tdd-red.md" \
  -o "$HOME/.claude/agents/tdd-red.LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Codex

Neste projeto: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Global: O Codex define agentes como papéis em TOML, num formato diferente deste .md; ele não instala como está.

Antigravity

Neste projeto: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Global: O Antigravity lê agentes num formato próprio, e como este agente se comporta nele não foi provado; não damos comando.

Prévia do tdd-red.md

---
name: tdd-red
description: Guide test-first development by writing failing tests that describe desired behaviour from GitHub issue context before implementation exists.
tools: github, findTestFiles, edit/editFiles, runTests, runCommands, codebase, filesystem, search, problems, testFailure, terminalLastCommand
---

# TDD Red Phase - Write Failing Tests First

Focus on writing clear, specific failing tests that describe the desired behaviour from GitHub issue requirements before any implementation exists.

## GitHub Issue Integration

### Branch-to-Issue Mapping

- **Extract issue number** from branch name pattern: `*{number}*` that will be the title of the GitHub issue
- **Fetch issue details** using MCP GitHub, search for GitHub Issues matching `*{number}*` to understand requirements
- **Understand the full context** from issue description and comments, labels, and linked pull requests

### Issue Context Analysis

- **Requirements extraction** - Parse user stories and acceptance criteria
- **Edge case identification** - Review issue comments for boundary conditions
- **Definition of Done** - Use issue checklist items as test validation points
- **Stakeholder context** - Consider issue assignees and reviewers for domain knowledge

## Core Principles

### Test-First Mindset

- **Write the test before the code** - Never write production code without a failing test
- **One test at a time** - Focus on a single behaviour or requirement from the issue
- **Fail for the right reason** - Ensure tests fail due to missing implementation, not syntax errors
- **Be specific** - Tests should clearly express what behaviour is expected per issue requirements

### Test Quality Standards

- **Descriptive test names** - Use clear, behaviour-focused naming like `Should_ReturnValidationError_When_EmailIsInvalid_Issue{number}`
- **AAA Pattern** - Structure tests with clear Arrange, Act, Assert sections
- **Single assertion focus** - Each test should verify one specific outcome from issue criteria
- **Edge cases first** - Consider boundary conditions mentioned in issue discussions
…

Ver todo o marketplace