הופך את כלל ה-worktree המבודד מ-דיסציפלינה-ידנית ל-ברירת-מחדל נתמכת-סביבה, לפי המקורות הרשמיים של Anthropic (worktrees + settings) ו-Git. - .claude/settings.json: worktree.baseRef=fresh (בסיס מ-origin/main), worktree.symlinkDirectories=[web-ui/node_modules] (שיתוף 789MB במקום npm ci לכל worktree), ו-WorktreeRemove hook עם --force לעקיפת באג cleanup #40259. spec-guard נשמר. - .worktreeinclude: העתקת .claude/settings.local.json (allowlist הרשאות) + env לכל worktree. - .gitignore: הוספת .claude/worktrees/ (טיפ רשמי) — מנקה את git status של העץ הראשי. - CLAUDE.md: שדרוג מקטע "בידוד-סשנים" — claude --worktree כברירת-מחדל תחת .claude/worktrees/, caveat בידוד-DB (לא migrations מ-2 worktrees), אזכור באג #60588 (אימות baseRef). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
669 B
JSON
30 lines
669 B
JSON
{
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Edit|Write|MultiEdit",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "${CLAUDE_PROJECT_DIR}/scripts/spec-guard.sh"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"WorktreeRemove": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "jq -r '.tool_input.path // empty' | { read -r wt; [ -n \"$wt\" ] && git worktree remove --force \"$wt\" 2>/dev/null; git worktree prune 2>/dev/null; } || true"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"worktree": {
|
|
"baseRef": "fresh",
|
|
"symlinkDirectories": ["web-ui/node_modules"]
|
|
}
|
|
}
|