Test-Driven Development
skill · v1.0.0
Write a failing test before writing implementation code. The test must be red before any production code is written. Implementation makes the test green with the minimal change. Refactor only with tests green. Apply when implementing any feature or bugfix.
Tags: tddtestingred-green-refactor
Invocation contract
Inputs
behavior_description(string, required) — The behavior to implement, expressed as acceptance criteria or a user story.existing_tests(string) — Existing test file context to guide test placement.
Outputs
failing_test(string) — The failing test code (RED state confirmed).implementation(string) — Minimal production code that makes the test green.test_output_red(string) — Test runner output confirming the test was RED before implementation.test_output_green(string) — Test runner output confirming the test is GREEN after implementation.
Side effects
writes test fileswrites production code files