nizos/tdd-guard

Automated TDD enforcement for Claude Code

What it solves

It prevents AI coding agents (specifically Claude Code) from ignoring Test-Driven Development (TDD) principles. It stops agents from writing implementation code before tests exist or writing more code than is necessary to pass the current tests.

How it works

It acts as a guardrail plugin for Claude Code that monitors the agent's actions. If the agent attempts to skip tests or over-implement a feature, the tool blocks the action and provides an explanation of the required TDD steps. It integrates with various test frameworks and linting rules to validate progress.

Who it’s for

Developers using Claude Code who want to ensure their AI agent adheres to strict TDD workflows to maintain code quality and prevent over-engineering.

Highlights

  • Test-First Enforcement: Blocks any implementation attempt that isn't preceded by a failing test.
  • Minimal Implementation: Prevents the agent from writing code beyond what the current tests require.
  • Broad Framework Support: Compatible with Vitest, Jest, Storybook, pytest, PHPUnit, Go, Rust, RSpec, and Minitest.
  • Lint Integration: Uses existing linting rules to enforce the refactoring phase of TDD.

Related

  • Project
  • Project
  • Project
  • Project
  • Project