{
  "version": 1,
  "hooks": {
    "sessionStart": [
      {
        "matcher": "*",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" resume || echo '[harness] epic not found, skipping resume'"
      }
    ],
    "preToolUse": [
      {
        "matcher": "Shell",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" guard || echo '[harness] epic not found, skipping guard'"
      }
    ],
    "postToolUse": [
      {
        "matcher": "Edit",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" polish || echo '[harness] epic not found, skipping polish'"
      },
      {
        "matcher": "Write",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" polish || echo '[harness] epic not found, skipping polish'"
      },
      {
        "matcher": "*",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" observe || echo '[harness] epic not found, skipping observe'",
        "async": true
      },
      {
        "matcher": "*",
        "command": "EH=$(command -v epic 2>/dev/null); SLUG=$(basename \"$(pwd)\" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g'); test -n \"$EH\" && \"$EH\" mem-observe --project \"$SLUG\" --agent cursor || true",
        "async": true
      }
    ],
    "preCompact": [
      {
        "matcher": "*",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" snapshot || echo '[harness] epic not found, skipping snapshot'"
      }
    ],
    "sessionEnd": [
      {
        "matcher": "*",
        "command": "EH=$(command -v epic 2>/dev/null); test -n \"$EH\" && \"$EH\" reflect || echo '[harness] epic not found, skipping reflect'"
      }
    ]
  }
}
