# Claude Code Integration

## Setup

1. Copy `settings.example.json` to your Claude settings location (typically `~/.claude/settings.json` or project-local `.claude/settings.json`)

2. Ensure hook scripts are executable:
   ```bash
   chmod +x claude/hooks/*.js
   ```

3. Ensure the working directory has `GIT_ROOT` environment variable set, or hooks will use current working directory

## Trigger Events

Start Claude Code in the repository:
- **SessionStart** triggers on session start
- **UserPromptSubmit** triggers when you submit a prompt
- **PreToolUse** triggers before any tool execution
- **PostToolUse** triggers after tool execution completes
- **Stop** triggers when Claude completes its response

## Verify

After using Claude:
```bash
npm run summary
```

Expected: Claude events logged in the summary with `source: "hook"`.