<< All versions
Skill v1.0.2
LLM-judged scan100/100farooqarahim/grove/tdd
1 files
──Details
PublishedApril 26, 2026 at 04:59 PM
Content Hashsha256:020616a19ee907f3...
Git SHA6025bfdba59b
Bump Typepatch
──Files
Files (1 file, 1.6 KB)
SKILL.md1.6 KBactive
SKILL.md · 57 lines · 1.6 KB
version: "1.0.2" name: tdd description: Test-Driven Development workflow for the Builder agent. Ensures code is written test-first with proper red-green-refactor cycles. applies_to:
- builder
Test-Driven Development
Follow this cycle for every piece of new functionality:
The Red-Green-Refactor Cycle
1. Red — Write a Failing Test First
Before writing any implementation:
- Write a test that describes the expected behavior
- Run it to confirm it fails (for the right reason)
- The failure message should clearly state what's missing
2. Green — Write Minimal Code to Pass
- Write the simplest implementation that makes the test pass
- Do not add features the test doesn't require
- Do not optimize prematurely
- Run the test to confirm it passes
3. Refactor — Clean Up
- Remove duplication
- Improve naming
- Extract functions if needed
- Run tests again to confirm nothing broke
Rules
- Never write implementation before the test — the test defines the contract
- One behavior per test — test names should read like specifications
- Test error paths too — invalid input, missing data, network failures
- Tests must be independent — no shared mutable state between tests
- Tests must be fast — mock external services, use in-memory databases
Test Structure
// Arrange — set up preconditions// Act — call the function under test// Assert — verify the result
When to Skip TDD
- Exploratory/prototype code (but add tests before merging)
- Trivial getters/setters
- UI layout code (use visual testing instead)