Merged
Conversation
Registers WorktreeCreate and WorktreeRemove hooks in .claude/settings.json that call scripts/worktree-create.sh and scripts/worktree-remove.sh, so Claude Code worktrees get a fresh branch off dev/main, the .env copied in, an isolated SQL Server database for demo-site when present, and cleanup on removal. Adds .claude/worktrees/ to .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Project-level allow list isn't needed by the worktree hooks and several entries (demo-site pkill, dotnet build/run) were specific to another repo. Keep project settings hook-only; leave permission allowlisting to user-level settings.local.json. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hifi-phil
added a commit
that referenced
this pull request
Apr 22, 2026
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
WorktreeCreateandWorktreeRemovehooks in.claude/settings.jsonthat shell out toscripts/worktree-create.shandscripts/worktree-remove.sh.origin/dev(falling back tomain/master), copy.env, and — when ademo-site/is present — provision an isolated SQL Server database and rewritelaunchSettings.jsonto use dynamic ports. Remove tears the database and worktree down..claude/worktrees/to.gitignoreand ships a.worktreeincludestub listing files the create script copies in.Test plan
EnterWorktreea fresh slug and confirm the worktree appears under.claude/worktrees/<slug>on a newfeature/<slug>branch..envis copied into the new worktree when one exists at the repo root.ExitWorktreeand confirm the worktree + branch are cleaned up.demo-site/, confirm the SQL Server DBumbraco-mcp-editor-<slug>is created on enter and dropped on exit.🤖 Generated with Claude Code