Skip to content

Propose a Repo and Worktree Layout Convention and a repo-worktree Skill #699

Description

@ptr727

Every repo on server-2 currently lives loose at the top of ~, one directory per repo, indistinguishable from scratch files and notes without a git status check. This already produced 6 independent clones of ptr727/ProjectTemplate on one machine, and 3 task worktrees that look like ordinary repo directories.

This proposes a standard layout, for AGENTS.md at the home-directory root of any machine in the fleet:

~/repos/<Repo>                          base clone, on its default/working branch
~/repos/worktrees/<Repo>-<task-slug>    one worktree per in-flight task, own branch

Reasoning: <Repo> is flat with no owner segment, since a repo name is unique within a single GitHub owner and every repo here is under one owner (forks already carry the upstream owner in the name at fork time, for example esphome-esphome). A single top-level worktrees/ directory, not nested per repo, keeps "what is in flight right now" a single ls across the whole fleet instead of a walk per repo, and keeps generic repo-discovery tooling from mistaking a worktree for a second repo.

This also proposes a repo-worktree skill for the fleet skill registry that wraps git worktree add, list, and remove against these paths: create a worktree for <Repo> and <task-slug> off origin/<base-branch>, list worktrees across all base repos under ~/repos/, and remove one plus its branch after merge. It should also note that Claude Code's own EnterWorktree tool defaults to .claude/worktrees/ inside a repo when given a name. To land on the convention path, create the worktree with git worktree add first and attach with EnterWorktree path:, not name:.

Filed as a proposal only. The actual home-directory migration to this layout is tracked separately and runs once in-progress repo work across the fleet is closed out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions