docs+config: בידוד-סשנים נתמך-סביבה לעבודה מקבילה (worktree defaults) #73

Merged
chaim merged 1 commits from worktree-docs-worktree-defaults into main 2026-06-06 17:16:47 +00:00
Owner

מה ולמה

ב-~/legal-ai רצים במקביל כמה סשנים אינטראקטיביים וגם סוכני Paperclip על אותו עץ-עבודה משותף → מירוץ-ענף (תועד 2026-06-06). הכלל הקיים היה דיסציפלינה ידנית בלבד, ולכן לא מספיק: worktree טרי הוא checkout נקי — חסר web-ui/node_modules (789MB → npm run lint/build/api:types נשבר), לא עובר .claude/settings.local.json (הצפת אישורים), ו-.claude/worktrees/ לא היה ב-.gitignore.

ה-PR הופך את הבידוד לברירת-מחדל נתמכת-סביבה, לפי המקורות הרשמיים של Anthropic (worktrees, settings) ו-Git.

שינויים

  • .claude/settings.jsonworktree.baseRef: "fresh" (בסיס מ-origin/main), worktree.symlinkDirectories: ["web-ui/node_modules"] (שיתוף 789MB במקום npm ci לכל worktree), ו-WorktreeRemove hook עם --force לעקיפת באג cleanup #40259. ה-hook הקיים של spec-guard.sh נשמר.
  • .worktreeinclude (חדש) — מעתיק .claude/settings.local.json (allowlist הרשאות) + קבצי-env לכל worktree.
  • .gitignore — הוספת .claude/worktrees/ (טיפ רשמי).
  • CLAUDE.md — שדרוג מקטע "בידוד-סשנים": claude --worktree/EnterWorktree כברירת-מחדל תחת .claude/worktrees/, caveat בידוד-DB (אסור migrations מ-2 worktrees על localhost:5433), ואזכור באג #60588 (אימות baseRef).

Invariants

config+docs בלבד — לא קוד תחת web//mcp-server//web-ui//scripts/, ולכן מחוץ לשער spec-guard ולא נוגע ב-G1–G11/INV. בוצע ב-worktree מבודד (feedback_shared_worktree_branch_race) ולפי feedback_always_pr_merge.

אימות

claude --worktree wt-testls -la web-ui/node_modules (סימלינק), cat .claude/settings.local.json (הועתק), cd web-ui && npm run lint (ללא reinstall), git status נקי מ-.claude/worktrees/.

🤖 Generated with Claude Code

## מה ולמה ב-`~/legal-ai` רצים במקביל כמה סשנים אינטראקטיביים **וגם** סוכני Paperclip על אותו עץ-עבודה משותף → מירוץ-ענף (תועד 2026-06-06). הכלל הקיים היה **דיסציפלינה ידנית בלבד**, ולכן לא מספיק: worktree טרי הוא checkout נקי — חסר `web-ui/node_modules` (789MB → `npm run lint/build/api:types` נשבר), לא עובר `.claude/settings.local.json` (הצפת אישורים), ו-`.claude/worktrees/` לא היה ב-`.gitignore`. ה-PR הופך את הבידוד ל**ברירת-מחדל נתמכת-סביבה**, לפי המקורות הרשמיים של Anthropic ([worktrees](https://code.claude.com/docs/en/worktrees), [settings](https://code.claude.com/docs/en/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](https://github.com/anthropics/claude-code/issues/40259). ה-hook הקיים של `spec-guard.sh` נשמר. - **`.worktreeinclude`** (חדש) — מעתיק `.claude/settings.local.json` (allowlist הרשאות) + קבצי-env לכל worktree. - **`.gitignore`** — הוספת `.claude/worktrees/` (טיפ רשמי). - **`CLAUDE.md`** — שדרוג מקטע "בידוד-סשנים": `claude --worktree`/EnterWorktree כברירת-מחדל תחת `.claude/worktrees/`, caveat בידוד-DB (אסור migrations מ-2 worktrees על `localhost:5433`), ואזכור באג [#60588](https://github.com/anthropics/claude-code/issues/60588) (אימות `baseRef`). ## Invariants config+docs בלבד — לא קוד תחת `web/`/`mcp-server/`/`web-ui/`/`scripts/`, ולכן מחוץ לשער spec-guard ולא נוגע ב-G1–G11/INV. בוצע ב-worktree מבודד ([[feedback_shared_worktree_branch_race]]) ולפי [[feedback_always_pr_merge]]. ## אימות `claude --worktree wt-test` → `ls -la web-ui/node_modules` (סימלינק), `cat .claude/settings.local.json` (הועתק), `cd web-ui && npm run lint` (ללא reinstall), `git status` נקי מ-`.claude/worktrees/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-06 17:16:41 +00:00
הופך את כלל ה-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>
chaim merged commit 24f9ceb164 into main 2026-06-06 17:16:47 +00:00
chaim deleted branch worktree-docs-worktree-defaults 2026-06-06 17:16:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezer-mishpati/legal-ai#73