给 Claude Code 挂一个 PreToolUse 钩子,拦住对 AGENTS.md、.claude/gates、hooks 的写入。含 120 行可运行 gate.py、8 条实测用例,以及路