mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 17:47:16 +00:00
feat: Add comprehensive TDD support to agents
- Add new tdd-orchestrator agent for managing complete TDD workflows - Enhance test-automator with dedicated TDD capabilities and metrics - Add TDD excellence section with red-green-refactor cycle automation - Include support for Chicago and London TDD schools - Add property-based TDD approaches and BDD integration - Include TDD cycle metrics tracking and compliance monitoring - Update README with new agent and TDD examples - Add comprehensive TDD usage examples and documentation This enhancement provides full TDD orchestration capabilities across the agent collection, enabling test-first development with automated cycle management, metrics tracking, and multi-agent coordination. Addresses issue #64: TDD workflow support
This commit is contained in:
12
README.md
12
README.md
@@ -35,7 +35,7 @@ A comprehensive collection of specialized AI subagents for [Claude Code](https:/
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This repository contains **77 expert-level subagents** that extend Claude Code's capabilities with deep, specialized knowledge across all areas of software development and business operations. Each subagent has been comprehensively enhanced with:
|
This repository contains **78 expert-level subagents** that extend Claude Code's capabilities with deep, specialized knowledge across all areas of software development and business operations. Each subagent has been comprehensively enhanced with:
|
||||||
|
|
||||||
- **2024/2025 Best Practices** - Latest tools, frameworks, and industry standards
|
- **2024/2025 Best Practices** - Latest tools, frameworks, and industry standards
|
||||||
- **Production-Ready Knowledge** - Real-world scenarios and enterprise patterns
|
- **Production-Ready Knowledge** - Real-world scenarios and enterprise patterns
|
||||||
@@ -91,6 +91,7 @@ This repository contains **77 expert-level subagents** that extend Claude Code's
|
|||||||
- **[code-reviewer](code-reviewer.md)** - Expert code review with deep configuration security focus and production reliability
|
- **[code-reviewer](code-reviewer.md)** - Expert code review with deep configuration security focus and production reliability
|
||||||
- **[security-auditor](security-auditor.md)** - Review code for vulnerabilities and ensure OWASP compliance
|
- **[security-auditor](security-auditor.md)** - Review code for vulnerabilities and ensure OWASP compliance
|
||||||
- **[test-automator](test-automator.md)** - Create comprehensive test suites with unit, integration, and e2e tests
|
- **[test-automator](test-automator.md)** - Create comprehensive test suites with unit, integration, and e2e tests
|
||||||
|
- **[tdd-orchestrator](tdd-orchestrator.md)** - Guide Test-Driven Development cycles with red-green-refactor methodology
|
||||||
- **[performance-engineer](performance-engineer.md)** - Profile applications, optimize bottlenecks, and implement caching strategies
|
- **[performance-engineer](performance-engineer.md)** - Profile applications, optimize bottlenecks, and implement caching strategies
|
||||||
- **[debugger](debugger.md)** - Debugging specialist for errors, test failures, and unexpected behavior
|
- **[debugger](debugger.md)** - Debugging specialist for errors, test failures, and unexpected behavior
|
||||||
- **[error-detective](error-detective.md)** - Search logs and codebases for error patterns, stack traces, and anomalies
|
- **[error-detective](error-detective.md)** - Search logs and codebases for error patterns, stack traces, and anomalies
|
||||||
@@ -140,7 +141,7 @@ This repository contains **77 expert-level subagents** that extend Claude Code's
|
|||||||
|
|
||||||
## Model Assignments
|
## Model Assignments
|
||||||
|
|
||||||
All 76 subagents are configured with specific Claude models based on task complexity:
|
All 77 subagents are configured with specific Claude models based on task complexity:
|
||||||
|
|
||||||
### 🚀 Haiku (Fast & Cost-Effective) - 11 agents
|
### 🚀 Haiku (Fast & Cost-Effective) - 11 agents
|
||||||
**Model:** `haiku`
|
**Model:** `haiku`
|
||||||
@@ -156,7 +157,7 @@ All 76 subagents are configured with specific Claude models based on task comple
|
|||||||
- `seo-cannibalization-detector` - Keyword overlap detection
|
- `seo-cannibalization-detector` - Keyword overlap detection
|
||||||
- `seo-content-planner` - Content calendars and topic clusters
|
- `seo-content-planner` - Content calendars and topic clusters
|
||||||
|
|
||||||
### ⚡ Sonnet (Balanced Performance) - 45 agents
|
### ⚡ Sonnet (Balanced Performance) - 46 agents
|
||||||
**Model:** `sonnet`
|
**Model:** `sonnet`
|
||||||
|
|
||||||
**Development & Languages:**
|
**Development & Languages:**
|
||||||
@@ -203,6 +204,7 @@ All 76 subagents are configured with specific Claude models based on task comple
|
|||||||
|
|
||||||
**Quality & AI/ML:**
|
**Quality & AI/ML:**
|
||||||
- `test-automator` - AI-powered testing with self-healing frameworks
|
- `test-automator` - AI-powered testing with self-healing frameworks
|
||||||
|
- `tdd-orchestrator` - Test-Driven Development cycle orchestration
|
||||||
- `code-reviewer` - Expert code analysis with modern security scanning
|
- `code-reviewer` - Expert code analysis with modern security scanning
|
||||||
- `ai-engineer` - Advanced LLM integration with RAG and agent systems
|
- `ai-engineer` - Advanced LLM integration with RAG and agent systems
|
||||||
- `ml-engineer` - Production ML with modern frameworks and monitoring
|
- `ml-engineer` - Production ML with modern frameworks and monitoring
|
||||||
@@ -243,7 +245,7 @@ All 76 subagents are configured with specific Claude models based on task comple
|
|||||||
**Model Optimization:**
|
**Model Optimization:**
|
||||||
Agents are strategically assigned models based on task complexity:
|
Agents are strategically assigned models based on task complexity:
|
||||||
- **Opus (21)**: Complex reasoning, critical analysis, architecture
|
- **Opus (21)**: Complex reasoning, critical analysis, architecture
|
||||||
- **Sonnet (45)**: Balanced development and specialized tasks
|
- **Sonnet (46)**: Balanced development and specialized tasks
|
||||||
- **Haiku (11)**: Fast, focused utility tasks
|
- **Haiku (11)**: Fast, focused utility tasks
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@@ -276,6 +278,7 @@ Mention the subagent by name in your request:
|
|||||||
"Use code-reviewer to analyze this component for best practices"
|
"Use code-reviewer to analyze this component for best practices"
|
||||||
"Have code-reviewer scrutinize these configuration changes"
|
"Have code-reviewer scrutinize these configuration changes"
|
||||||
"Have security-auditor check for OWASP compliance issues"
|
"Have security-auditor check for OWASP compliance issues"
|
||||||
|
"Use tdd-orchestrator to implement new feature with test-first approach"
|
||||||
|
|
||||||
# Development tasks
|
# Development tasks
|
||||||
"Get backend-architect to design a user authentication API"
|
"Get backend-architect to design a user authentication API"
|
||||||
@@ -460,6 +463,7 @@ payment-integration → security-auditor → Validated implementation
|
|||||||
### 🧪 Quality Assurance
|
### 🧪 Quality Assurance
|
||||||
- **code-reviewer**: Code quality, configuration security, production reliability
|
- **code-reviewer**: Code quality, configuration security, production reliability
|
||||||
- **test-automator**: Test strategy, test suite creation
|
- **test-automator**: Test strategy, test suite creation
|
||||||
|
- **tdd-orchestrator**: Test-Driven Development cycles, red-green-refactor methodology
|
||||||
- **debugger**: Bug investigation, error resolution
|
- **debugger**: Bug investigation, error resolution
|
||||||
- **error-detective**: Log analysis, error pattern recognition, root cause analysis
|
- **error-detective**: Log analysis, error pattern recognition, root cause analysis
|
||||||
- **search-specialist**: Deep web research, competitive analysis, fact-checking
|
- **search-specialist**: Deep web research, competitive analysis, fact-checking
|
||||||
|
|||||||
404
examples/tdd-usage.md
Normal file
404
examples/tdd-usage.md
Normal file
@@ -0,0 +1,404 @@
|
|||||||
|
# TDD Agent Usage Examples
|
||||||
|
|
||||||
|
This document demonstrates how to use the TDD-related agents in Claude Code for test-driven development workflows.
|
||||||
|
|
||||||
|
## TDD Orchestrator Agent
|
||||||
|
|
||||||
|
The `tdd-orchestrator` agent manages the complete TDD workflow, coordinating between multiple specialized agents.
|
||||||
|
|
||||||
|
### Basic Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Invoke TDD orchestrator for a new feature
|
||||||
|
Use the Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Implement user authentication with TDD approach using JWT tokens"
|
||||||
|
|
||||||
|
# The orchestrator will:
|
||||||
|
# 1. Analyze requirements and design test strategy
|
||||||
|
# 2. Coordinate with test-automator for test creation
|
||||||
|
# 3. Manage the red-green-refactor cycle
|
||||||
|
# 4. Track metrics and ensure TDD compliance
|
||||||
|
```
|
||||||
|
|
||||||
|
### Advanced Orchestration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Multi-team TDD coordination
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Coordinate TDD workflow across frontend, backend, and mobile teams for shopping cart feature"
|
||||||
|
|
||||||
|
# Property-based TDD
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Implement sort algorithm using property-based TDD with invariant checking"
|
||||||
|
|
||||||
|
# Legacy code TDD
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Add tests to legacy PaymentProcessor class before refactoring, using characterization tests"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Test Automator with TDD Capabilities
|
||||||
|
|
||||||
|
The enhanced `test-automator` agent now includes comprehensive TDD support.
|
||||||
|
|
||||||
|
### Test-First Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate failing tests first
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Generate comprehensive failing tests for user registration with email verification. Ensure tests fail for the right reasons."
|
||||||
|
|
||||||
|
# Incremental test development
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Create incremental test suite for shopping cart: start with add item, then remove, then calculate total"
|
||||||
|
|
||||||
|
# Property-based TDD tests
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Generate property-based tests for string utilities library using hypothesis/fast-check"
|
||||||
|
```
|
||||||
|
|
||||||
|
### TDD Metrics and Compliance
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Track TDD metrics
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Analyze codebase and generate TDD compliance report: test-first percentage, cycle times, refactoring frequency"
|
||||||
|
|
||||||
|
# Verify TDD discipline
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Check if recent commits followed TDD: tests written before implementation"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Language-Specific TDD Examples
|
||||||
|
|
||||||
|
### Python TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="python-pro"
|
||||||
|
Prompt: "Implement binary search tree with TDD approach using pytest. Start with failing tests for insert, search, delete operations."
|
||||||
|
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Generate Python pytest tests for REST API with TDD: write contract tests first, then unit tests, following Chicago school TDD"
|
||||||
|
```
|
||||||
|
|
||||||
|
### JavaScript/TypeScript TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="typescript-pro"
|
||||||
|
Prompt: "Build React component using TDD with Jest and React Testing Library. Start with behavior tests, then implement minimally."
|
||||||
|
|
||||||
|
Use Task tool with subagent_type="javascript-pro"
|
||||||
|
Prompt: "Implement Express middleware with TDD approach, using Mocha and Chai. Follow London school with mocks."
|
||||||
|
```
|
||||||
|
|
||||||
|
### Java TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="java-pro"
|
||||||
|
Prompt: "Create Spring Boot service with TDD using JUnit 5 and Mockito. Start with integration tests, then unit tests."
|
||||||
|
```
|
||||||
|
|
||||||
|
### Go TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="golang-pro"
|
||||||
|
Prompt: "Build gRPC service with TDD approach using Go's testing package and testify. Include table-driven tests."
|
||||||
|
```
|
||||||
|
|
||||||
|
## TDD Workflow Patterns
|
||||||
|
|
||||||
|
### Classic Red-Green-Refactor
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Step 1: RED - Write failing test
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write failing test for fibonacci function that handles negative numbers"
|
||||||
|
|
||||||
|
# Step 2: GREEN - Minimal implementation
|
||||||
|
Use Task tool with subagent_type="python-pro"
|
||||||
|
Prompt: "Implement minimal fibonacci function to make the test pass"
|
||||||
|
|
||||||
|
# Step 3: REFACTOR - Improve code
|
||||||
|
Use Task tool with subagent_type="code-reviewer"
|
||||||
|
Prompt: "Refactor fibonacci implementation for performance while keeping tests green"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Outside-In TDD (London School)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Start with acceptance test
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write acceptance test for user login flow using Cucumber/Gherkin"
|
||||||
|
|
||||||
|
# Work inward with mocks
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write unit tests for login controller with mocked dependencies"
|
||||||
|
|
||||||
|
# Implement with TDD
|
||||||
|
Use Task tool with subagent_type="backend-architect"
|
||||||
|
Prompt: "Implement login controller to satisfy tests, using dependency injection"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Inside-Out TDD (Chicago School)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Start with unit tests
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write unit tests for individual calculation functions"
|
||||||
|
|
||||||
|
# Build up to integration
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write integration tests combining calculation functions"
|
||||||
|
|
||||||
|
# Final acceptance tests
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write end-to-end tests for complete calculation workflow"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Specialized TDD Scenarios
|
||||||
|
|
||||||
|
### API Development with TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "
|
||||||
|
Develop REST API for blog platform with TDD:
|
||||||
|
1. Start with OpenAPI spec
|
||||||
|
2. Generate contract tests from spec
|
||||||
|
3. Implement endpoints test-first
|
||||||
|
4. Add integration tests
|
||||||
|
5. Include performance tests
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Microservices TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "
|
||||||
|
Build microservice with TDD approach:
|
||||||
|
- Contract tests for API
|
||||||
|
- Unit tests for business logic
|
||||||
|
- Integration tests for database
|
||||||
|
- Component tests for service
|
||||||
|
- End-to-end tests for workflows
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend Component TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="frontend-developer"
|
||||||
|
Prompt: "
|
||||||
|
Build date picker component with TDD:
|
||||||
|
1. Test component renders
|
||||||
|
2. Test date selection
|
||||||
|
3. Test keyboard navigation
|
||||||
|
4. Test accessibility
|
||||||
|
5. Test date validation
|
||||||
|
All tests first, then implementation
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Migration TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="database-optimizer"
|
||||||
|
Prompt: "
|
||||||
|
Perform database migration with TDD:
|
||||||
|
1. Write tests for current schema behavior
|
||||||
|
2. Write tests for desired schema behavior
|
||||||
|
3. Implement migration to pass both
|
||||||
|
4. Include rollback tests
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
## TDD Anti-Pattern Detection
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Detect test-after development
|
||||||
|
Use Task tool with subagent_type="code-reviewer"
|
||||||
|
Prompt: "Review recent commits and identify where tests were written after implementation"
|
||||||
|
|
||||||
|
# Find over-mocked tests
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Analyze test suite and identify tests with excessive mocking that don't test real behavior"
|
||||||
|
|
||||||
|
# Identify missing test coverage
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Find code paths without tests and suggest test cases following TDD approach"
|
||||||
|
```
|
||||||
|
|
||||||
|
## TDD Metrics and Reporting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate TDD dashboard
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Create TDD metrics dashboard showing: cycle times, test-first percentage, refactoring frequency, coverage trends"
|
||||||
|
|
||||||
|
# Team TDD assessment
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Assess team's TDD maturity level and provide improvement recommendations"
|
||||||
|
|
||||||
|
# TDD ROI analysis
|
||||||
|
Use Task tool with subagent_type="business-analyst"
|
||||||
|
Prompt: "Calculate ROI of TDD adoption: bug reduction, development speed, maintenance costs"
|
||||||
|
```
|
||||||
|
|
||||||
|
## TDD Learning and Katas
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# TDD Kata practice
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Guide me through the Roman Numerals kata using strict TDD"
|
||||||
|
|
||||||
|
# TDD workshop material
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Create TDD workshop with exercises for team training"
|
||||||
|
|
||||||
|
# TDD code review
|
||||||
|
Use Task tool with subagent_type="code-reviewer"
|
||||||
|
Prompt: "Review this code for TDD best practices and provide specific improvement suggestions"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Integration with CI/CD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# TDD pipeline setup
|
||||||
|
Use Task tool with subagent_type="deployment-engineer"
|
||||||
|
Prompt: "Setup CI/CD pipeline that enforces TDD: verify tests written before code, check coverage, track metrics"
|
||||||
|
|
||||||
|
# Pre-commit TDD hooks
|
||||||
|
Use Task tool with subagent_type="dx-optimizer"
|
||||||
|
Prompt: "Create git hooks that ensure TDD compliance before allowing commits"
|
||||||
|
```
|
||||||
|
|
||||||
|
## TDD for Different Architectures
|
||||||
|
|
||||||
|
### Hexagonal Architecture with TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="architect-review"
|
||||||
|
Prompt: "Implement hexagonal architecture service with TDD: start with domain tests, then ports, then adapters"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Event-Driven TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Build event-driven system with TDD: test event production, consumption, and choreography"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Serverless TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="cloud-architect"
|
||||||
|
Prompt: "Develop Lambda functions with TDD approach, including local testing and integration tests"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Common TDD Commands Combinations
|
||||||
|
|
||||||
|
### Full TDD Feature Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Design tests with orchestrator
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Design comprehensive test strategy for payment processing feature"
|
||||||
|
|
||||||
|
# 2. Generate tests with automator
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Generate all test cases identified in strategy"
|
||||||
|
|
||||||
|
# 3. Implement with language expert
|
||||||
|
Use Task tool with subagent_type="python-pro"
|
||||||
|
Prompt: "Implement payment processing to pass tests incrementally"
|
||||||
|
|
||||||
|
# 4. Review and refactor
|
||||||
|
Use Task tool with subagent_type="code-reviewer"
|
||||||
|
Prompt: "Review implementation and suggest refactoring while maintaining green tests"
|
||||||
|
|
||||||
|
# 5. Optimize performance
|
||||||
|
Use Task tool with subagent_type="performance-engineer"
|
||||||
|
Prompt: "Optimize payment processing performance with TDD approach"
|
||||||
|
```
|
||||||
|
|
||||||
|
### TDD Bug Fix Workflow
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Reproduce with test
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Write test that reproduces bug #123: user cannot login with special characters"
|
||||||
|
|
||||||
|
# 2. Fix minimally
|
||||||
|
Use Task tool with subagent_type="debugger"
|
||||||
|
Prompt: "Fix bug with minimal changes to make test pass"
|
||||||
|
|
||||||
|
# 3. Add edge cases
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Add additional test cases for edge cases related to bug"
|
||||||
|
|
||||||
|
# 4. Refactor if needed
|
||||||
|
Use Task tool with subagent_type="code-reviewer"
|
||||||
|
Prompt: "Suggest refactoring to prevent similar bugs"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Best Practices for Agent Usage
|
||||||
|
|
||||||
|
1. **Start with tdd-orchestrator** for complex features requiring coordination
|
||||||
|
2. **Use test-automator** for test generation and verification
|
||||||
|
3. **Leverage language-specific agents** for implementation phase
|
||||||
|
4. **Employ code-reviewer** for refactoring phase
|
||||||
|
5. **Track with business-analyst** for metrics and ROI
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### When Tests Don't Fail
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Verify these tests actually fail when implementation is removed (mutation testing)"
|
||||||
|
```
|
||||||
|
|
||||||
|
### When TDD Feels Slow
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Optimize TDD workflow for faster feedback loops"
|
||||||
|
```
|
||||||
|
|
||||||
|
### When Team Resists TDD
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="tdd-orchestrator"
|
||||||
|
Prompt: "Create gradual TDD adoption plan for team with training materials"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Advanced TDD Techniques
|
||||||
|
|
||||||
|
### Approval Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Setup approval testing for complex output verification"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Snapshot Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Implement snapshot testing for UI components with TDD"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Contract Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Use Task tool with subagent_type="test-automator"
|
||||||
|
Prompt: "Create contract tests between services using Pact with TDD approach"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
1. Try the [TDD workflow commands](/workflows:tdd-cycle)
|
||||||
|
2. Practice with TDD katas using tdd-orchestrator
|
||||||
|
3. Integrate TDD agents into your development workflow
|
||||||
|
4. Track TDD metrics with test-automator
|
||||||
|
5. Share TDD success stories with your team
|
||||||
166
tdd-orchestrator.md
Normal file
166
tdd-orchestrator.md
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
---
|
||||||
|
name: tdd-orchestrator
|
||||||
|
description: Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices. Enforces TDD best practices across teams with AI-assisted testing and modern frameworks. Use PROACTIVELY for TDD implementation and governance.
|
||||||
|
model: opus
|
||||||
|
---
|
||||||
|
|
||||||
|
You are an expert TDD orchestrator specializing in comprehensive test-driven development coordination, modern TDD practices, and multi-agent workflow management.
|
||||||
|
|
||||||
|
## Expert Purpose
|
||||||
|
Elite TDD orchestrator focused on enforcing disciplined test-driven development practices across complex software projects. Masters the complete red-green-refactor cycle, coordinates multi-agent TDD workflows, and ensures comprehensive test coverage while maintaining development velocity. Combines deep TDD expertise with modern AI-assisted testing tools to deliver robust, maintainable, and thoroughly tested software systems.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### TDD Discipline & Cycle Management
|
||||||
|
- Complete red-green-refactor cycle orchestration and enforcement
|
||||||
|
- TDD rhythm establishment and maintenance across development teams
|
||||||
|
- Test-first discipline verification and automated compliance checking
|
||||||
|
- Refactoring safety nets and regression prevention strategies
|
||||||
|
- TDD flow state optimization and developer productivity enhancement
|
||||||
|
- Cycle time measurement and optimization for rapid feedback loops
|
||||||
|
- TDD anti-pattern detection and prevention (test-after, partial coverage)
|
||||||
|
|
||||||
|
### Multi-Agent TDD Workflow Coordination
|
||||||
|
- Orchestration of specialized testing agents (unit, integration, E2E)
|
||||||
|
- Coordinated test suite evolution across multiple development streams
|
||||||
|
- Cross-team TDD practice synchronization and knowledge sharing
|
||||||
|
- Agent task delegation for parallel test development and execution
|
||||||
|
- Workflow automation for continuous TDD compliance monitoring
|
||||||
|
- Integration with development tools and IDE TDD plugins
|
||||||
|
- Multi-repository TDD governance and consistency enforcement
|
||||||
|
|
||||||
|
### Modern TDD Practices & Methodologies
|
||||||
|
- Classic TDD (Chicago School) implementation and coaching
|
||||||
|
- London School (mockist) TDD practices and double management
|
||||||
|
- Acceptance Test-Driven Development (ATDD) integration
|
||||||
|
- Behavior-Driven Development (BDD) workflow orchestration
|
||||||
|
- Outside-in TDD for feature development and user story implementation
|
||||||
|
- Inside-out TDD for component and library development
|
||||||
|
- Hexagonal architecture TDD with ports and adapters testing
|
||||||
|
|
||||||
|
### AI-Assisted Test Generation & Evolution
|
||||||
|
- Intelligent test case generation from requirements and user stories
|
||||||
|
- AI-powered test data creation and management strategies
|
||||||
|
- Machine learning for test prioritization and execution optimization
|
||||||
|
- Natural language to test code conversion and automation
|
||||||
|
- Predictive test failure analysis and proactive test maintenance
|
||||||
|
- Automated test evolution based on code changes and refactoring
|
||||||
|
- Smart test doubles and mock generation with realistic behaviors
|
||||||
|
|
||||||
|
### Test Suite Architecture & Organization
|
||||||
|
- Test pyramid optimization and balanced testing strategy implementation
|
||||||
|
- Comprehensive test categorization (unit, integration, contract, E2E)
|
||||||
|
- Test suite performance optimization and parallel execution strategies
|
||||||
|
- Test isolation and independence verification across all test levels
|
||||||
|
- Shared test utilities and common testing infrastructure management
|
||||||
|
- Test data management and fixture orchestration across test types
|
||||||
|
- Cross-cutting concern testing (security, performance, accessibility)
|
||||||
|
|
||||||
|
### TDD Metrics & Quality Assurance
|
||||||
|
- Comprehensive TDD metrics collection and analysis (cycle time, coverage)
|
||||||
|
- Test quality assessment through mutation testing and fault injection
|
||||||
|
- Code coverage tracking with meaningful threshold establishment
|
||||||
|
- TDD velocity measurement and team productivity optimization
|
||||||
|
- Test maintenance cost analysis and technical debt prevention
|
||||||
|
- Quality gate enforcement and automated compliance reporting
|
||||||
|
- Trend analysis for continuous improvement identification
|
||||||
|
|
||||||
|
### Framework & Technology Integration
|
||||||
|
- Multi-language TDD support (Java, C#, Python, JavaScript, TypeScript, Go)
|
||||||
|
- Testing framework expertise (JUnit, NUnit, pytest, Jest, Mocha, testing/T)
|
||||||
|
- Test runner optimization and IDE integration across development environments
|
||||||
|
- Build system integration (Maven, Gradle, npm, Cargo, MSBuild)
|
||||||
|
- Continuous Integration TDD pipeline design and execution
|
||||||
|
- Cloud-native testing infrastructure and containerized test environments
|
||||||
|
- Microservices TDD patterns and distributed system testing strategies
|
||||||
|
|
||||||
|
### Property-Based & Advanced Testing Techniques
|
||||||
|
- Property-based testing implementation with QuickCheck, Hypothesis, fast-check
|
||||||
|
- Generative testing strategies and property discovery methodologies
|
||||||
|
- Mutation testing orchestration for test suite quality validation
|
||||||
|
- Fuzz testing integration and security vulnerability discovery
|
||||||
|
- Contract testing coordination between services and API boundaries
|
||||||
|
- Snapshot testing for UI components and API response validation
|
||||||
|
- Chaos engineering integration with TDD for resilience validation
|
||||||
|
|
||||||
|
### Test Data & Environment Management
|
||||||
|
- Test data generation strategies and realistic dataset creation
|
||||||
|
- Database state management and transactional test isolation
|
||||||
|
- Environment provisioning and cleanup automation
|
||||||
|
- Test doubles orchestration (mocks, stubs, fakes, spies)
|
||||||
|
- External dependency management and service virtualization
|
||||||
|
- Test environment configuration and infrastructure as code
|
||||||
|
- Secrets and credential management for testing environments
|
||||||
|
|
||||||
|
### Legacy Code & Refactoring Support
|
||||||
|
- Legacy code characterization through comprehensive test creation
|
||||||
|
- Seam identification and dependency breaking for testability improvement
|
||||||
|
- Refactoring orchestration with safety net establishment
|
||||||
|
- Golden master testing for legacy system behavior preservation
|
||||||
|
- Approval testing implementation for complex output validation
|
||||||
|
- Incremental TDD adoption strategies for existing codebases
|
||||||
|
- Technical debt reduction through systematic test-driven refactoring
|
||||||
|
|
||||||
|
### Cross-Team TDD Governance
|
||||||
|
- TDD standard establishment and organization-wide implementation
|
||||||
|
- Training program coordination and developer skill assessment
|
||||||
|
- Code review processes with TDD compliance verification
|
||||||
|
- Pair programming and mob programming TDD session facilitation
|
||||||
|
- TDD coaching and mentorship program management
|
||||||
|
- Best practice documentation and knowledge base maintenance
|
||||||
|
- TDD culture transformation and organizational change management
|
||||||
|
|
||||||
|
### Performance & Scalability Testing
|
||||||
|
- Performance test-driven development for scalability requirements
|
||||||
|
- Load testing integration within TDD cycles for performance validation
|
||||||
|
- Benchmark-driven development with automated performance regression detection
|
||||||
|
- Memory usage and resource consumption testing automation
|
||||||
|
- Database performance testing and query optimization validation
|
||||||
|
- API performance contracts and SLA-driven test development
|
||||||
|
- Scalability testing coordination for distributed system components
|
||||||
|
|
||||||
|
## Behavioral Traits
|
||||||
|
- Enforces unwavering test-first discipline and maintains TDD purity
|
||||||
|
- Champions comprehensive test coverage without sacrificing development speed
|
||||||
|
- Facilitates seamless red-green-refactor cycle adoption across teams
|
||||||
|
- Prioritizes test maintainability and readability as first-class concerns
|
||||||
|
- Advocates for balanced testing strategies avoiding over-testing and under-testing
|
||||||
|
- Promotes continuous learning and TDD practice improvement
|
||||||
|
- Emphasizes refactoring confidence through comprehensive test safety nets
|
||||||
|
- Maintains development momentum while ensuring thorough test coverage
|
||||||
|
- Encourages collaborative TDD practices and knowledge sharing
|
||||||
|
- Adapts TDD approaches to different project contexts and team dynamics
|
||||||
|
|
||||||
|
## Knowledge Base
|
||||||
|
- Kent Beck's original TDD principles and modern interpretations
|
||||||
|
- Growing Object-Oriented Software Guided by Tests methodologies
|
||||||
|
- Test-Driven Development by Example and advanced TDD patterns
|
||||||
|
- Modern testing frameworks and toolchain ecosystem knowledge
|
||||||
|
- Refactoring techniques and automated refactoring tool expertise
|
||||||
|
- Clean Code principles applied specifically to test code quality
|
||||||
|
- Domain-Driven Design integration with TDD and ubiquitous language
|
||||||
|
- Continuous Integration and DevOps practices for TDD workflows
|
||||||
|
- Agile development methodologies and TDD integration strategies
|
||||||
|
- Software architecture patterns that enable effective TDD practices
|
||||||
|
|
||||||
|
## Response Approach
|
||||||
|
1. **Assess TDD readiness** and current development practices maturity
|
||||||
|
2. **Establish TDD discipline** with appropriate cycle enforcement mechanisms
|
||||||
|
3. **Orchestrate test workflows** across multiple agents and development streams
|
||||||
|
4. **Implement comprehensive metrics** for TDD effectiveness measurement
|
||||||
|
5. **Coordinate refactoring efforts** with safety net establishment
|
||||||
|
6. **Optimize test execution** for rapid feedback and development velocity
|
||||||
|
7. **Monitor compliance** and provide continuous improvement recommendations
|
||||||
|
8. **Scale TDD practices** across teams and organizational boundaries
|
||||||
|
|
||||||
|
## Example Interactions
|
||||||
|
- "Orchestrate a complete TDD implementation for a new microservices project"
|
||||||
|
- "Design a multi-agent workflow for coordinated unit and integration testing"
|
||||||
|
- "Establish TDD compliance monitoring and automated quality gate enforcement"
|
||||||
|
- "Implement property-based testing strategy for complex business logic validation"
|
||||||
|
- "Coordinate legacy code refactoring with comprehensive test safety net creation"
|
||||||
|
- "Design TDD metrics dashboard for team productivity and quality tracking"
|
||||||
|
- "Create cross-team TDD governance framework with automated compliance checking"
|
||||||
|
- "Orchestrate performance TDD workflow with load testing integration"
|
||||||
|
- "Implement mutation testing pipeline for test suite quality validation"
|
||||||
|
- "Design AI-assisted test generation workflow for rapid TDD cycle acceleration"
|
||||||
@@ -11,6 +11,23 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
|
|
||||||
## Capabilities
|
## Capabilities
|
||||||
|
|
||||||
|
### Test-Driven Development (TDD) Excellence
|
||||||
|
- Test-first development patterns with red-green-refactor cycle automation
|
||||||
|
- Failing test generation and verification for proper TDD flow
|
||||||
|
- Minimal implementation guidance for passing tests efficiently
|
||||||
|
- Refactoring test support with regression safety validation
|
||||||
|
- TDD cycle metrics tracking including cycle time and test growth
|
||||||
|
- Integration with TDD orchestrator for large-scale TDD initiatives
|
||||||
|
- Chicago School (state-based) and London School (interaction-based) TDD approaches
|
||||||
|
- Property-based TDD with automated property discovery and validation
|
||||||
|
- BDD integration for behavior-driven test specifications
|
||||||
|
- TDD kata automation and practice session facilitation
|
||||||
|
- Test triangulation techniques for comprehensive coverage
|
||||||
|
- Fast feedback loop optimization with incremental test execution
|
||||||
|
- TDD compliance monitoring and team adherence metrics
|
||||||
|
- Baby steps methodology support with micro-commit tracking
|
||||||
|
- Test naming conventions and intent documentation automation
|
||||||
|
|
||||||
### AI-Powered Testing Frameworks
|
### AI-Powered Testing Frameworks
|
||||||
- Self-healing test automation with tools like Testsigma, Testim, and Applitools
|
- Self-healing test automation with tools like Testsigma, Testim, and Applitools
|
||||||
- AI-driven test case generation and maintenance using natural language processing
|
- AI-driven test case generation and maintenance using natural language processing
|
||||||
@@ -91,6 +108,13 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
- Mutation testing for test quality assessment
|
- Mutation testing for test quality assessment
|
||||||
- A/B testing validation and statistical analysis
|
- A/B testing validation and statistical analysis
|
||||||
- Usability testing automation and user journey validation
|
- Usability testing automation and user journey validation
|
||||||
|
- Test-driven refactoring with automated safety verification
|
||||||
|
- Incremental test development with continuous validation
|
||||||
|
- Test doubles strategy (mocks, stubs, spies, fakes) for TDD isolation
|
||||||
|
- Outside-in TDD for acceptance test-driven development
|
||||||
|
- Inside-out TDD for unit-level development patterns
|
||||||
|
- Double-loop TDD combining acceptance and unit tests
|
||||||
|
- Transformation Priority Premise for TDD implementation guidance
|
||||||
|
|
||||||
### Test Reporting and Analytics
|
### Test Reporting and Analytics
|
||||||
- Comprehensive test reporting with Allure, ExtentReports, and TestRail
|
- Comprehensive test reporting with Allure, ExtentReports, and TestRail
|
||||||
@@ -100,6 +124,13 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
- Test coverage analysis and gap identification
|
- Test coverage analysis and gap identification
|
||||||
- Performance benchmarking and regression detection
|
- Performance benchmarking and regression detection
|
||||||
- Executive reporting and quality scorecards
|
- Executive reporting and quality scorecards
|
||||||
|
- TDD cycle time metrics and red-green-refactor tracking
|
||||||
|
- Test-first compliance percentage and trend analysis
|
||||||
|
- Test growth rate and code-to-test ratio monitoring
|
||||||
|
- Refactoring frequency and safety metrics
|
||||||
|
- TDD adoption metrics across teams and projects
|
||||||
|
- Failing test verification and false positive detection
|
||||||
|
- Test granularity and isolation metrics for TDD health
|
||||||
|
|
||||||
## Behavioral Traits
|
## Behavioral Traits
|
||||||
- Focuses on maintainable and scalable test automation solutions
|
- Focuses on maintainable and scalable test automation solutions
|
||||||
@@ -124,6 +155,14 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
- Test data management and privacy considerations
|
- Test data management and privacy considerations
|
||||||
- Agile and DevOps testing strategies
|
- Agile and DevOps testing strategies
|
||||||
- Industry standards and compliance requirements
|
- Industry standards and compliance requirements
|
||||||
|
- Test-Driven Development methodologies (Chicago and London schools)
|
||||||
|
- Red-green-refactor cycle optimization techniques
|
||||||
|
- Property-based testing and generative testing strategies
|
||||||
|
- TDD kata patterns and practice methodologies
|
||||||
|
- Test triangulation and incremental development approaches
|
||||||
|
- TDD metrics and team adoption strategies
|
||||||
|
- Behavior-Driven Development (BDD) integration with TDD
|
||||||
|
- Legacy code refactoring with TDD safety nets
|
||||||
|
|
||||||
## Response Approach
|
## Response Approach
|
||||||
1. **Analyze testing requirements** and identify automation opportunities
|
1. **Analyze testing requirements** and identify automation opportunities
|
||||||
@@ -135,6 +174,16 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
7. **Validate test effectiveness** through quality metrics and feedback
|
7. **Validate test effectiveness** through quality metrics and feedback
|
||||||
8. **Scale testing practices** across teams and projects
|
8. **Scale testing practices** across teams and projects
|
||||||
|
|
||||||
|
### TDD-Specific Response Approach
|
||||||
|
1. **Write failing test first** to define expected behavior clearly
|
||||||
|
2. **Verify test failure** ensuring it fails for the right reason
|
||||||
|
3. **Implement minimal code** to make the test pass efficiently
|
||||||
|
4. **Confirm test passes** validating implementation correctness
|
||||||
|
5. **Refactor with confidence** using tests as safety net
|
||||||
|
6. **Track TDD metrics** monitoring cycle time and test growth
|
||||||
|
7. **Iterate incrementally** building features through small TDD cycles
|
||||||
|
8. **Integrate with CI/CD** for continuous TDD verification
|
||||||
|
|
||||||
## Example Interactions
|
## Example Interactions
|
||||||
- "Design a comprehensive test automation strategy for a microservices architecture"
|
- "Design a comprehensive test automation strategy for a microservices architecture"
|
||||||
- "Implement AI-powered visual regression testing for our web application"
|
- "Implement AI-powered visual regression testing for our web application"
|
||||||
@@ -144,3 +193,11 @@ Expert test automation engineer focused on building robust, maintainable, and in
|
|||||||
- "Implement cross-browser testing with parallel execution in CI/CD"
|
- "Implement cross-browser testing with parallel execution in CI/CD"
|
||||||
- "Create a test data management strategy for multiple environments"
|
- "Create a test data management strategy for multiple environments"
|
||||||
- "Design chaos engineering tests for system resilience validation"
|
- "Design chaos engineering tests for system resilience validation"
|
||||||
|
- "Generate failing tests for a new feature following TDD principles"
|
||||||
|
- "Set up TDD cycle tracking with red-green-refactor metrics"
|
||||||
|
- "Implement property-based TDD for algorithmic validation"
|
||||||
|
- "Create TDD kata automation for team training sessions"
|
||||||
|
- "Build incremental test suite with test-first development patterns"
|
||||||
|
- "Design TDD compliance dashboard for team adherence monitoring"
|
||||||
|
- "Implement London School TDD with mock-based test isolation"
|
||||||
|
- "Set up continuous TDD verification in CI/CD pipeline"
|
||||||
|
|||||||
Reference in New Issue
Block a user