-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCLAUDE.md.snippet
More file actions
37 lines (26 loc) · 1.15 KB
/
CLAUDE.md.snippet
File metadata and controls
37 lines (26 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Sailkit Worktree Workflow
**CRITICAL:** Never work directly in base project folders. Use git worktrees for isolation.
## Rules
1. **Base folders stay on main** - Check `worktree-list` to see which folders are bases
2. **Create worktrees for tasks** - Each task gets its own worktree
3. **Never switch branches in base folders** - Use `worktree-new`, not `git checkout`
4. **Commit parent after child commits** - After committing in a worktree, commit and push the parent project to update `workflow.jsonl`
## Sub-Agent Pattern
For worktree operations, use the Task tool with an Explore agent to avoid cluttering the main conversation:
```
Task: Check worktree status
Run worktree-check and worktree-list, report any violations or issues.
```
This keeps worktree management isolated from your main task context.
## Commands
```bash
worktree-list # View all worktrees
worktree-new myrepo feature-branch # Create worktree
worktree-cleanup myrepo feature-branch # Remove after merge
worktree-sync # Rebuild manifest from git
```
## Recovery
If a base folder is on the wrong branch:
```bash
git -C myrepo checkout main
```