{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "hooks": {
    "SessionStart": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/install.js\"; epic-harness resume",
            "async": false
          }
        ],
        "description": "Install binary if missing (cross-platform), seed skills/agents/commands/MCP, restore session context"
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "epic-harness guard"
          }
        ],
        "description": "Block dangerous commands (force push, prod DB drop, rm -rf /)"
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Edit",
        "hooks": [
          {
            "type": "command",
            "command": "epic-harness polish"
          }
        ],
        "description": "Auto-format + typecheck + lint warning after edits"
      },
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "epic-harness observe",
            "async": true,
            "timeout": 5
          }
        ],
        "description": "Record tool result for evolution loop"
      }
    ],
    "PreCompact": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "epic-harness snapshot"
          }
        ],
        "description": "Save working state before context compaction"
      }
    ],
    "SessionEnd": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "epic-harness reflect"
          }
        ],
        "description": "Analyze session observations → evolve skills → gate mutations"
      }
    ]
  }
}
