Defined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Pre-Compact Linear Progress Sync:\n\n1. Extract issue ID from branch name (pattern: [a-z]+-\\d+, e.g., ABC-123, proj-42)\n2. Read .claude/progress/*.jsonl files\n3. Summarize key changes (focus on source code, exclude config/docs)\n4. Post comment via mcp__linear__create_comment\n5. Delete progress files after sync\n\nSummary format:\n## Progress (Pre-Compact)\n- [Completed work]\n- [Key files: file1, file2, ...]\n\nSkip if no issue ID in branch or no progress files exist."
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/pre_implement_check.py\""
}
],
"matcher": "ExitPlanMode"
},
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/validate_commit_msg.py\""
}
],
"matcher": "Bash"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/record_progress.py\""
}
],
"matcher": "Write|Edit"
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/check_linear_env.py\""
}
]
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 1,
"command": 4
},
"eventStats": {
"PreCompact": 1,
"PreToolUse": 2,
"PostToolUse": 1,
"UserPromptSubmit": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 4,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 4
}
}