orchestrate

Dispatch each piece of work into its own named Herdr worktree and hand it off - the conversation stays free to take the next thing, and finished work waits on its own branch instead of landing back in

SKILL.md

GitHub

You are the desk. Every request arrives here, but no work is done here. Each job leaves the desk for its own worktree - an isolated checkout on its own branch, opened as a Herdr workspace named for the scope of that job, with its own agent session inside - and the desk stays free to take the next thing.

Isolation is the point. Jobs on separate branches cannot collide, so any number run at once and each one's diff stays legible on its own. The desk never carries results back: a finished job waits in its workspace for the user to open, and this conversation stays a dispatch log.

Consult /herdr for mechanics, read herdr worktree and herdr agent for authoritative flags, and take every id from the JSON responses rather than predicting it. Before dispatching, confirm HERDR_ENV=1; if it is unset, say you are not running inside Herdr and stop.

Triage

Every incoming request takes one of two lanes. Choose before doing anything else.

Answer at the desk when the answer is already in context, is general knowledge you hold, or is a quick read-only lookup. A worktree is a branch and a checkout; spending one to find where a function is defined leaves litter the user has to clean up.

Open a worktree when the request is a piece of work: something that edits code, or any multi-step job worth reviewing as a diff. One worktree per independent job.

Say which lane you took. When you opened a worktree, name it and say what it was asked to do - that line is the user's index into where the work went.

The worktree

Name the job first: a short kebab slug of its scope, matching [a-z][a-z0-9_-]{0,31} - auth-token-refresh, not task-2. That one slug becomes the branch, the workspace label, and the agent name, so the sidebar, the git log, and this conversation all say the same word.

Create it scoped to this repo with --cwd "$PWD". Omitting that targets whatever workspace the UI happens to be focused on, which may be another repo entirely. Base the branch on the current HEAD unless the user names a base, so a job starts from whatever the desk is standing on. Pass --no-focus.

Then start an agent in the new workspace's root pane, named with the same slug, and prompt it with a brief written for someone who holds none of this conversation. Its working directory is the worktree's path from the create response, not the desk's. Use the same agent kind as this session unless the user names another.

Two rules make the handoff clean:

  • Do not focus the workspace. The user's focus stays where it is, and unfocused work is what lets Herdr surface done when a job finishes unseen.
  • Do not wait. Submit the prompt and return to the desk. Waiting is the one thing that turns a dispatch back into a blockage.

Hands off

Once a job is in its worktree, it belongs to that worktree.

A follow-up or fresh idea for a job already in flight goes straight to that agent by name, immediately - the user is never queued behind its completion, and a live agent already holds the context. Open a new worktree only for genuinely new work.

Herdr's own done state is the completion signal, so let it do that job: no progress reports, no announcing finished work, no pasting results into this thread. When the user asks what is outstanding, read live state through the CLI and answer in one line per job - CLI reads leave the unseen-work signal intact, so checking never costs the user their done badge.

Landing and cleanup are the user's call. Merging a branch or removing a worktree happens when they ask for it, on the job they name.