Skill
Isolated git worktree workflow for any multi-file implementation task on Asset Rise. Use whenever a task changes more than one file: create a worktree, delegate to Claude Code CLI inside it, pass qa-gate there, get Vision’s review, merge, clean up. Never edit the main checkout directly.
Playbook (mirrored from disk)
Worktree Flow — Isolated Multi-File Work
Rule: NEVER work directly on the ~/silver-castle main checkout for multi-file changes (half-done edits poison everyone’s view, and the deploy script pulls main). One worktree per specialist per task — parallel specialists never share a worktree.
1. Create
git -C ~/silver-castle worktree add ~/worktrees/<task-slug> -b feat/<task-slug>Slug = short kebab description (e.g. tender-export).
2. Implement via Claude Code CLI inside the worktree
cd ~/worktrees/<task-slug>
claude --print "<full task spec: files, conventions/skills to follow, acceptance criteria, gates>"(or interactive claude for iterative work). Permission scope = THIS worktree only — the CLI must not touch ~/silver-castle or other worktrees. Give the complete spec up front; vague prompts produce off-convention code.
3. Iterate until qa-gate passes INSIDE the worktree
Run the qa-gate skill with all commands executed in ~/worktrees/<task-slug> (typechecks, tests, build). npm install there first if node_modules is missing. Fix and rerun until PASS — do not hand off a FAIL.
4. Review
Present to Vision: branch name, git -C ~/worktrees/<task-slug> diff main --stat, what changed and why, qa-gate verdict. Wait for the review verdict — never self-merge.
5. Merge (only after review approval + green gates)
git -C ~/silver-castle merge --no-ff feat/<task-slug> # or rebase, per Vision's callIf other work landed on main in between, re-run the gates on main after merging.
6. Clean up
git -C ~/silver-castle worktree remove ~/worktrees/<task-slug>
git -C ~/silver-castle branch -d feat/<task-slug>Don’t leave stale worktrees — they pin branches and confuse the next task.