Skip to content

Worktrees by default: setup checks out the default branch as the first worktree - #11

Open
bracyw wants to merge 2 commits into
mainfrom
claude/worktrees-default
Open

bracyw wants to merge 2 commits into
mainfrom
claude/worktrees-default

Conversation

@bracyw

@bracyw bracyw commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What

.delphi/setup.sh now creates a worktree for each repo's default branch. repos/ stays as the repo store, and every checkout lives in worktrees/. Both are git-ignored through .git/info/exclude.

  • repos/<repo>: a bare store with no files, fetched from the workspace.yml URL.
  • worktrees/<repo>/<default-branch>/: the first worktree, created by setup (for Argos: worktrees/argos/develop/). A re-run re-creates it if it's missing.
  • .delphi/new-worktree.sh: creates worktrees/<repo>/<branch> from repos/<repo>. Existing origin branches now track origin/<branch>.
  • Updated the template, Argos defaults/, and argos-dev copies of the scripts, CLAUDE.md, and the new-worktree skill, plus argos-dev's implement skill, README.md, docs/design.md, and docs/goals.md.
  • tests/e2e.sh: adds checks for the bare store, the default worktree (including restoring it), both excludes, and an older plain clone.

Migration

An existing repos/<repo> that is a plain clone is kept. Setup warns that it can't check out the default branch, because that branch is already checked out in the plain clone. Re-clone it with setup to switch to the new layout.

Checks

bash tests/e2e.sh passes all 36 checks, including shellcheck. ci/check.sh is OK.

Note: #10 adds skills that mention repos/argos/. Whichever PR merges second needs those paths updated to worktrees/argos/develop/.

🤖 Generated with Claude Code

https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf

setup.sh fetches each repo into a bare store at worktrees/<repo>/.bare and
checks out the default branch as worktrees/<repo>/<default-branch>/; no more
repos/ clone. new-worktree.sh makes worktrees/<repo>/<branch> from that store
(existing origin branches now track origin). Template, Argos defaults,
argos-dev copies, README, design, goals, and e2e tests updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf
setup.sh stores each repo bare in repos/<name> and checks out the default
branch as the first worktree, worktrees/<name>/<default-branch> (re-created if
missing; an older plain clone in repos/ gets a warning). Both dirs excluded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf
@bracyw bracyw changed the title Worktrees by default: code repos live only under worktrees/ Worktrees by default: setup checks out the default branch as the first worktree Sep 27, 2026
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.

2 participants