
Test Driven Development
Unified TDD skill with three input modes, from spec, from task, or from description.
Install
npx skills add mikeyobrien/ralph-orchestrator --skill test-driven-development -g -a claude-code -y- Repository
- mikeyobrien/ralph-orchestrator3.2k
- Category
- Testing
- Updated
- 5d ago
- License
- MIT
- Context cost
- Lightabout 1,052 tokens
- Runs scripts
- No, instructions only
What it does
Unified TDD skill with three input modes, from spec, from task, or from description. Enforces test-first development using repository patterns, with proptest guidance and backpressure integration.
Test-Driven Development
Overview
One skill for all TDD workflows. Enforces test-first development using existing repository patterns. Three input modes handle different entry points, specs, task files, or ad-hoc descriptions, but the core cycle is always RED → GREEN → REFACTOR.
Input Modes
Detect the input type and follow the corresponding mode:
Mode A: From Spec (.spec.md)
Use when the input references a .spec.md file with Given/When/Then acceptance criteria.
- Locate and parse the spec file, extract all Given/When/Then triples
- Generate one test stub per criterion with
todo!()bodies:/// Spec: <spec-file>, Criterion #<N> /// Given <given text> /// When <when text> /// Then <then text> #[test] fn <spec_name>_criterion_<N>_<slug>() { todo!("Implement: <then text>"); } - Verify stubs compile but fail:
cargo test --no-run -p <crate> - Proceed to the TDD Cycle to make stubs pass
Programmatic support: ralph_core::preflight::{extract_acceptance_criteria, extract_criteria_from_file, extract_all_criteria} can parse criteria from spec files.
Mode B: From Task (.code-task.md)
Use when the input references a .code-task.md file or a specific implementation task.
- Read the task and identify acceptance criteria or requirements
- Discover patterns (see Pattern Discovery)
- Design test scenarios covering normal operation, edge cases, and error conditions
- Write failing tests for all requirements before any implementation
- Proceed to the TDD Cycle
Mode C: From Description
Use for ad-hoc tasks without a spec or task file.
- Clarify requirements from the description
- Discover patterns (see Pattern Discovery)
- Write failing tests targeting the described behavior
- Proceed to the TDD Cycle


