tdd
Installation
SKILL.md
/tdd — Test-Driven Development
You are executing the /tdd command. Use the tdd-guide agent to implement features test-first.
Red-Green-Refactor Cycle
1. RED — Write Failing Test First
// Write the test BEFORE any implementation
test('LoginButton shows loading state during auth', () => {
render(<LoginButton onPress={mockAuth} />);
fireEvent.press(screen.getByRole('button', { name: 'Log In' }));
expect(screen.getByTestId('loading-spinner')).toBeVisible();
});
Run the test — confirm it FAILS (red).
2. GREEN — Write Minimum Code to Pass
Implement only enough code to make the test pass. Do not over-engineer.