---
name: block-tests-quality
enabled: true
event: file
action: block
tool_matcher: Edit|Write|MultiEdit
conditions:
  - field: file_path
    operator: regex_match
    pattern: tests/quality/
  - field: file_path
    operator: regex_not_match
    pattern: baselines\.json$
---

# BLOCKED: Protected Directory

The `tests/quality/` directory is **protected** and cannot be modified.

## Why This Is Blocked

- This directory contains the test smell detection baselines and quality gate infrastructure
- Changes to these files could compromise the project's quality enforcement
- The user has explicitly requested that agents may **view** but **never modify** these files

## What You Can Do

- **Read files**: Use the Read tool to view contents
- **Reference patterns**: Learn from the test smell detection logic
- **Report issues**: If you find a problem, report it to the user rather than fixing it

## If You Believe a Change Is Needed

Do NOT attempt to modify these files. Instead:

1. Explain to the user what change you believe is necessary
2. Provide your justification
3. Wait for explicit user approval and manual intervention

**This rule cannot be bypassed.** Do not attempt workarounds.
