tdd-system

Guides test-driven development through Red-Green-Refactor cycles with regression memory and verification checklists.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/joySUSY/violet-plugin-place --skill tdd-system-joysusy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-system
Source: https://github.com/joySUSY/violet-plugin-place/tree/main/plugins/tdd-system
Command: npx skills add https://github.com/joySUSY/violet-plugin-place --skill tdd-system-joysusy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code changes often ship without proof they work, bugs get fixed without failing tests that reproduce them, and recurring regressions resurface because prior failure context was never recovered. This Skill enforces a verification-first discipline so every fix and feature is backed by executable tests. ## Core Features & Use Cases - Red-Green-Refactor Workflow: Enforces writing a failing test before any implementation, then minimal code to pass, then safe refactoring under green tests. - Regression Memory Loop: Recovers prior failure evidence and decision trails before writing a red test, so recurring bugs are reproduced from evidence rather than guesswork. - Testing Tactics & Strategy: Covers the testing pyramid (unit, integration, E2E), mocking rules (stubs, spies, mocks), AAA pattern, and Playwright vs Cypress guidance. - AI Output Verification: Provides checklists for validating AI-generated code, including hallucination checks, confidence scoring, and mandatory build/lint/test gates. - Use Case: When asked to fix a production bug, the Skill directs you to first write a failing test that reproduces the exact failing input, then implement the minimal fix, then refactor with the test staying green. ## Quick Start Ask the assistant to fix a bug or add a feature using the TDD cycle, starting with a failing test that proves the behavior before writing any implementation code.

Frequently Asked Questions about tdd-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development when fixing a bug?▼

Write a unit test that replicates the exact input that triggered the bug, run it to confirm it fails, then fix the code until the test passes. This proves the bug existed and prevents it from returning.

What is the Red-Green-Refactor cycle in TDD?▼

Red means writing a failing test that defines expected behavior, Green means writing the minimum code to make it pass, and Refactor means cleaning up the code while keeping tests green. The red phase is mandatory to validate the test.

Playwright vs Cypress for end-to-end testing?▼

Playwright uses an out-of-process architecture supporting multiple tabs, frames, and browsers with faster execution. Cypress runs in-process with strong debugging but is limited to single tabs and has iframe complexities.

When should I mock dependencies in unit tests?▼

Mock only what you own. Instead of mocking libraries like Axios, mock the network layer with tools like msw or nock so tests remain valid regardless of the HTTP client used.

How do I verify AI-generated code is correct?▼

Run a verification checklist: typecheck, lint, execute tests, and build the project before reporting completion. Also check for hallucinated packages, accidental deletions, and missing local dependencies.

Why does my test pass immediately when it should fail first?▼

An immediately passing test means you tested the wrong thing or wrote an invalid test. You must witness the test fail in the red phase before implementing, otherwise the test provides no proof of correctness.