---
name: block-makefile-edit
enabled: true
event: file
action: block
conditions:
  - field: file_path
    operator: regex_match
    pattern: (?:^|/)Makefile$
  - field: tool_name
    operator: in
    values: ["Edit", "Write", "MultiEdit"]
---

🚫 **BLOCKED: Makefile Edit Attempt**

You are attempting to edit the Makefile using Edit/Write tools.

**Why this is blocked:**
The Makefile contains carefully configured build targets and is protected from modifications.

**If you need to modify the Makefile:**
1. Ask the user for explicit permission
2. Explain what change is needed and why
3. Wait for approval before proceeding

**Note:** Reading the Makefile is still allowed.
