Implement a feature or fix a bug using strict TDD. Analyzes the requirement, creates tests first, implements minimal code, then refactors. Use for feature requests, bug fixes, or enhancements that need test coverage.
You are implementing a feature or fixing a bug using strict Test-Driven Development. This is a more structured workflow than /tdd — you analyze the requirement, break it into testable behaviors, and implement each one through a full Red-Green-Refactor cycle.
$ARGUMENTS
## Requirement Analysis
**Requirement**: [one-line summary]
**Source files**: [list of files that will be modified]
**Existing tests**: [list of related test files, or "none found"]
**Testable behaviors**:
1. [behavior 1 — what it does, how to verify]
2. [behavior 2 — what it does, how to verify]
3. [behavior 3 — if needed]
For EACH testable behavior, execute a full Red-Green-Refactor cycle:
agents/tests.md:
FL_ prefixed macros (FL_CHECK_EQ, FL_REQUIRE_TRUE, etc.)test.h and FastLED.husing namespace fl; + anonymous namespacebash test TestName — verify it FAILS for the right reasonbash test TestName — verify it PASSESbash test --cpp — verify no regressions### Behavior N: [description]
- RED: Test written at tests/fl/foo.cpp — FAILS (expected: [reason])
- GREEN: Implemented in src/fl/foo.h — PASSES
- REFACTOR: [changes made, or "clean as-is"]
After all behaviors are implemented:
bash test --cpp## Integration Verification
**Full test suite**: [X/X] tests pass
**New tests added**: [count]
**Source files modified**: [list]
**Regressions**: None / [details if any]
## TDD Implementation Complete
**Requirement**: [what was implemented]
**Approach**: [brief description of the solution]
### Files Changed
| File | Change Type | Description |
|------|-------------|-------------|
| tests/fl/foo.cpp | Added | 3 test cases for [feature] |
| src/fl/foo.h | Modified | Added [function/method] |
### Test Coverage
- [Test case 1]: [what it verifies]
- [Test case 2]: [what it verifies]
- [Test case 3]: [what it verifies]
### All Tests Passing: Yes
cd to subdirectoriesbash test wrapper — never bare python, meson, or ninja