Tdd Red
GitHubOfficialFirst committed by aaronpowellDistributed by GitHub
- Custom agent
- Workflow
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The TDD Red Phase skill guides developers through the initial stage of Test-Driven Development by focusing on creating failing tests before any production code is written. It integrates directly with GitHub to extract requirements, acceptance criteria, and edge cases from issues, ensuring that every test is tied to a specific business need. The skill enforces a disciplined approach, requiring users to confirm their plan before implementation and ensuring that tests fail for the correct reasons, thereby establishing a solid foundation for the subsequent Green and Refactor phases.
What it does
- Extracts requirements and acceptance criteria from GitHub issues.
- Guides the creation of descriptive, behaviour-focused tests using the AAA pattern.
- Ensures tests fail for the expected reasons before any production code is added.
- Links test cases directly to issue numbers for better traceability.
- Supports multiple programming languages including JavaScript, Python, Java, and C#.
- Prompts for user confirmation before initiating any file changes.
When to use it
- When starting work on a new feature or bug fix tracked in a GitHub issue.
- When you need to ensure your implementation strictly adheres to defined acceptance criteria.
- When you want to practice disciplined Test-Driven Development.
- When you need to identify and cover edge cases discussed in issue comments.
Advantages
- Ensures production code is only written to satisfy a specific, failing test.
- Maintains clear traceability between code changes and project requirements.
- Reduces the risk of missing edge cases by leveraging issue discussion context.
- Promotes clean, testable code through the enforcement of the AAA pattern.
Usage examples
- “I am working on issue #42. Please help me write a failing test for the new validation logic.”
- The agent will fetch issue #42, analyze the requirements, propose a test plan, and then write a failing test case that targets the specific validation logic requested.
- “I need to implement the login retry limit described in issue #105. Start the TDD process.”
- The agent will retrieve the context for issue #105, identify the boundary conditions for retry limits, and generate a failing test that asserts the expected behavior when the limit is exceeded.
Install
Download the custom agent as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/tdd-red/downloadExtract the agent file into .github/agents, then commit it:
mkdir -p .github/agents && unzip -j tdd-red.zip 'tdd-red/tdd-red.agent.md' -d .github/agentsKeep the LICENSE and ATTRIBUTION.md files from the ZIP with your copy.
Documentation by aaronpowell
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 issueFetch issue details using MCP GitHub, search for GitHub Issues matching
*{number}*to understand requirementsUnderstand 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
returnsValidationError_whenEmailIsInvalid_issue{number}(adapt casing to your language convention)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
Test Patterns (Polyglot)
JavaScript/TypeScript: Use Jest or Vitest with
describe/itblocks andexpectassertionsPython: Use pytest with descriptive function names and
assertstatementsJava/Kotlin: Use JUnit 5 with AssertJ for fluent assertions
C#/.NET: Use xUnit or NUnit with FluentAssertions
Apply parameterised/data-driven tests for multiple input scenarios from issue examples
Create shared test utilities for domain-specific validations outlined in issue
Execution Guidelines
Fetch GitHub issue - Extract issue number from branch and retrieve full context
Analyse requirements - Break down issue into testable behaviours
Confirm your plan with the user - Ensure understanding of requirements and edge cases. NEVER start making changes without user confirmation
Write the simplest failing test - Start with the most basic scenario from issue. NEVER write multiple tests at once. You will iterate on RED, GREEN, REFACTOR cycle with one test at a time
Verify the test fails - Run the test to confirm it fails for the expected reason
Link test to issue - Reference issue number in test names and comments
Red Phase Checklist
[ ] GitHub issue context retrieved and analysed
[ ] Test clearly describes expected behaviour from issue requirements
[ ] Test fails for the right reason (missing implementation)
[ ] Test name references issue number and describes behaviour
[ ] Test follows AAA pattern
[ ] Edge cases from issue discussion considered
[ ] No production code written yet
Files
- ATTRIBUTION.mdAdded by AutoGineer862 B
- LICENSELicence file added by AutoGineer1.0 KiB
- tdd-red.agent.md3.8 KiB
Requirements and compatibility
Written for: GitHub Copilot
Works with: GitHub Copilot
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
aaronpowell
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · agents/tdd-red.agent.md · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- aaronpowell, hddevteam
AutoGineer is not affiliated with or endorsed by aaronpowell or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tdd-red.zip