fix: wire up enforcement hooks in plugin hooks.json - #56
Merged
accesswatch merged 3 commits intoMar 13, 2026
Merged
Conversation
The plugin ships three enforcement scripts in scripts/ but hooks.json
was empty, meaning marketplace-only installs got zero hook enforcement.
Users who installed via 'plugin install' received agents, commands, and
CLAUDE.md but not the edit-gate that blocks UI file changes without
accessibility-lead review.
Add all three hooks to hooks.json:
- UserPromptSubmit: a11y-team-eval.sh (web project detection)
- PreToolUse (Edit|Write): a11y-enforce-edit.sh (UI file gate)
- PostToolUse (Agent): a11y-mark-reviewed.sh (session marker)
All paths use ${CLAUDE_PLUGIN_ROOT} per the official plugin hooks spec.
Bump plugin version from 1.0.0 to 3.0.1 to align with the published
3.0.0 release and indicate a patch fix.
tesles
force-pushed
the
hotfix/plugin-hooks-json-entries
branch
from
March 5, 2026 19:24
2dee11a to
864ac55
Compare
…main, keep hotfix version
…son-entries # Conflicts: # claude-code-plugin/.claude-plugin/plugin.json
accesswatch
approved these changes
Mar 13, 2026
accesswatch
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the hooks.json changes and verified all three target scripts exist on main. The enforce-edit script has proper safety exits (non-UI files pass through, python3 guard, symlink resolution). Patch version bump is appropriate. Safe to merge.
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
Hotfix: the plugin's
hooks/hooks.jsonwas empty ({"hooks": {}}), so marketplace-only installs received zero hook enforcement. The three enforcement scripts existed inscripts/but were never wired intohooks.json.This means users who installed via
claude plugin install accessibility-agents@community-accessgot agents, commands, and CLAUDE.md -- but not the edit-gate that blocks UI file edits without accessibility-lead review. The core enforcement guarantee of this plugin was silently missing for marketplace installs.Problem
PR #48 (marketplace.json) stated in the step-by-step mapping table:
And in the hook enforcement section:
Both claims were incorrect.
hooks.jsoncontained{"hooks": {}}.Fix
Wire all three enforcement hooks into
hooks.json:UserPromptSubmita11y-team-eval.shPreToolUseEdit|Writea11y-enforce-edit.shPostToolUseAgenta11y-mark-reviewed.shAll paths use
${CLAUDE_PLUGIN_ROOT}per the official plugin hooks spec.Verification
hooks.jsonto local plugin cache/reload-plugins-- hooks loaded (confirmed:5 hook(s))UserPromptSubmitfires accessibility instructionPreToolUseblocks with denyPostToolUsecreates session marker, subsequent edits allowedImpact
~/.claude/settings.jsoncontinue to work independentlyFiles changed
claude-code-plugin/hooks/hooks.json-- added three hook entries (was empty)