← Prompts
Skill / Understand Copilot Instructions Collection

TDD Red Phase - Write Failing Tests First

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

# 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

Sign in to view the full prompt.

Sign In

Classification

Skill Capability with explicit trigger pattern
Skill Understand
Explain or analyze
Scope Project
This codebase
Invoked Called by name -- slash commands, named tools