From 89e841d4484eab29d49428a9431e4b2ccbde750b Mon Sep 17 00:00:00 2001 From: lmiranda Date: Sat, 31 Jan 2026 16:07:25 -0500 Subject: [PATCH] fix: correct hooks.json structure with nested matcher objects The hooks.json files had incorrect structure. Claude Code requires: - Top-level "hooks" object - Event names as keys containing arrays - Each array element must have "matcher" and nested "hooks" array Fixed 8 plugins: - clarity-assist - claude-config-maintainer - cmdb-assistant - contract-validator - data-platform - pr-review - projman - viz-platform Co-Authored-By: Claude Opus 4.5 --- plugins/clarity-assist/hooks/hooks.json | 9 +++++++-- plugins/claude-config-maintainer/hooks/hooks.json | 9 +++++++-- plugins/cmdb-assistant/hooks/hooks.json | 9 +++++++-- plugins/contract-validator/hooks/hooks.json | 9 +++++++-- plugins/data-platform/hooks/hooks.json | 9 +++++++-- plugins/pr-review/hooks/hooks.json | 9 +++++++-- plugins/projman/hooks/hooks.json | 9 +++++++-- plugins/viz-platform/hooks/hooks.json | 2 +- 8 files changed, 50 insertions(+), 15 deletions(-) diff --git a/plugins/clarity-assist/hooks/hooks.json b/plugins/clarity-assist/hooks/hooks.json index 65cf6a3..571ba9b 100644 --- a/plugins/clarity-assist/hooks/hooks.json +++ b/plugins/clarity-assist/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "UserPromptSubmit": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/vagueness-check.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/vagueness-check.sh" + } + ] } ] } diff --git a/plugins/claude-config-maintainer/hooks/hooks.json b/plugins/claude-config-maintainer/hooks/hooks.json index d80c531..60168f6 100644 --- a/plugins/claude-config-maintainer/hooks/hooks.json +++ b/plugins/claude-config-maintainer/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/enforce-rules.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/enforce-rules.sh" + } + ] } ] } diff --git a/plugins/cmdb-assistant/hooks/hooks.json b/plugins/cmdb-assistant/hooks/hooks.json index d90fb51..d779fdf 100644 --- a/plugins/cmdb-assistant/hooks/hooks.json +++ b/plugins/cmdb-assistant/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + } + ] } ], "PreToolUse": [ diff --git a/plugins/contract-validator/hooks/hooks.json b/plugins/contract-validator/hooks/hooks.json index a37bf96..2fde076 100644 --- a/plugins/contract-validator/hooks/hooks.json +++ b/plugins/contract-validator/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/auto-validate.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/auto-validate.sh" + } + ] } ], "PostToolUse": [ diff --git a/plugins/data-platform/hooks/hooks.json b/plugins/data-platform/hooks/hooks.json index d8e413a..09eec5e 100644 --- a/plugins/data-platform/hooks/hooks.json +++ b/plugins/data-platform/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + } + ] } ], "PostToolUse": [ diff --git a/plugins/pr-review/hooks/hooks.json b/plugins/pr-review/hooks/hooks.json index 529b5ec..07be0d9 100644 --- a/plugins/pr-review/hooks/hooks.json +++ b/plugins/pr-review/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + } + ] } ] } diff --git a/plugins/projman/hooks/hooks.json b/plugins/projman/hooks/hooks.json index 529b5ec..07be0d9 100644 --- a/plugins/projman/hooks/hooks.json +++ b/plugins/projman/hooks/hooks.json @@ -2,8 +2,13 @@ "hooks": { "SessionStart": [ { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/startup-check.sh" + } + ] } ] } diff --git a/plugins/viz-platform/hooks/hooks.json b/plugins/viz-platform/hooks/hooks.json index b9820d5..deffac9 100644 --- a/plugins/viz-platform/hooks/hooks.json +++ b/plugins/viz-platform/hooks/hooks.json @@ -1,3 +1,3 @@ { - "hooks": [] + "hooks": {} } -- 2.49.1