tdd-red-green-refactor

Installation
SKILL.md

Red-Green-Refactor (TDD) Skill: TypeScript Edition

This skill implements a structural framework for AI-assisted programming to ensure every line of code is verifiable, typed, and purposeful.

The Three-Phase Cycle

Phase 1: Red (Establish Failure)

You must prove the feature does not exist and that your test is valid.

  1. Write One Test: Create a single test case (e.g., in Vitest or Jest) for the next small piece of behavior.
  2. Execute & Fail: Run the test. It must fail.
  3. Verify: Ensure the failure is related to the missing logic (e.g., ReferenceError: add is not defined) and not a configuration error.

Phase 2: Green (Minimal Pass)

Make the test pass as quickly and simply as possible.

Installs
135
GitHub Stars
1.7K
First Seen
Mar 18, 2026
tdd-red-green-refactor — google-labs-code/stitch-sdk