worktree
Create or open a Git worktree for a ticket or task with Grove and open it as a herdr-app space. Use it when asked to create, add, start, or open a worktree, optionally followed by a handover.
- License 许可
- MIT
- 所属仓库
- sQVe/tau
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- worktree
- metadata
- { "required-for": "creating a Git worktree" }
- description
- Create or open a Git worktree for a ticket or task with Grove and open it as a herdr-app space. Use it when asked to create, add, start, or open a worktree, optionally followed by a handover.
03 SKILL.md 正文
Worktree
When to use
Use this skill when the user asks for a worktree for a ticket or a piece of work. When you work from the bare repository root, an approved implementation task is such a request: create the worktree and hand the task over to it. Otherwise, agreeing to a change is not a request for a worktree. Grove creates the worktree and runs the repository's add hooks, such as dependency installs.
Hard rules
- For an implementation handover, check before
grove addthat the work is ready, as the handover skill defines it. Create no worktree while anything is open, unless the user says to plan in it. - Creating a worktree does not start work. Do not change the ticket's status unless the user asks. Do not start the work in the new worktree yourself. It belongs to the agent in that space.
- Report a failed
grove addbefore retrying or handing off. Do not work around it withgrove switch,--no-fetch, or--no-hooks. A refusal because the branch already has a worktree is not a failure; step 2 says how to handle it.
Procedure
- Choose the branch, in this order:
- The branch the user names.
- For a ticket, its Linear branch name from
linear issue view <ID> --json --no-pager. Pass--workspace <slug>when the ticket lives outside the default workspace. - If Linear has none, or there is no ticket, a descriptive kebab-case name from the ticket ID and title, or from the task.
- Run
grove add <branch> --name <lowercase-ticket-id>from the repository.- Omit
--namewithout a ticket. - Pass
--base <base>only for a new branch whose base the user or project names. Otherwise Grove uses the default branch. Grove rejects--basefor an existing branch. - If the branch already has a worktree, Grove refuses with
worktree already exists for branch "<branch>" at <path>and creates nothing. Use that<path>as the checkout in step 3.
- Omit
- Open the worktree as a space:
- Find a space to reuse by its folder in
herdr-app ls, never by its name. When a space has the checkout as its folder, show it withherdr-app do space.select --id <id>. - Never rename a reused space. The user may have renamed it by hand.
- With no space for the checkout, run
herdr-app do space.new --name "<title>" --folder "<checkout>". - Make
<title>a short title of what the work does, such ascompletion uses the read record: about 40 characters, lowercase, one line, and no ticket ID.
- Find a space to reuse by its folder in
- Send a handover to the new space with the handover skill when the user asked for one. From the bare repository root, also send the approved implementation task without waiting to be asked.
04 同仓库更多 Skills
benchmark-checklist
Check evidence before measuring performance or reporting a speedup, regression, or comparison.
update-branch
Rebase the current branch onto its base, resolve conflicts, and update the PR when asked. Use it for "rebase onto main", "fix conflicts", "the PR has conflicts", or when a rebase or merge stops on a conflict.
triage-findings
Verify review findings or comments the user asked you to act on, fix the supported ones in scope, and report each one as Fixed, Not worth changing, Incorrect, or Blocked. Use it for "triage these findings", "fix these review comments", or "act on the findings I approved". `code-review`, `pr`, and `start-slice` also start it after a review of the user's own work.
tracker
Write Linear tickets by Tau's rules. Pick the type and template, route it, search for duplicates, and use checked tools for ticket writes and the two allowed status changes. Use it for "file a bug", "create a ticket", or "add a follow-up ticket". It does not split designs or start slices.
tdd
Change behavior test-first with Tau's run_tests tool, then verify the affected tests and a mutation check. Use it when changing behavior. Covers the cycle and survivor handling, not test design.
start-slice
Start one slice of a planned design. Creates its branch and its agent tickets in Linear, then delegates the work. Picks the next slice from order, dependencies, and merge state, and reports the branch, base, and agent tickets it created. Use it for "start the next slice", "start ENG-123", or "begin this ticket as a slice". It does not split a design into slices.