hooks:
  - event: file.changed
    filter:
      matchesCodeFiles: ["*.kt", "*.kts"]
    action: bash
    command: |
      ./gradlew ktlintFormat --include="$PI_FILE_PATH" || true
  - 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 java-kotlin-eng hook." >&2
        exit 2
      fi
  - event: user.prompt.submit
    action: bash
    command: |
      echo "[context-injection] Specialist 'java-kotlin-eng' active. Working directory: $(pwd)"
