{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|resume|clear|compact|new",
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; if [ -z \"$root\" ]; then root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; fi; if [ -x \"$root/skills/sop-manager/scripts/sop-summaries.sh\" ]; then \"$root/skills/sop-manager/scripts/sop-summaries.sh\"; else printf \"%s\\n\" \"SOP manager is available. Use sop-manager list/create/see when the user asks for SOPs.\"; fi'",
            "timeout": 10,
            "statusMessage": "Loading CSL SOP routing"
          },
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; if [ -z \"$root\" ]; then root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; fi; if [ -r \"$root/super-agent/workspace-workflow-gates.md\" ]; then cat \"$root/super-agent/workspace-workflow-gates.md\"; fi'",
            "timeout": 5,
            "statusMessage": "Loading workspace workflow gates"
          },
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify session triggers"
          }
        ]
      }
    ],
    "PostCompact": [
      {
        "matcher": "manual|auto",
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; if [ -z \"$root\" ]; then root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; fi; if [ -x \"$root/skills/sop-manager/scripts/sop-summaries.sh\" ]; then \"$root/skills/sop-manager/scripts/sop-summaries.sh\"; else printf \"%s\\n\" \"SOP manager is available. Use sop-manager list/create/see when the user asks for SOPs.\"; fi'",
            "timeout": 10,
            "statusMessage": "Reloading CSL SOP routing"
          },
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; if [ -z \"$root\" ]; then root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; fi; if [ -r \"$root/super-agent/workspace-workflow-gates.md\" ]; then cat \"$root/super-agent/workspace-workflow-gates.md\"; fi'",
            "timeout": 5,
            "statusMessage": "Reloading workspace workflow gates"
          },
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify post-compact triggers"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; if [ -z \"$root\" ]; then root=\"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\"; fi; if [ -x \"$root/skills/sop-manager/scripts/sop-candidates.js\" ]; then \"$root/skills/sop-manager/scripts/sop-candidates.js\"; fi'",
            "timeout": 5,
            "statusMessage": "Checking SOP candidates"
          },
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify prompt triggers"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash|Edit|Write|apply_patch",
        "hooks": [
          {
            "type": "command",
            "command": "printf '%s\\n' 'If a listed SOP matches this task by when_to_use or name, read the full SOP before this tool call and verify its completion criteria before final.'",
            "timeout": 5,
            "statusMessage": "Checking SOP reminder"
          }
        ]
      },
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify before-tool triggers"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "mcp__.*figma.*(get_design_context|get_metadata|get_screenshot|get_figjam|get_variable_defs|get_libraries|search_design_system)|mcp__mastergo_magic_mcp.*(getDesignSections|getDsl|getD2c|getMeta|getDesignTexts|getDesignSvgs|extractSvg)",
        "hooks": [
          {
            "type": "command",
            "command": "printf '%s\\n' 'Figma/MasterGo design data was fetched via MCP.' 'Before implementing or summarizing the UI, use the `figma-describe` skill to produce detailed, framework-agnostic UI information.' 'The description should include layer hierarchy, layout, spacing, typography, colors, repeated components, and notable visual states from the fetched design data.' 'Do not skip this step unless the user explicitly asks to bypass `figma-describe` for this turn.'",
            "timeout": 10,
            "statusMessage": "Checking Figma design description requirement"
          }
        ]
      },
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify after-tool triggers"
          }
        ]
      }
    ],
    "PermissionRequest": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify permission triggers"
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "matcher": "manual|auto",
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify pre-compact triggers"
          }
        ]
      }
    ],
    "SubagentStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify subagent-start triggers"
          }
        ]
      }
    ],
    "SubagentStop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify subagent-stop triggers"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "sh -c 'root=\"${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}\"; exec node \"$root/skills/triggerify/scripts/triggerify.js\" dispatch'",
            "timeout": 65,
            "statusMessage": "Running Triggerify stop triggers"
          }
        ]
      }
    ]
  }
}
