hooks:
  - event: file.changed
    filter:
      matchesCodeFiles: ["rules/**/*.yaml", "rules/**/*.yml"]
    action: bash
    command: |
      semgrep --validate --config "$PI_FILE_PATH"
  - event: tool.before.*
    filter:
      tool: [bash]
    action: bash
    command: |
      if echo "$PI_TOOL_ARGS" | grep -E "(git push --force|rm -rf /)"; then
        echo "Dangerous command blocked in static-analysis-lead hook." >&2
        exit 2
      fi
  - event: user.prompt.submit
    action: bash
    command: |
      echo "[context-injection] Specialist 'static-analysis-lead' active. Working directory: $(pwd)"
