tdd-implementation

Enforce TDD state transitions and block Java production edits until tests pass.

4|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/cowwoc/styler --skill tdd-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-implementation
Source: https://github.com/cowwoc/styler/tree/main/.claude/skills/tdd-implementation
Command: npx skills add https://github.com/cowwoc/styler --skill tdd-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces a Test-Driven Development workflow by gating production edits behind explicit TDD activation and state transitions.

Core Features & Use Cases

  • State machine gating: RED → GREEN → REFACTOR → VERIFY → COMPLETE flow validation.
  • Production edit protection: Blocks production code edits until TDD mode is activated.
  • Session-based activation: Requires a session-specific activation file as described in the guide.

Quick Start

Step 1: Prepare a session file for TDD mode (exact format per guide) SESSION_ID="your-session-id" TASK_NAME="YourClass" cat > /tmp/tdd_skill_active_${SESSION_ID} << EOF { "phase": "GREEN", "session_id": "${SESSION_ID}", "target_class": "${TASK_NAME}", "test_class": "${TASK_NAME}Test", "test_failed": false, "test_passed": false, "started_at": "$(date -Iseconds)" } EOF

Then run the activation as described in the guide

Frequently Asked Questions about tdd-implementation

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

FAQPage Schema
How do I enforce test-driven development on Java production code?

Test-driven development enforces writing tests before production code through a RED → GREEN → REFACTOR → VERIFY workflow. This Skill gates Java production edits in src/main/java behind TDD activation, blocking changes until tests fail, pass, and are verified in sequence, ensuring disciplined workflow compliance.

Can I use TDD to prevent unvalidated production code changes in Java?

Yes. This Skill blocks production edits until TDD mode activates and progresses through validated state transitions. Each phase—test failure, test success, refactoring, verification—runs actual tests to confirm the state before allowing progression to COMPLETE.

What's the best way to manage TDD workflow state transitions for Java projects?

A state machine manages TDD phases: RED (test fails), GREEN (test passes), REFACTOR (code improves), VERIFY (tests confirm changes), and COMPLETE. This Skill automates phase validation by executing tests at each transition, preventing manual skipping and ensuring workflow integrity.

How do I set up a TDD session for Java feature development and bug fixes?

Create a session-specific activation file with phase, session ID, target class, and test class metadata. Once activated, the Skill gates production edits to src/main/java, enforcing test creation and execution before any code changes advance through the complete TDD cycle.

Why should I gate production code edits behind TDD activation?

Gating prevents accidental production changes outside the TDD workflow, ensuring every edit—feature addition, bug fix, or validation logic—follows disciplined test-first practices. Actual test execution confirms each phase succeeds before progression.