{ "hooks": { "PreToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "python3 -c \"\nimport sys, json\ndata = json.load(sys.stdin)\nfp = data.get('tool_input', {}).get('file_path', '')\nif 'PcanBasic.cs' in fp or '/old_source/' in fp or 'old_source/' in fp:\n print(json.dumps({'decision': 'block', 'reason': 'PROTECTED FILE: PcanBasic.cs is a vendor file and old_source/ is archived reference. Neither should be modified.'}))\n sys.exit(1)\n\"", "timeout": 5, "statusMessage": "Checking protected files..." } ] } ] } }