Skip to content

Commit 95b03a3

Browse files
committed
docs: keep feature worktrees inside workspace
1 parent e02e3cb commit 95b03a3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ coverage/
1111
.claude/settings.local.json
1212
.claude/skills/
1313
.cursor/skills/
14+
15+
.worktrees/

skills/dev-lifecycle/references/worktree-setup.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ Use this setup for **new feature starts** unless the user explicitly requests no
88
- Call out that branch/workspace isolation is reduced.
99
- Skip to step 7 (dependency bootstrap).
1010
3. Otherwise (default), use branch/worktree name `feature-<name>`.
11-
4. Create worktree directory as sibling path `../feature-<name>`.
12-
5. If branch does not exist: `git worktree add -b feature-<name> ../feature-<name>`.
13-
6. If branch exists: `git worktree add ../feature-<name> feature-<name>`.
14-
7. If using worktree, switch and verify context before any other step:
15-
- `cd ../feature-<name>`
16-
- `pwd` must end with `/feature-<name>`
17-
- `git branch --show-current` must equal `feature-<name>`
11+
4. Create worktree directory inside current workspace at `.worktrees/feature-<name>`.
12+
5. If branch does not exist: `git worktree add -b feature-<name> .worktrees/feature-<name>`.
13+
6. If branch exists: `git worktree add .worktrees/feature-<name> feature-<name>`.
14+
7. If using worktree, verify and operate in that context without changing to paths outside the workspace:
15+
- Verify branch with `git -C .worktrees/feature-<name> branch --show-current` (must equal `feature-<name>`).
16+
- Run all phase commands with explicit workdir set to `.worktrees/feature-<name>` (or use `git -C .worktrees/feature-<name> ...` for git commands).
1817
8. Bootstrap dependencies before any phase work (be proactive and project-specific):
1918
- Detect language/ecosystem first by checking lockfiles, manifest files, and common tooling configs.
2019
- Prefer deterministic, lockfile-based installs when available.

0 commit comments

Comments
 (0)