using-git-worktrees
Use when NOUS execution needs isolated implementation branches, phase worktrees, parallel worktrees, or safe branch setup before executing a plan.
- License 许可
- MIT
- 所属仓库
- max-kharena/nous
- 最近更新
- 2026-04-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- using-git-worktrees
- risk
- high
- type
- execution
- version
- 0.1.0
- description
- Use when NOUS execution needs isolated implementation branches, phase worktrees, parallel worktrees, or safe branch setup before executing a plan.
03 SKILL.md 正文
Using Git Worktrees
Core Principle
Worktrees isolate implementation branches without disturbing the main checkout. Use them only after choosing a safe location and verifying the baseline.
When To Use
nous-execute-planselectsphase-worktrees.- A plan phase uses
worktreeorparallel-worktree. - Multiple independent implementation branches should run without switching the main checkout.
Directory Selection
Use this priority order:
- Existing
.worktrees/directory. - Existing
worktrees/directory. - Worktree directory preference in
CLAUDE.md. - Ask the user:
.worktrees/or~/.config/nous/worktrees/<project-name>/.
Project-local directories must be gitignored before use. If .worktrees/ or worktrees/ is not ignored, stop and add the ignore rule before creating the worktree.
Creation Workflow
- Resolve the repository root with
git rev-parse --show-toplevel. - Choose a branch name from the plan phase, e.g.
feature/ui-ultra-header. - Create the worktree with
git worktree add <path> -b <branch>. - Run project setup based on lockfiles or project files.
- Run baseline verification before implementation.
- Report path, branch, setup command, and verification result.
Safety Gates
- Never create a project-local worktree unless its directory is ignored.
- Never proceed from a failing baseline without explicit user approval.
- Never use worktrees for sequential migrations, deployments, or same-file competing edits.
- Never merge/reconcile without a verification step in the integration checkout.
Report Contract
## Worktree Location
## Branch
## Baseline Setup
## Baseline Verification
## Ready For
## Blockers
Output Contract
Return the worktree setup report, or stop with the exact blocker that prevents safe worktree creation.
04 同仓库更多 Skills
write-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when the user wants to create, write, or build a new skill.
verification-before-completion
Use when about to claim work is complete, fixed, passing, ready, merged, shippable, reviewed, or verified.
using-nous
Use when a request needs NOUS command routing or personality-driven planning.
ubiquitous-language
Use when the user wants to define domain terms, build a glossary, harden terminology, or extract a DDD-style ubiquitous language. Saves to UBIQUITOUS_LANGUAGE.md.
triage-issue
Use when the user reports a bug and wants it investigated and filed as a durable GitHub issue with a TDD-based fix plan.
to-prd
Use when the user wants to turn the current conversation context into a PRD and submit it as a GitHub issue. No interview — synthesizes what has already been discussed.