git-worktree-workflow
Start, work in and clean up an isolated agent worktree under .worktrees/.
- License 许可
- MIT
- 最近更新
- 2026-08-08
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- git-worktree-workflow
- description
- Start, work in and clean up an isolated agent worktree under .worktrees/.
03 SKILL.md 正文
Git Worktree Workflow
Purpose
Keep parallel agent implementation isolated while the main checkout stays the
coordination and integration surface. Pairs with worktree-status (what is
currently active) and backlog-status (what is currently claimed).
Start Work
-
From the main checkout, inspect
AGENTS.md,HANDOFF.toonandPROJECT_PROFILE.toon, and runproject worktree-statusto confirm no other worktree already claims the same scope. -
Choose a short lowercase slug for the task.
-
Create the worktree from the intended integration base:
git worktree add -b <agent>/<slug> .worktrees/<agent>-<slug> HEAD -
Add a short line to
in_progress:inHANDOFF.toonnaming the branch and worktree before implementation, soworktree-statusandbacklog-statusagree with git.
During Work
- Keep changes inside the claimed scope; if it must grow, update
HANDOFF.toonfirst or record the open question instead. - Validate with repository commands (
project lint,project test, ...), not ad hoc tooling. - Keep
HANDOFF.toonsemantic and compact — seehandoff-maintenance.
Integration
- Run the cheapest meaningful validation first, then broader checks.
- Commit on the agent branch, push it, and open a PR per the branch/PR
workflow in
AGENTS.md. - Human or lead agent owns merge — do not merge your own worktree branch.
- After merge, remove the
in_progress:entry and update the main checkout.
Cleanup
Never remove a dirty worktree. Confirm state first:
git -C .worktrees/<agent>-<slug> status --short
If clean and the branch is integrated (or intentionally abandoned):
git worktree remove .worktrees/<agent>-<slug>
git branch -d <agent>/<slug>
Use git branch -D only when the project lead has explicitly chosen to
discard the branch, and record why in HANDOFF.toon.
04 同仓库更多 Skills
agentic-template
Start or continue work in this repository using the canonical AGENTS.md contract and repository skill catalog.
wiki-tidy
Reconcile the wiki against the knowledge graph, specs and code; prune stale, keep links resolving.
update-handoff
Update HANDOFF.toon with current semantic work state.
test-first
Drive meaningful behaviour changes with the smallest useful failing test.
test-change
Select and run tests that prove a change at suitable fidelity.
specify
Create proportional OpenSpec-shaped structured change proposals for meaningful changes.