-
Notifications
You must be signed in to change notification settings - Fork 0
improvement: migrate enforcement hooks to plugin package hooks/hooks.json #447
Copy link
Copy link
Open
Labels
P1Critical / blocks current releaseCritical / blocks current releaseenhancementNew feature or requestNew feature or requestroadmap:automation-hardeningv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationroadmap:hook-packsOpt-in Claude Code hook packs — worktree, branch, markdown, secrets, transition guardsOpt-in Claude Code hook packs — worktree, branch, markdown, secrets, transition guardstrack:specorator-improvementImprovement to the Specorator template itselfImprovement to the Specorator template itself
Metadata
Metadata
Assignees
Labels
P1Critical / blocks current releaseCritical / blocks current releaseenhancementNew feature or requestNew feature or requestroadmap:automation-hardeningv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationv0.7 automation contract — registry, verify tiers, agent checks, Zod runtime validationroadmap:hook-packsOpt-in Claude Code hook packs — worktree, branch, markdown, secrets, transition guardsOpt-in Claude Code hook packs — worktree, branch, markdown, secrets, transition guardstrack:specorator-improvementImprovement to the Specorator template itselfImprovement to the Specorator template itself
Context
Part of the plugin audit in #444 (§3, R1 — highest-impact finding). Two active enforcement hooks live in
.claude/settings.json(project-local only). When adopters install Specorator as a plugin, neither hook is bundled — branch protection and memory reminders require manual setup. This is the single largest adopter experience gap.Current hooks to migrate
Hook 1 — SessionStart: memory reminder
{ "matcher": "*", "hooks": [{"type": "command", "command": "test -f .claude/memory/MEMORY.md && echo '[memory] Read ...' || true"}] }Hook 2 — PreToolUse: branch guard (Python-based)
{ "matcher": "Bash", "hooks": [{"type": "command", "command": "... [Python guard blocking commits to main/develop] ..."}] }Work
claude-plugin/specorator/hooks/hooks.jsonwith both hooks migratedscripts/build-claude-plugin.tsto copy/generatehooks/hooks.jsoninto the plugin package2= blocking,1= non-blocking — see research: Claude plugin developer best-practices audit — gaps, standards, refactor opportunities #444 §3)scripts/check-claude-plugin.tsto validatehooks/hooks.jsonpresence (or defer to the validator ticket)Important: exit code semantics
Definition of Done
claude-plugin/specorator/hooks/hooks.jsonexists with both hooksbuild:claude-plugincopies hooks file into generated package2(not1) on violationcheck:claude-pluginvalidates hooks presence (or tracked in separate validator issue)References
check:claude-pluginextension