by nizos
Automated TDD enforcement for Claude Code
# Add to your Claude Code skills
git clone https://github.com/nizos/tdd-guardAutomated Test-Driven Development enforcement for Claude Code.
TDD Guard ensures Claude Code follows Test-Driven Development principles. When your agent tries to skip tests or over-implement, TDD Guard blocks the action and explains what needs to happen instead.
<p align="center"> <a href="https://nizar.se/uploads/videos/tdd-guard-demo.mp4"> <img src="docs/assets/tdd-guard-demo-screenshot.gif" alt="TDD Guard Demo" width="600"> </a> <br> <em>Click to watch TDD Guard in action</em> </p>No comments yet. Be the first to share your thoughts!
Using npm:
npm install -g tdd-guard
Or using Homebrew:
brew install tdd-guard
TDD Guard needs to capture test results from your test runner. Choose your language below:
Choose your test runner:
Install the tdd-guard-vitest reporter in your project:
npm install --save-dev tdd-guard-vitest
Add to your vitest.config.ts:
import { defineConfig } from 'vitest/config'
import { VitestReporter } from 'tdd-guard-vitest'
export default defineConfig({
test: {
reporters: [
'default',
new VitestReporter('/Users/username/projects/my-app'),
],
},
})
Install the tdd-guard-jest reporter in your project:
npm install --save-dev tdd-guard-jest
Add to your jest.config.ts:
import type { Config } from 'jest'
const config: Config = {
reporters: [
'default',
[
'tdd-guard-jest',
{
projectRoot: '/Users/username/projects/my-app',
},
],
],
}
export default config
Note: For both...