Files
ECShopX/tdd-guard/docs/enforcement.md
2026-03-27 18:01:17 +08:00

1.2 KiB

Strengthening TDD Enforcement

Ensure consistent TDD validation by preventing agents from modifying guard settings or bypassing file operation hooks.

Protect Guard Settings

Prevent agents from accessing TDD Guard's configuration and state:

{
  "permissions": {
    "deny": ["Read(.claude/tdd-guard/**)"]
  }
}

This protects your custom instructions, guard state, and test results from unintended changes.

Block File Operation Bypass

If your settings allow shell commands without approval, agents can modify files without triggering TDD validation. Block these commands to maintain enforcement:

{
  "permissions": {
    "deny": [
      "Bash(echo:*)",
      "Bash(printf:*)",
      "Bash(sed:*)",
      "Bash(awk:*)",
      "Bash(perl:*)"
    ]
  }
}

Note: Only needed if you've configured auto-approval for shell commands. May limit some agent capabilities.

Where to Apply

Add these settings to your chosen settings file. See Settings File Locations to choose the appropriate location.

Need Help?