{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": "for file in $(find src -name \"*.php\" | head -60); do\n content=$(cat \"$file\")\n result=$(echo \"{\\\"tool_name\\\": \\\"Write\\\", \\\"tool_input\\\": {\\\"file_path\\\": \\\"$file\\\", \\\"content\\\": $(echo \"$content\" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))')}}\" | \/var\/www\/tools\/ki-protokoll\/claude-hook\/hook_dispatcher.py pre 2>&1)\n if echo \"$result\" | grep -q \"permissionDecision.*deny\"; then\n reason=$(echo \"$result\" | python3 -c \"import sys,json; d=json.load(sys.stdin); print(d.get('hookSpecificOutput',{}).get('permissionDecisionReason',''))\" 2>\/dev\/null)\n echo \"$file: $reason\"\n fi\ndone 2>&1 | head -50",
"timeout": 120000,
"description": "Check all PHP files against rules"
}
}