Stop the dev-work flow from camping on main #304

Merged
nelsong6 merged 1 commit from claude/dev-work-no-main-camping into main 2026-08-08 12:46:16 -07:00
nelsong6 commented 2026-08-08 12:46:10 -07:00 (Migrated from github.com)

The dev-work skill told agents to check main out twice — "Switch to local
main, pull fast-forward only"
at session start, and "Switch to main and
pull latest origin/main after merge"
at the end. Git allows one worktree per
branch, so the clone that follows those steps holds main hostage from every
other worktree.

Concrete failure: gh pr merge --delete-branch run from a feature worktree
dies with fatal: 'main' is already used by worktree at 'D:/repos/spirelens'.
The merge has already succeeded by then, so it surfaces as a post-merge cleanup
error that reads like a failed merge. Hit this on #303.

Fix: both steps now update main as a ref via git fetch origin main:main,
which fast-forwards and fails loudly on divergence without checking anything
out. The start section also states the no-camping rule and the
git checkout --detach recovery for a clone already parked there.

Left alone: internal/host/preparehost.go checks out main in the separate
SpireLensMcp clone. That is a single-worktree repo that legitimately tracks
main, not a camping case.

Docs only; no code or behavior change, and no mod version bump.

The dev-work skill told agents to check `main` out twice — *"Switch to local `main`, pull fast-forward only"* at session start, and *"Switch to `main` and pull latest `origin/main` after merge"* at the end. Git allows one worktree per branch, so the clone that follows those steps holds `main` hostage from every other worktree. **Concrete failure:** `gh pr merge --delete-branch` run from a feature worktree dies with `fatal: 'main' is already used by worktree at 'D:/repos/spirelens'`. The merge has already succeeded by then, so it surfaces as a post-merge cleanup error that reads like a failed merge. Hit this on #303. **Fix:** both steps now update `main` as a ref via `git fetch origin main:main`, which fast-forwards and fails loudly on divergence without checking anything out. The start section also states the no-camping rule and the `git checkout --detach` recovery for a clone already parked there. Left alone: `internal/host/preparehost.go` checks out `main` in the separate SpireLensMcp clone. That is a single-worktree repo that legitimately tracks main, not a camping case. Docs only; no code or behavior change, and no mod version bump.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens!304
No description provided.