tdd

Enforces RED-GREEN-REFACTOR test-first development cycle for features and bugfixes.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/voidful/Aixlarity --skill tdd-voidful
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/voidful/Aixlarity/tree/main/.aixlarity/skills/tdd
Command: npx skills add https://github.com/voidful/Aixlarity --skill tdd-voidful

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers and AI agents often write production code before tests, leading to untested logic, regressions, and over-engineered implementations. This Skill enforces a strict test-first discipline so every behavior is driven by a failing test. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Requires a failing test before any production code, then minimal code to pass, then cleanup with tests still green. - Minimal Implementation Guidance: Instructs hardcoding expected values first and generalizing only when the next test demands it, preventing speculative code. - Cargo Test Integration: Provides commands for running specific or full Rust test suites in the Aixlarity codebase (cargo test -p aixlarity-core). - Use Case: When fixing a bug in a Rust provider adapter, write a failing test reproducing the bug first, confirm it fails for the right reason, then implement the smallest fix that turns it green. ## Quick Start Ask the agent to implement the new feature using test-driven development with a failing test written before any production code.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development in Rust?

Write a failing test first, run it with cargo test to confirm it fails for the right reason, then write the minimum code to make it pass. Use cargo test -p aixlarity-core test_name to run a specific test or cargo test for the full suite.

What is the RED-GREEN-REFACTOR cycle?

RED means writing a test that fails, GREEN means writing the minimum code to make it pass, and REFACTOR means cleaning up both test and production code while keeping tests green. The cycle repeats for each new behavior.

When is it acceptable to skip test-driven development?

TDD can be skipped for throwaway prototypes deleted within the session, generated code such as provider adapter boilerplate, and configuration files. You should ask the user first before skipping in these cases.

How much code should I write to make a failing test pass?

Write only the minimum: hardcode the expected return value first and generalize later, return the expected error without handling untested cases. Let each subsequent test drive the next piece of behavior.

What should I do if production code was written before the test?

Delete the production code and start over with a failing test first. The skill's core rule is that no production code may exist without a failing test driving it.