fix(plugins): hooks.json must be {"hooks": {}}; add validator + CI guard#231
Open
RJK134 wants to merge 1 commit into
Open
fix(plugins): hooks.json must be {"hooks": {}}; add validator + CI guard#231RJK134 wants to merge 1 commit into
RJK134 wants to merge 1 commit into
Conversation
The 4 vertical plugins (private-equity, financial-analysis, equity-research,
wealth-management) had `hooks.json` written as `[]`, which the Claude Code
plugin loader rejects with `expected: "record", path: ["hooks"], received:
undefined`. Investment-banking already had the correct `{"hooks": {}}` shape.
This corrects the 4 files, adds a hooks.json schema check to `scripts/check.py`
(fails CI on any future regression of this shape), and wires `check.py` into a
new `check` GitHub Actions workflow that runs on every PR + push to main.
Supersedes the duplicate community PRs that have been queuing on this issue
(anthropics#226, anthropics#225, anthropics#224, anthropics#221, anthropics#216, anthropics#206, anthropics#203, anthropics#200, anthropics#193, anthropics#192, anthropics#167, anthropics#163,
anthropics#162, anthropics#146, anthropics#141, and others).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks.jsonin 4 vertical plugins (private-equity, financial-analysis, equity-research, wealth-management) — was[], now{"hooks": {}}. Investment-banking already had the correct shape and is used as the reference.hooks.jsonschema check toscripts/check.pyso any future regression fails fast with a clear message:hooks.json: <path>: must be {"hooks": {...}}, got <type>..github/workflows/check.ymljob that runspython3 scripts/check.pyon everypull_requestandpushtomain, gating this class of bug at PR time.Why this PR
The Claude Code plugin loader rejects an empty-array
hooks.jsonwith:This has produced a long stream of duplicate community PRs (#226, #225, #224, #221, #216, #206, #203, #200, #193, #192, #167, #163, #162, #146, #141, and others — ~27 in total). Each fixes the same 4 files. This PR consolidates the fix and prevents the bug class from recurring by adding both a validator and a CI guard, so the duplicate-PR queue can be closed in one go.
The version-bump pre-commit hook (from #208) ran automatically and patch-bumped the 4 affected plugin versions from
0.1.0 → 0.1.1.Test plan
python3 scripts/check.pyexits 0 on the fixed tree (OK — 85 file(s) checked, 0 issues.).hooks.jsonback to[];check.pyexited 1 withhooks.json: plugins/vertical-plugins/private-equity/hooks/hooks.json: must be {"hooks": {...}}, got list. Restored, re-ran, clean.checkworkflow runs green onmain.🤖 Generated with Claude Code