Design & UI
x-tdd
Red-green-refactor TDD in small vertical slices. Use when building a feature or bugfix that should be proven with automated tests.
Fromlan · AI review on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add Fromlan/X-agent --skill x-tddAbout this skill
name: x-tdd description: Red-green-refactor TDD in small vertical slices. Use when building a feature or bugfix that should be proven with automated tests.
TDD
Work in one session. Prefer the project's existing test runner.
Loop
- Slice — One behaviour small enough to finish in one red-green cycle.
- Red — Write a failing test that names the behaviour. Run it; confirm it fails for the right reason.
- Green — Minimal production code to pass. No speculative abstractions.
- Refactor — Clean structure only while green. Re-run tests.
- Repeat for the next slice.
Guidance
- Prefer testing through a stable interface (public API, node script contract), not private guts.
- Skip TDD only when the user opts out or there is no runnable test setup — say so and propose a manual check instead.