You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Switch pre-commit hook install from symlink to
`git config core.hooksPath` (works in worktrees where .git
is a file, not a directory)
- Add Worktrees section to Git Workflow: branch semantics,
data/ symlink requirement, .venv setup, relative path rule
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If formatting fails, run `cargo fmt --all` to fix, then re-commit. If clippy fails, fix the warning before committing. Never suppress clippy warnings with allows. Never skip the hook with `--no-verify`.
@@ -194,6 +194,16 @@ If formatting fails, run `cargo fmt --all` to fix, then re-commit. If clippy fai
194
194
- Main branch: `main`.
195
195
-**Standard pre-commit sequence:**`/simplify` → `/review` → `/ship` → `/commit`. Run all four in order when a feature is done.
196
196
197
+
### Worktrees
198
+
199
+
Sessions may run in a git worktree (e.g. `.claude/worktrees/<name>/`). Worktrees share the same `.git` history but have their own branch and working directory.
200
+
201
+
-**Commits land on the worktree branch**, not `main`. When the user says "push", they likely mean push to `main`. Use `git -C <main-repo> cherry-pick <hash>` then push from the main repo, or ask to confirm.
202
+
-**`data/` is gitignored** and won't exist in a fresh worktree. Scripts that need COCO data (`parity.py`, `bench.py`) require a symlink: `ln -s /Users/derek/coco-rust/data data`
203
+
-**`.venv`** is created per-worktree by `just setup`. Run it once in a new worktree.
204
+
-**Pre-commit hook** uses `git config core.hooksPath` (not a symlink), so it works in both the main repo and worktrees.
205
+
-**All paths in skills and scripts must be relative** — never hardcode the main repo path.
206
+
197
207
### Before every commit — communication surfaces
198
208
199
209
Run `/ship` before committing. It enforces these gates in order:
0 commit comments