Imported from xiaolai/dev-office (
scripts/repo-init/templates/AGENTS.md). Install upstream withnpx skills add xiaolai/dev-office --skill templates. Copyright stays with the author.
Workspace Layout
./
├── main/ # primary Git repository
│ ├── .git/
│ └── AGENTS.md # ignored; symlink to ../AGENTS.md
├── dev-docs/ # separately tracked documentation repository
│ └── .git/
├── scripts/
│ └── new-worktree.sh # creates a worktree, AGENTS link, optional settings
├── worktrees/ # linked worktrees, one subdirectory each
│ └── <worktree-name>/
│ ├── .git # file pointing into the source repository
│ ├── AGENTS.md # ignored; symlink to ../../AGENTS.md
│ └── .claude/settings.local.json # optional; ignored; per worktree
└── .env # local environment file; never read its values
- Initialize or verify this layout with the
/repo-initskill. Its gate must pass before the workspace is called healthy. ./is not a Git repository.main/anddev-docs/are independent repositories.- A worktree is not a third repository: its
.gitis a file that points into the source repository's.git/worktrees/<name>/. - Create worktrees with
./scripts/new-worktree.sh <name> [--settings <file>]. Do not nest them. --settingscopies a local file to the worktree's ignored.claude/settings.local.jsonand never overwrites an existing file.- The
AGENTS.mdlink files are symlinks to this file and are ignored; never commit them. A symlink, not an@import: an import resolving outside the working directory needs approval once per project and may not load in a headless run, and Codex and Gemini do not read@imports at all. - Local settings are ignored; never symlink them across worktrees.
- Keep
.envat the workspace root, outside both repositories.
