RUL-035 — Hooks live at the user level only and scope themselves to the project in cwd

Ruling

Mohamed, 2026-10-06, during the P4 review of plans/ast-daemon-deployment-plan.md, verbatim: "hooks at user level only but apply to the project in cwd,soo they apply to all projects, add it to the rules".

Every Claude Code hook is registered at the USER level: ~/.claude/settings.json, ~/.claude/hooks/, or the installed orchestrata plugin's hooks/hooks.json. Each hook resolves the repository that owns the current working directory at run time and exits 0 in any other tree (the plugins/orchestrata/project-hooks/_dispatch.sh pattern), so one registration governs every project a session is opened in. No repository registers hooks in its own <repo>/.claude/settings.json.

Evidence

Enforcement

Mechanism (RUL-014)

Judgment-only at recording time. Candidate gate, a follow-up packet: a scripts/check_* gate (extend scripts/check_prod_tree_separation.py under RUL-027, or a new check_hooks_user_level.py) that fails when any tracked <repo>/.claude/settings.json contains a hooks key. The retirement itself (delete the 31 project-level registrations after confirming each has a plugin copy, delete the dispatcher stand-down branch, redeploy through deploy/install-claude-config.sh) is ADR-0067 P7 scope at the earliest. When the gate lands, the index row moves from none (judgment) to the gate and this section names the commit.

Verification