{
  "description": "Guardrails for safe git operations and context preservation. Every entry carries forge_owned: true so installHooks/uninstallHooks can identify forge-managed entries by provenance marker rather than exact string match — this lets future forge versions change command strings (paths, flags, timeouts) without leaving stale entries in user settings.local.json.",
  "hooks": {
    "PreToolUse": [
      {
        "forge_owned": true,
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "if": "Bash(git *--no-verify*)",
            "command": "echo 'BLOCKED: --no-verify is not allowed. Fix the underlying issue instead of skipping hooks.' >&2; exit 2"
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "Edit",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/gate-enforcer.sh\"",
            "timeout": 5
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/gate-enforcer.sh\"",
            "timeout": 5
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/gate-enforcer.sh\"",
            "timeout": 5
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "forge_owned": true,
        "matcher": "Skill",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/telemetry.sh\"",
            "timeout": 5
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "Task",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/telemetry.sh\"",
            "timeout": 5
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "Edit",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/wiki-lint.sh\"",
            "timeout": 10
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/wiki-lint.sh\"",
            "timeout": 10
          }
        ]
      },
      {
        "forge_owned": true,
        "matcher": "MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/wiki-lint.sh\"",
            "timeout": 10
          }
        ]
      }
    ],
    "SessionStart": [
      {
        "forge_owned": true,
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/session-start.sh\"",
            "timeout": 5
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "forge_owned": true,
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/scripts/pre-compact.sh\"",
            "timeout": 10
          }
        ]
      }
    ]
  }
}
