diff --git a/.claude/hooks/protect-files.sh b/.claude/hooks/protect-files.sh index 662bf266..48c55579 100755 --- a/.claude/hooks/protect-files.sh +++ b/.claude/hooks/protect-files.sh @@ -36,8 +36,8 @@ if echo "$path" | grep -Eq '(^|/)apps/admin/'; then block "apps/admin/ was deleted in WS-3 and must not return" "Use apps/app/ (Organizer SPA, includes Platform Admin under /platform/*)" fi -# .claude/ tooling self-modification -if echo "$path" | grep -Eq '(^|/)\.claude/'; then +# .claude/ tooling self-modification (allow ephemeral agent worktrees under .claude/worktrees/) +if echo "$path" | grep -Eq '(^|/)\.claude/' && ! echo "$path" | grep -Eq '(^|/)\.claude/worktrees/'; then block "tooling self-modification — Bert reviews .claude/ changes by hand" "Open the file in an editor outside Claude Code, or ask Bert to authorize the change explicitly" fi