Skip to content

worktree: cover parallel slots and shared state - #76

Merged
jasperboerhof merged 1 commit into
mainfrom
lift/worktree-parallel-slots
Oct 5, 2026
Merged

jasperboerhof merged 1 commit into
mainfrom
lift/worktree-parallel-slots

Conversation

@bert-script

Copy link
Copy Markdown
Contributor

Why

Two gaps came up when a consumer asked for several worktrees for parallel work:

  • "Set me up three worktrees", with no work named, has no row in the argument table. Slugging the sentence gives one branch named after the request.
  • Step 3 isolates what sits inside the checkout. Two live worktrees also share whatever the env files point at: a dev database, a dev-server port, a cache namespace. Nothing fails; the second worktree quietly uses the first one's, and it shows up later as a migration nobody ran.

What

  • § 1 gains the N-slots shape: cut N worktrees on placeholder branches (wt1, wt2, …), say they are placeholders, hand back the rename. No invented ticket keys.
  • § 3 gains one exception for parallel slots: name the shared resources and the per-worktree arrangement. The specifics belong in the repo's house rules (references/<repo-name>.md in skills/, .claude/project-context.md's ## Worktrees in the plugin), never derived on a hunch.
  • Both copies change; each points at its own house-rules home.

From Lokale Keuze's copy of this skill (LK-1305). Their own reference file stays with them.

No plugin.json version bump. This is one of eight parallel PRs from the same consumer, and each bump would collide on the same line. Bump on merge as you prefer.

Test plan

  • Both copies carry the same two paragraphs, apart from where house rules live.
  • CI green

🤖 Generated with Claude Code

Two gaps found while cutting several worktrees for parallel work:

- "Set me up three worktrees", with no work named, has no row in the
  argument table. Slugging the sentence yields one branch named after
  the request. Cut N slots on placeholder branches and hand back the
  rename instead.
- Step 3 isolates what sits inside the checkout. Two live worktrees
  also contend for what the env files point at: a dev database, a
  dev-server port, a cache namespace. Sharing them is silent and shows
  up later as a migration nobody ran. Name those collisions, and keep
  the per-repo arrangement in the repo's own house rules.

Lifted from a consumer copy (Lokale Keuze, LK-1305).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
me up three worktrees so I can work in parallel", with no work named, is not free text to slug —
slugging the sentence yields one branch named after the request. Cut N worktrees on placeholder
branches (`wt1`, `wt2`, …), say plainly that the names are placeholders, and hand back the
rename: `git -C <path> branch -m <REAL-BRANCH>`, or `git -C <path> switch -c <REAL-BRANCH> <base>`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rename advice undoes the skill's own safety step (Step 2):

`--unset-upstream` is load-bearing. Branching from `origin/<integration>` makes git track that remote branch, so a later `git push` would update the integration branch itself.
The following --no-track flag prevents it:

`git -C <path> switch -c <REAL-BRANCH> --no-track <base>`

@jasperboerhof
jasperboerhof merged commit a411522 into main Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants