{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/guard-bash.sh\"",
            "statusMessage": "Checking command safety..."
          }
        ]
      },
      {
        "matcher": "Write|Edit|NotebookEdit",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/backup-before-write.sh\"",
            "async": true,
            "statusMessage": "Backing up before write..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/completeness-gate.sh\"",
            "async": false,
            "statusMessage": "Validating content completeness..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/newsletter-em-dash-check.sh\"",
            "async": false,
            "statusMessage": "Newsletter voice gate: em-dash check..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/newsletter-jargon-check.sh\"",
            "async": false,
            "statusMessage": "Newsletter voice gate: jargon check..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/newsletter-schema-check.sh\"",
            "async": false,
            "statusMessage": "Newsletter schema gate..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/newsletter-contrast-check.sh\"",
            "async": false,
            "statusMessage": "Newsletter contrast gate..."
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/newsletter-paragraph-collapse-check.sh\"",
            "async": false,
            "statusMessage": "Newsletter rendering gate: paragraph collapse check..."
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write|Edit|NotebookEdit",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/log-changes.sh\"",
            "async": true,
            "statusMessage": "Logging change..."
          }
        ]
      }
    ],
    "PostToolUseFailure": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/log-failures.sh\"",
            "async": true,
            "statusMessage": "Logging failure..."
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "matcher": "auto",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/pre-compact-handoff.sh\"",
            "timeout": 5,
            "statusMessage": "Saving state before compaction..."
          }
        ]
      }
    ],
    "SessionStart": [
      {
        "matcher": "user",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/session-reset.sh\"",
            "timeout": 3,
            "statusMessage": "Resetting session state..."
          }
        ]
      },
      {
        "matcher": "compact",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/post-compact-resume.sh\"",
            "timeout": 10,
            "statusMessage": "Restoring context after compaction..."
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR/.claude/hooks/log-stop-verdict.sh\"",
            "async": true,
            "statusMessage": "Logging session verdict..."
          }
        ]
      }
    ]
  }
}
