---
name: herdr-orchestration
description: "Orchestrate multiple AI agents in parallel through herdr. Use for multi-worker or multi-file coding tasks, parallel implementation waves, isolated worktrees, or when the user mentions herdr or multi-agent orchestration."
title: herdr-orchestration
canonical_url: https://skilld.dev/gh/askprateek/skills/herdr-orchestration
last_updated: 2026-09-28T13:53:12.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/cli.md](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/references/cli.md), [roles/admin.md](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/roles/admin.md), [roles/main.md](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/roles/main.md), [roles/worker.md](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/roles/worker.md), [scripts/herdr-await](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-await), [scripts/herdr-launch](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-launch), [scripts/herdr-panes](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-panes), [scripts/herdr-say](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-say), [scripts/herdr-watch](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-watch), [scripts/herdr-worker](https://skilld.dev/api/skills-raw/askprateek/skills/herdr-orchestration/scripts/herdr-worker).
>
> If the user asked to install this Skill, run `npx skilld install askprateek/skills/herdr-orchestration`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/herdr-orchestration`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/askprateek/skills/herdr-orchestration) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/herdr-orchestration`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/herdr-orchestration --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/herdr-orchestration --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Standard Herdr Orchestration

This root file holds what every role shares: the hierarchy, the scripts, the
herdr CLI reference, the sentinel vocabulary, and the hard rules. Read it first,
then read your role file:

| You are | Also read |
|---|---|
| **Main** (user-facing) | `skill://herdr-orchestration/roles/main.md` |
| **Admin** (orchestrator) | `skill://herdr-orchestration/roles/admin.md` |
| **Worker** (implementation / review) | prompt from Admin; source is `skill://herdr-orchestration/roles/worker.md` |

## Hierarchy

Main → Admin → Workers → Admin → Main. No layer skips.

- **Main** — user-facing; routes instructions to Admin. Full role: `roles/main.md`.
- **Admin** — orchestrator on the main branch, no worktree; dispatches workers, reports to Main. Full role: `roles/admin.md`.
- **Implementation worker** — one worktree/branch/pane; reports to Admin. Full role: `roles/worker.md`.
- **Review worker** — read-only, no worktree; reports to Admin. Full role: `roles/worker.md`.
- **Checker** — one per active worker, owned by Admin; observes only, reports to Admin.

## Scripts (prefer these over raw herdr)

Skill-local wrappers live in `scripts/` next to this file. Each fails loud
(clear message + nonzero exit, never silent empty output) and prints a
machine-parseable last line. Call by the skill's own absolute path so any
agent can use them even without loading this skill — resolve `<skill-root>`
to the directory containing the `SKILL.md` you are reading (install location
varies: `skills/herdr-orchestration` in a checkout, a managed-skills path,
etc. — never assume a fixed path like `~/.omp/agent/skills/…`) and set:

```bash
S=<skill-root>/scripts
```

| Script | Purpose | Usage |
|---|---|---|
| `herdr-worker` | create worktree + launch worker OMP | `herdr-worker <branch> <base> <label> <model> <repo>` |
| `herdr-launch` | launch OMP in a pane (Admin / non-worktree) | `herdr-launch <model> <cwd> [--beside <pane>] [--label <text>]` |
| `herdr-say` | submit a prompt to a running OMP | `herdr-say <pane> <prompt...>` |
| `herdr-await` | block until a pane is idle, then read it (Admin→downstream only) | `herdr-await <pane> <lines> <timeout_s>` |
| `herdr-watch` | read an agent pane's recent output | `herdr-watch <pane> <lines>` |
| `herdr-panes` | list panes as a table | `herdr-panes [tab_id\|workspace_id]` |

`herdr-worker` and `herdr-launch` print `PANE=… …` as their last line — capture
the pane id from it. The raw CLI reference (`skill://herdr-orchestration/references/cli.md`) is the fallback for the long tail.

`herdr-worker` and `herdr-launch` place the agent under the **project's own
workspace** (worker: `pane move` into it, auto-closing the throwaway per-worktree
workspace; launch: `tab create --workspace` derived from the cwd) and title its
tab with the `label` — so agents appear named alongside the project, never
stranded in the orchestration workspace. Always pass a meaningful label.

**No `agent start` needed:** herdr detects the OMP agent from pane content, so
launching `omp --model X` via `herdr pane run <pane_id> "omp --model <model>"`
INTO an existing pane (the `worktree create` root, `tab create` root, or a
fresh `pane split`) is fully tracked and observable via `herdr agent read`.
`agent start` only bundles pane-create + launch + an optional `--name` — and
`agent start --tab` adds an unwanted second pane beside the root. The
`herdr-launch` / `herdr-worker` scripts already do this correctly; prefer them
over raw `agent start`.

Raw herdr CLI fallback reference: `skill://herdr-orchestration/references/cli.md`

## Sentinels

Workers signal state to Admin with one of three sentinels; Admin and checkers
classify on these exact strings:

- `WORKER <ID> DONE: <sha>` — slice complete at the given commit.
- `NEEDS-INPUT <ID> — <question>` — a decision is required.
- `BLOCKER <ID> — <what>` — progress is blocked.

## Hard rules
- Admin never edits source files.
- Workers report to Admin only — never to Main.
- **Main never blocks on Admin or workers.** Main dispatches and returns to
  idle; Admin wakes it by writing into Main's pane. Only the user blocks Main.
- Admin never blocks waiting for workers — use checkers or `herdr-await`.
- `herdr worktree create` forks herdr's active project, not the shell cwd — so
  the repo is a REQUIRED positional (`herdr-worker <branch> <base> <label>
  <model> <repo>`, `herdr-launch <model> <cwd> …`). No default: a missing repo
  errors instead of forking the wrong project.
- Never merge to main without explicit user approval.
- Never commit scratch artifacts.
- Never reuse a delivered integration branch.
- Never treat worker `completed` status as verification — require sentinel,
  push evidence, integration, and tests.
- Never edit herdr internal state or `~/.omp/agent/extensions/herdr-omp-agent-state.ts`.
