ac-tdd-runner
π―Skillfrom adaptationio/skrillz
Automates the Test-Driven Development (TDD) cycle by generating tests, implementing features, and refactoring code systematically.
Installation
npx skills add https://github.com/adaptationio/skrillz --skill ac-tdd-runnerSkill Details
Run TDD cycle for feature implementation. Use when implementing features with RED-GREEN-REFACTOR, running test-driven development, automating TDD workflow, or ensuring test-first development.
Overview
# AC TDD Runner
Automate the Test-Driven Development cycle for feature implementation.
Purpose
Enforces the RED-GREEN-REFACTOR cycle, ensuring all features are implemented with test-first methodology for quality and maintainability.
Quick Start
```python
from scripts.tdd_runner import TDDRunner
runner = TDDRunner(project_dir)
result = await runner.run_cycle(feature)
```
TDD Cycle
RED Phase
Write failing tests first:
```python
red_result = await runner.red_phase(feature)
# Creates test file with failing tests
# Verifies tests actually fail
```
GREEN Phase
Implement minimum code to pass:
```python
green_result = await runner.green_phase(feature)
# Implements code
# Runs tests until all pass
# Minimum necessary implementation
```
REFACTOR Phase
Clean up while tests pass:
```python
refactor_result = await runner.refactor_phase(feature)
# Improve code structure
# Ensure tests still pass
# Apply coding standards
```
Cycle Result
```json
{
"feature_id": "auth-001",
"cycle_complete": true,
"phases": {
"red": {
"success": true,
"tests_created": 5,
"all_tests_fail": true
},
"green": {
"success": true,
"iterations": 3,
"all_tests_pass": true
},
"refactor": {
"success": true,
"changes_made": ["extracted_helper", "renamed_variable"],
"tests_still_pass": true
}
},
"coverage": 92.5,
"duration_ms": 120000
}
```
RED Phase Details
- Generate test file from feature test_cases
- Write test functions with proper structure
- Run tests to verify they fail
- If tests pass unexpectedly, add more specific assertions
GREEN Phase Details
- Analyze failing tests
- Write minimum implementation
- Run tests
- If tests fail, iterate on implementation
- Stop when all tests pass
REFACTOR Phase Details
- Identify code smells
- Apply refactoring patterns
- Run tests after each change
- Revert if tests fail
- Continue until code is clean
Configuration
```json
{
"max_green_iterations": 10,
"coverage_threshold": 80,
"refactoring_patterns": [
"extract_method",
"rename_for_clarity",
"remove_duplication"
],
"test_framework": "pytest"
}
```
Integration
- Uses:
ac-test-generatorfor RED phase - Uses:
ac-criteria-validatorfor GREEN verification - Reports to:
ac-task-executor
API Reference
See scripts/tdd_runner.py for full implementation.
More from this repository10
Performs comprehensive analysis of code, skills, processes, and data to extract actionable insights, identify patterns, and drive data-driven improvements.
Automatically diagnoses and resolves Auto-Claude installation, configuration, and runtime issues across different platforms and environments.
Authenticates and configures xAI Grok API access using Twitter/X account credentials, enabling seamless integration with OpenAI-compatible SDK methods.
Retrieve and integrate xAI Grok sentiment with financial data APIs to generate comprehensive market insights and analysis.
xai-crypto-sentiment skill from adaptationio/skrillz
Retrieves comprehensive financial market data including stocks, forex, crypto, and technical indicators using the Twelve Data API.
Enables real-time Twitter/X searches using Grok API to extract insights, track trends, monitor accounts, and analyze social discussions.
Enables autonomous agents to search X, web, execute code, and analyze documents with server-side tool management.
Optimizes Claude AI performance by reducing token usage, managing API costs, and improving build speed through intelligent model and context selection.
Automates comprehensive installation and setup of Auto-Claude across Windows, macOS, Linux, and WSL with multi-platform support and dependency management.