{
  "permissions": {
    "allow": [
      "Read",
      "Bash",
      "Grep",
      "Glob"
    ]
  },
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash -c 'echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -q \"config\\.py$\" && cd /Users/jameslopez/projects/TradingBot25 && .venv/bin/python3 tools/sync_params.py || true'",
            "statusMessage": "Syncing params after config.py edit..."
          }
        ]
      },
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "cd /Users/jameslopez/projects/TradingBot25 && .venv/bin/python3 tools/pine_dup_hook.py",
            "statusMessage": "Checking Pine for duplicate variable definitions..."
          }
        ]
      },
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash -c 'echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -q \"\\.pine$\" && cd /Users/jameslopez/projects/TradingBot25 && .venv/bin/python3 tools/check_pine.py || true'",
            "statusMessage": "Running Pine static analysis..."
          }
        ]
      },
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash -c 'echo \"$CLAUDE_TOOL_INPUT_FILE_PATH\" | grep -q \"strategy_mlp_scores\\.pine$\" && cd /Users/jameslopez/projects/TradingBot25 && .venv/bin/python3 tools/count_pine_security_calls.py --strategy strategies/strategy_mlp_scores.pine --summary 2>&1 | grep -E \"TOTAL|remaining\" || true'",
            "statusMessage": "Counting MLP Pine security calls (TV 40-call limit)..."
          }
        ]
      }
    ]
  }
}
