Customize TDD Guard's validation rules to match your specific TDD practices.
TDD Guard uses validation rules to enforce TDD principles. You can override these default rules by creating a custom instructions file at .claude/tdd-guard/data/instructions.md.
If you have the SessionStart hook configured, the instructions file is created automatically with default rules when:
- Starting a new Claude Code session
- Resuming a session
- Using the
/clearcommand
Your custom instructions are never overwritten - once created, the file remains under your control.
- Edit
.claude/tdd-guard/data/instructions.md - Adjust or replace the default rules with your TDD requirements
- Changes take effect immediately - no restart needed
When updating TDD Guard, you may want the latest default instructions:
- Delete
.claude/tdd-guard/data/instructions.md - Trigger the SessionStart hook (start new session or use
/clear) - The latest defaults will be created automatically
Alternatively, you can manually copy the default rules from src/validation/prompts/rules.ts.
Prevent agents from modifying your custom instructions by denying access to TDD Guard data. See Strengthening TDD Enforcement for details.
- Start with the default instructions and modify incrementally
- Keep rules clear and actionable for consistent validation
- Share effective customizations with the TDD Guard community in GitHub Discussions