[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F2JS00J6HGKRRN3T7ZJNYS":3,"skill-same:01M7F2JS00J6HGKRRN3T7ZJNYS":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7F2JS00J6HGKRRN3T7ZJNYS","herdr-orchestration",null,"Delegate work inside Herdr (HERDR_ENV=1): the agent hierarchy, which model runs which lane, launch commands for Claude, Codex, and OpenCode workers, task layout, briefs, the taskr task ledger, waits, teardown, and recovery. Load this skill when orchestrating or sub-orchestrating, before delegating, reviewing, or starting an agent inside Herdr. The upstream `herdr` skill owns CLI syntax.","olafurns7\u002Fherdr-kit","olafurns7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85343965?v=4","01M7F2J88RXNP8TFA3E6AHZGF4","Ólafur Nils Sigurðsson","01M7F2J89BFXSYRK9DEGK2TWDT",0,"MIT","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: herdr-orchestration\ndescription: \"Delegate work inside Herdr (HERDR_ENV=1): the agent hierarchy, which model runs which lane, launch commands for Claude, Codex, and OpenCode workers, task layout, briefs, the taskr task ledger, waits, teardown, and recovery. Load this skill when orchestrating or sub-orchestrating, before delegating, reviewing, or starting an agent inside Herdr. The upstream `herdr` skill owns CLI syntax.\"\n---\n\n# Herdr orchestration policy\n\nThis skill is the team policy for delegating work inside Herdr: **when** to delegate, **where** agents live, and **which** model runs each lane. The upstream `herdr` skill owns CLI syntax. The **owner** is the developer who runs the session. The installed `herdr` is the command authority: use only commands it accepts, never a web-only or remembered one. The upstream skill comes from `herdr --skill`; regenerate it after each Herdr upgrade.\n\nherdr-kit (github.com\u002Folafurns7\u002Fherdr-kit) is the canonical home. Its installer puts this skill at `~\u002F.agents\u002Fskills\u002Fherdr-orchestration` and links it into Claude Code, Codex, and OpenCode; repositories carry no copy. The taskr hub, orchestrators, and sub-orchestrators load it with the upstream `herdr`, `herdr-fleet`, and `taskr` skills. Workers and reviewers do not load it: the global instructions, the taskr skill, and their brief carry the role rules they need. A repository's AGENTS.md fills its slots: worktree setup plugin, skills to load in briefs, issue tracker, review skill, publish workflow, leaf checks (the exact fast single-file commands on changed files and their real scope; no build, suite, type check, type-aware lint, or heavy-command lock; any commit hook that runs heavy checks and, only when the head gate runs those checks, the repository's approved way to commit; a leaf never bypasses a hook that the slot does not name), and head gate (the proof rule for each head: the CI checks that prove it, or the parent's local gate command and its cost; `workflow.md` \"Head gate\"). A repository without Leaf checks and Head gate keeps the commands that the lead writes into Validation. A personal host skill may add account selection, notification wiring, a heavy-command lock, and machine specifics; its private table and overlay define operator-specific lanes and rules.\n\nA host may carry a private `lanes.json` and fleet `local.md`. Review against source text; use the installed text for what a host does today.\n\nTwo upstream defaults are overridden. Inside Herdr (`HERDR_ENV=1`), working in Herdr is the request: do not wait for the word \"Herdr\" before you delegate. Delegate work that needs a writer, an independent reviewer, or several lanes in parallel. Each lane costs a full agent session, a ticket, a brief, a report to read and a teardown, so do a read-only lookup or a check of a few commands yourself. Each helper gets its own tab in the task workspace, not a sibling pane of the caller; in a task workspace that was just created, the first helper takes its root tab.\n\n## Owner questions\n\nThe taskr ledger is the single record of owner questions. Before any dialog with the owner, record `taskr ask --owner --dialog --question JSON --as ROOT`; a pane conversation is allowed, an unrecorded dialog is not. Name the repository and item in the question (`Merge herdr-kit #12?`).\nUse an ask that is already open; do not re-ask it. The Claude AskUserQuestion hook records the question and answer itself; do not answer it again by hand. Other agents record the answer at once with `taskr answer ASK_ID TEXT`.\nIf the owner declines the dialog, answer or withdraw the leftover ask. If a second channel gives a new answer, use `taskr answer ASK_ID TEXT --supersede`: newest wins, and both answers stay in the log.\nWorkers and sub-orchestrators ask their orchestrator with `taskr ask TEXT --blocking`, not the owner.\n\n## Reference files\n\nLoad each file at the step that names it, not up front. Each says at its top when to load it.\n\n| File | Load before |\n| --- | --- |\n| `lanes.md` | choosing a configured lane or effort, a quota fallback, or a resume; splitting work into small verified tasks (loop verification) |\n| `launch.md` | a recurring watch or poll (`herdr-loop`); opening the hub workspace; creating a campaign or task worktree or workspace; starting a campaign lead; reusing or rearranging an existing tab or pane; a manual launch, or recovery after `herdr-launch` is missing or failed |\n| `workflow.md` | registering a campaign root or changing its plan; durable task-local loops; writing an orchestrator, sub-orchestrator, or code-reviewer brief; settled waits on a reviewer; a head gate; work without a ledger; a stalled, blocked, or odd-looking agent |\n| `owner.md` | (hub or campaign lead) asking the owner anything or handing the owner an action, each milestone, parking a campaign, going idle on unattended work, answering \"what happened\" |\n| `teardown.md` | stopping an owned worker, closing a tab or workspace, after a reboot or crash |\n| `recovery.md` | any resume or prompt to a restored pane; your own session restarted; the taskr server unreachable |\n| `model-selection.md` | choosing a model; operator-specific policy lives in the fleet overlay |\n\n## Roles and briefs\n\nThe operator authorizes scope and publication. Leads own plans, typed work\ncontracts, worker briefs, integration and acceptance. Sub-orchestrators own only\ntheir assigned part and cannot publish or start another sub-orchestrator. Workers\nstay in their briefs; deterministic gates need no model; reviewers inspect independently.\nModel choices and restrictions come from `lanes.md` and the fleet's private overlay.\n\nNever start in-process subagents. Each helper uses an owned tab in the task\nworkspace. Never implement outside the brief's owned paths or infer publication\nauthority from a role. A worker acknowledges the taskr delivery, reports progress\nthrough taskr, and writes the named report. Missing decisions use `taskr ask\n--blocking`; follow the taskr skill's plain or push-lane answer protocol.\n\n## Preflight\n\n```bash\ntest \"${HERDR_ENV:-}\" = 1\nherdr status                    # client and server versions match\nherdr agent list                # who is live; reuse or tear down before adding\ntaskr version                   # the task ledger CLI, pinned by the herdr-kit installer\ntaskr daemon --status           # daemon fresh or stale; tailnet_url is the hub URL for clients\nfree -m | awk 'NR==2{print \"available_mb=\"$7}'   # Linux: column 7, never 4\n```\n\nCheck available memory before adding a heavy agent; keep at most three heavy agents live while dev servers run, and stop dev servers between eval runs. If `taskr` is missing or not the pinned version, tell the owner: herdr-kit's installer (`products\u002Ftaskr\u002Finstall.sh`) installs and upgrades it (binary `~\u002F.local\u002Fbin\u002Ftaskr`, skill `~\u002F.agents\u002Fskills\u002Ftaskr\u002FSKILL.md`); until then use the plain Herdr loop in `workflow.md`. `stale: true` from `daemon --status` means an older daemon still runs; the owner runs `taskr daemon --restart`. The daemon is an optimization: `taskr wait` works without it.\n\nLoad `~\u002F.agents\u002Fskills\u002Ftaskr\u002FSKILL.md` and its `references\u002Forchestrator.md` for the ledger loop, plan, and handover; `references\u002Frecovery.md` when a command fails, an alarm arrives, or a lane must be resumed; and `references\u002Fformat.md` before decoding output. A reviewer lane needs only the core and `references\u002Freview.md`. taskr owns command semantics; Herdr owns transport. Use the ledger for every campaign; record its goal at registration (`workflow.md`). One consumer per inbox: stop a predecessor's wait before adoption (`recovery.md`).\n\n## Launch\n\nOn another host, every Herdr read, send, close or launch uses `herdr --machine \u003Clabel>`, and `herdr-launch --machine` starts the lane (`launch.md`); use ssh only for non-Herdr work.\nStart an ordinary worker in three steps. Stop if any command fails or an id is missing, and never focus a helper.\n\n**1. Get its pane**, in one of two ways.\n\n**(a) A new helper tab in an existing task workspace.** From the calling task pane, resolve live ownership with `herdr pane current --current` (launch-time `HERDR_WORKSPACE_ID` and `HERDR_TAB_ID` can be stale), then create the tab with the worker marker, labelled with the agent name, and parse its ids:\n\n```bash\ntask_workspace_id=$(herdr pane current --current | jq -er '.result.pane.workspace_id')\ntask_cwd=$(pwd -P)\nhelper_tab=$(herdr tab create --workspace \"$task_workspace_id\" --cwd \"$task_cwd\" \\\n  --label \u003Cagent-name> --env FLEET_ROLE=worker --env DISABLE_AUTO_UPDATE=true --no-focus)\nhelper_tab_id=$(printf '%s\\n' \"$helper_tab\" | jq -er '.result.tab.tab_id')\nhelper_pane_id=$(printf '%s\\n' \"$helper_tab\" | jq -er '.result.root_pane.pane_id')\n```\n\n**(b) The root pane of a task workspace you just created** (creating one: `launch.md`). Give its one idle shell pane to the first helper and rename its tab to the agent name; `herdr-launch` exports `FLEET_ROLE=worker` in it and verifies the export:\n\n```bash\nhelper_pane_id=$(herdr pane list --workspace \"$task_workspace_id\" \\\n  | jq -er '.result.panes | if length == 1 then .[0].pane_id else error(\"expected one pane\") end')\nhelper_tab_id=$(herdr pane get \"$helper_pane_id\" | jq -er '.result.pane.tab_id')\nherdr tab rename \"$helper_tab_id\" \u003Cagent-name>\n```\n\nThe agent name keeps its role prefix and the task slug (`impl-cart-price`), matches `[a-z][a-z0-9_-]{0,31}`, and is unique among live agents; `herdr-launch` checks the prefix and the pattern.\n\n**2. File the ticket and write the brief.** Before a slice's first lane, file one ticket for the slice: `taskr work add --as ROOT --generation GEN` with title, intent, acceptance (checkable lines), scope, and dependencies (the slices it waits for). The ticket owns those facts; the brief (below) adds only lane things (model, ownership, report, validation); herdr-launch --work inserts the ticket's intent, acceptance and scope, so the brief does not repeat them. Every implement, fix, review, and research lane in a campaign has a ticket, and one ticket can have many lanes; gate shells and hub-to-lead prompts have none. A PR has one writing lane at a time and one lead; a second campaign ships its half as a stacked PR. Write the brief with that workspace, tab, and pane, in the campaign folder on the host that runs `taskr new`.\n\n**3. Launch:** `herdr-launch [--push] [--work W] LANE NAME BRIEF REPORT PARENT [PANE]`; `--work W` puts ticket W in the brief and sets `work=` on the lane (without PANE it creates the tab itself in the caller's workspace or `--workspace W`). It refuses a lane that does not launch as NAME's prefix, checks that a given PANE (in any workspace) is at its shell prompt, registers the task and launch, exports `FLEET_ROLE=worker`, `TASKR_TASK`, and `TASKR_LAUNCH` (for Claude also `CLAUDE_CODE_SANDBOXED=1`, the folder-trust bypass; with Codator installed, its forwarding functions), verifies the export before `herdr agent start` with the lane's flags: full permissions, no sandbox, folder and hook trust (`launch.md` \"Unattended flags and trust\"), then sends the brief with `taskr prompt --file`. It prints `task= launch= tab= pane=`.\n\nOn a failure it prints the failed step and the ids obtained so far. Inspect those (`taskr status`, the pane) before any manual step in `launch.md`; never repeat a completed registration, start, or prompt.\n\n```sh\nherdr-launch --work W LANE impl-SLUG BRIEF REPORT PARENT [PANE]\n```\n\nThe lane's allowed prefixes and settings come from the resolved table. Optional\ntools and account policy belong to the host overlay.\n\n## Brief and wait\n\nEvery brief starts with the header and ends with the report contract:\n\n```text\nHERDR-BRIEF role=\u003Corchestrator|sub-orchestrator|implementer|mechanical-worker|researcher|code-reviewer|reviewer|architect|code-validator>\norchestrator=\u003Cyour agent name or pane id>   report=\u003Cabsolute path>.md\nTask topology: workspace=\u003Ctask-workspace-id> tab=\u003Cowned-helper-tab-id> pane=\u003Cowned-pane-id> cwd=\u003Ctask-worktree-path>\nPR: OWNER\u002FNAME#N\n\nObjective: \u003Cone bounded outcome>\nIntent: \u003Coptional: the orchestrator's own words for what done looks like for the owner>\nNon-goals: \u003Cexplicitly excluded outcomes>\nOwnership: \u003Cfiles or module you may edit>   Forbidden: \u003Cfiles you must not touch>\nContext: \u003Ccurrent behavior, evidence, decisions already made>\nSkills to load: \u003Crepository skills mapped to this work; code-reviewers also name taskr references\u002Freview.md>\nAcceptance: \u003Cobservable conditions> (a --work brief gets the ticket's lines from herdr-launch)\nValidation: \u003Cexact commands, one per acceptance item>: leaf checks only (the Leaf checks slot); no build, suite, or gate\n  Gate: parent at head (implementer or fixer)\nProgress: taskr SKILL.md worker rules\n\nOther agents share this repository. Preserve their edits. Do not commit, push,\nopen a PR, update the issue tracker, or start agents. If a product, ownership,\nor acceptance decision is missing, ask it through taskr as Progress says\n(without a ledger, reply NEEDS_ORCHESTRATOR_DECISION with evidence). Write\nchanged files, summary, validation evidence, risks, and blockers to the report\npath, then reply with the path and three lines.\n```\n\nAn implementer or fixer brief replaces the sentence that starts \"Do not commit\" with: \"You MAY commit your owned paths only, with exactly `git add -- PATHS && git commit -m MSG -- PATHS` and only the hook switch that the Leaf checks slot names. On `index.lock`, retry up to 3 times, a few seconds apart through normal commands, not a sleep loop, then `taskr ask --blocking`; never delete a lock. Do not push, amend, rebase, open a PR, update the issue tracker, or start agents. When committed: `taskr ready SLICE --report REPORT --kv repo=OWNER\u002FNAME --kv pr=NUMBER --kv head=\u003Cfull OID>`, then `taskr done`. For an unpushed slice, keep repo\u002Fhead and use `--kv pr=none --kv reason=unpushed`. Stay in your pane: the lane stays done but open until a green gated head that contains your head (`git merge-base --is-ancestor`) is reviewed READY.\" Ownership must be disjoint: a path-limited commit does not separate two lanes' edits to one file. Reviewer and researcher briefs stay read-only.\nReviewer and researcher briefs replace the sentence that starts \"Do not commit\" with: \"Do not commit, push, open a PR, or update the issue tracker. Do not start agents except gather helpers (taskr references\u002Freview.md); a brief may say Gather helpers: none. A gather- lane never starts helpers\". Reviewer briefs include one exact `PR: OWNER\u002FNAME#N` line for the reviewed PR, plus any prose context. They name taskr `references\u002Freview.md` in Skills to load.\n\nA brief that hands a slotr runtime to a worker (`herdr-fleet`) says the worker stops its run with `slotr stop \u003Crun>` before `taskr done`, unless the brief hands the runtime to the lead.\n\nNever run `slotr stop` on another campaign's run to enforce priority. Keep your request queued and ask the hub through taskr with the campaign, pool and observed wait reason. The hub sets campaign weights with `slotr priority set`. slotr applies caps, quiet holds and the fairness floor at admission. Weight changes never revoke an admission. Stop only an owned run under its cleanup or cancellation authority, with `--reason`.\n\nThe brief and launch record carry the task topology and the task-qualified agent name; a writing brief lists the helper's disjoint ownership, so that a recovery can confirm the task workspace. An orchestrator, sub-orchestrator, or code-reviewer brief adds the rules in `workflow.md`; write a code-reviewer brief only after reading its journal rules there.\n\nRequire each Codex and Claude worker's initial report or checkpoint to record the provider, the effective native-home path, and the native session reference. Inside Codex it queries only `CODEX_HOME` and `CODEX_THREAD_ID` (`printf '%s\\n' \"$CODEX_HOME\" \"$CODEX_THREAD_ID\"`; empty home means `~\u002F.codex`); inside Claude only `CLAUDE_CONFIG_DIR` (empty means `~\u002F.claude`). No environment dumps, invented Claude variables, or credential or profile stores. `CODEX_THREAD_ID` is the Codex session ID; a Herdr `agent_session` from `agent get` is an optional fallback while the name is live. A Claude session reference counts only if its CLI or Herdr reports it. Validate a saved ID as nonempty and not literal `null`; if none is verified, record that limitation, and stop and report when a resume needs it. Record provider, model, and effort from the actual launch argv, not `agent get`.\n\nWhen the host skill defines a heavy-command lock, at most one heavy command runs host-wide under it, and your head gates use it too. A leaf gets a wrapped command only for the one focused repro that a failure prompt names (`workflow.md` \"Head gate\"). Keep a campaign's briefs, reports, and plan doc in `~\u002F.local\u002Fstate\u002Fherdr-orch\u002F\u003Crepo>-\u003Ccampaign>\u002F` on the host where its lanes run, never in a worktree (removed at teardown) or `\u002Ftmp` (lost at reboot). Keep database dumps, toolchains, `node_modules`, and repository clones out of it: bulk evidence stays in the task worktree.\n\nCollect with one long wait (default 540000 ms timeout, Codex orchestrators included); pass `--ack` only for a newly handled pending event, and after a timeout or an error that reports `acked_event_id`, do not repeat that ack:\n\n```bash\ntaskr wait --as \u003Cme> --for ready,ask,answer,owner_answer,done,fail,prompt_outcome,herdr,message [--ack \u003Chandled>]\n```\n\nNever loop short waits, shell `sleep` for a lane, or put this wait in an `&` background job: it dies with the tool call. On a timeout, `w1` with `\"owed\":0` means no lane owes a result. At each settled wait, read `taskr work list ROOT` for ready and waiting tickets. After `ready`, read the report and the diff, not the pane, and record each decision, sha, next step, and done ticket as it lands (`workflow.md`). Without a ledger, stalls, gates, and blocked agents: `workflow.md`. After accepting a result: `teardown.md`. Process lane results as they land; never leave a `ready` or `done` unread. When idle with nothing to do, leave a root note that says why, or park after your final note (`owner.md`).\n\n## Gates before publishing\n\n- Never branch, switch, stash, or commit in the shared main checkout. Other agents run there. The orchestrator's own edits to tracked files go to a task worktree first, and every commit, push, and PR runs from that task worktree. A task worktree has one task workspace; it is not a worker-only workspace.\n- Implementer report read and the worktree diff inspected by the orchestrator.\n- Independent review of a gated head under the brief and operator policy, then the repository's review skill on the final diff.\n- The publish gate is the repository's proof rule at the final head (`workflow.md` \"Head gate\"). Where that rule is a local gate, a green head gate at the final head that ran the full gate command after `git clean -ffdx` counts; else run the full gate once at the final head, under the host's heavy-command lock if it has one. Then publish with the repository's PR workflow from the task worktree. Publication stays with the orchestrator.\n- Stacks, under the repository's publish workflow: before opening a PR, check open PRs for file overlap with the repository's tool. Base an overlapping or dependent PR on that PR (its implementer brief names that branch as the base) and link it into a stack. Restack with `gh stack rebase` and `gh stack push` (lease-protected) only on stack branches you or your lanes own; never force-push a branch you do not own. A stack lands from the top as one merge group. A lead's handover lists its open stacks bottom to top.\n- Merge only when verified, evaled where a runtime lane applies, CI green where the repository has CI, and every review comment resolved.\n\nOnly the hub and the campaign leads write to the owner (`owner.md`).\n","# Herdr orchestration policy\n\nThis skill is the team policy for delegating work inside Herdr: **when** to delegate, **where** agents live, and **which** model runs each lane. The upstream `herdr` skill owns CLI syntax. The **owner** is the developer who runs the session. The installed `herdr` is the command authority: use only commands it accepts, never a web-only or remembered one. The upstream skill comes from `herdr --skill`; regenerate it after each Herdr upgrade.\n\nherdr-kit (github.com\u002Folafurns7\u002Fherdr-kit) is the canonical home. Its installer puts this skill at `~\u002F.agents\u002Fskills\u002Fherdr-orchestration` and links it into Claude Code, Codex, and OpenCode; repositories carry no copy. The taskr hub, orchestrators, and sub-orchestrators load it with the upstream `herdr`, `herdr-fleet`, and `taskr` skills. Workers and reviewers do not load it: the global instructions, the taskr skill, and their brief carry the role rules they need. A repository's AGENTS.md fills its slots: worktree setup plugin, skills to load in briefs, issue tracker, review skill, publish workflow, leaf checks (the exact fast single-file commands on changed files and their real scope; no build, suite, type check, type-aware lint, or heavy-command lock; any commit hook that runs heavy checks and, only when the head gate runs those checks, the repository's approved way to commit; a leaf never bypasses a hook that the slot does not name), and head gate (the proof rule for each head: the CI checks that prove it, or the parent's local gate command and its cost; `workflow.md` \"Head gate\"). A repository without Leaf checks and Head gate keeps the commands that the lead writes into Validation. A personal host skill may add account selection, notification wiring, a heavy-command lock, and machine specifics; its private table and overlay define operator-specific lanes and rules.\n\nA host may carry a private `lanes.json` and fleet `local.md`. Review against source text; use the installed text for what a host does today.\n\nTwo upstream defaults are overridden. Inside Herdr (`HERDR_ENV=1`), working in Herdr is the request: do not wait for the word \"Herdr\" before you delegate. Delegate work that needs a writer, an independent reviewer, or several lanes in parallel. Each lane costs a full agent session, a ticket, a brief, a report to read and a teardown, so do a read-only lookup or a check of a few commands yourself. Each helper gets its own tab in the task workspace, not a sibling pane of the caller; in a task workspace that was just created, the first helper takes its root tab.\n\n## Owner questions\n\nThe taskr ledger is the single record of owner questions. Before any dialog with the owner, record `taskr ask --owner --dialog --question JSON --as ROOT`; a pane conversation is allowed, an unrecorded dialog is not. Name the repository and item in the question (`Merge herdr-kit #12?`).\nUse an ask that is already open; do not re-ask it. The Claude AskUserQuestion hook records the question and answer itself; do not answer it again by hand. Other agents record the answer at once with `taskr answer ASK_ID TEXT`.\nIf the owner declines the dialog, answer or withdraw the leftover ask. If a second channel gives a new answer, use `taskr answer ASK_ID TEXT --supersede`: newest wins, and both answers stay in the log.\nWorkers and sub-orchestrators ask their orchestrator with `taskr ask TEXT --blocking`, not the owner.\n\n## Reference files\n\nLoad each file at the step that names it, not up front. Each says at its top when to load it.\n\n| File | Load before |\n| --- | --- |\n| `lanes.md` | choosing a configured lane or effort, a quota fallback, or a resume; splitting work into small verified tasks (loop verification) |\n| `launch.md` | a recurring watch or poll (`herdr-loop`); opening the hub workspace; creating a campaign or task worktree or workspace; starting a campaign lead; reusing or rearranging an existing tab or pane; a manual launch, or recovery after `herdr-launch` is missing or failed |\n| `workflow.md` | registering a campaign root or changing its plan; durable task-local loops; writing an orchestrator, sub-orchestrator, or code-reviewer brief; settled waits on a reviewer; a head gate; work without a ledger; a stalled, blocked, or odd-looking agent |\n| `owner.md` | (hub or campaign lead) asking the owner anything or handing the owner an action, each milestone, parking a campaign, going idle on unattended work, answering \"what happened\" |\n| `teardown.md` | stopping an owned worker, closing a tab or workspace, after a reboot or crash |\n| `recovery.md` | any resume or prompt to a restored pane; your own session restarted; the taskr server unreachable |\n| `model-selection.md` | choosing a model; operator-specific policy lives in the fleet overlay |\n\n## Roles and briefs\n\nThe operator authorizes scope and publication. Leads own plans, typed work\ncontracts, worker briefs, integration and acceptance. Sub-orchestrators own only\ntheir assigned part and cannot publish or start another sub-orchestrator. Workers\nstay in their briefs; deterministic gates need no model; reviewers inspect independently.\nModel choices and restrictions come from `lanes.md` and the fleet's private overlay.\n\nNever start in-process subagents. Each helper uses an owned tab in the task\nworkspace. Never implement outside the brief's owned paths or infer publication\nauthority from a role. A worker acknowledges the taskr delivery, reports progress\nthrough taskr, and writes the named report. Missing decisions use `taskr ask\n--blocking`; follow the taskr skill's plain or push-lane answer protocol.\n\n## Preflight\n\n```bash\ntest \"${HERDR_ENV:-}\" = 1\nherdr status                    # client and server versions match\nherdr agent list                # who is live; reuse or tear down before adding\ntaskr version                   # the task ledger CLI, pinned by the herdr-kit installer\ntaskr daemon --status           # daemon fresh or stale; tailnet_url is the hub URL for clients\nfree -m | awk 'NR==2{print \"available_mb=\"$7}'   # Linux: column 7, never 4\n```\n\nCheck available memory before adding a heavy agent; keep at most three heavy agents live while dev servers run, and stop dev servers between eval runs. If `taskr` is missing or not the pinned version, tell the owner: herdr-kit's installer (`products\u002Ftaskr\u002Finstall.sh`) installs and upgrades it (binary `~\u002F.local\u002Fbin\u002Ftaskr`, skill `~\u002F.agents\u002Fskills\u002Ftaskr\u002FSKILL.md`); until then use the plain Herdr loop in `workflow.md`. `stale: true` from `daemon --status` means an older daemon still runs; the owner runs `taskr daemon --restart`. The daemon is an optimization: `taskr wait` works without it.\n\nLoad `~\u002F.agents\u002Fskills\u002Ftaskr\u002FSKILL.md` and its `references\u002Forchestrator.md` for the ledger loop, plan, and handover; `references\u002Frecovery.md` when a command fails, an alarm arrives, or a lane must be resumed; and `references\u002Fformat.md` before decoding output. A reviewer lane needs only the core and `references\u002Freview.md`. taskr owns command semantics; Herdr owns transport. Use the ledger for every campaign; record its goal at registration (`workflow.md`). One consumer per inbox: stop a predecessor's wait before adoption (`recovery.md`).\n\n## Launch\n\nOn another host, every Herdr read, send, close or launch uses `herdr --machine \u003Clabel>`, and `herdr-launch --machine` starts the lane (`launch.md`); use ssh only for non-Herdr work.\nStart an ordinary worker in three steps. Stop if any command fails or an id is missing, and never focus a helper.\n\n**1. Get its pane**, in one of two ways.\n\n**(a) A new helper tab in an existing task workspace.** From the calling task pane, resolve live ownership with `herdr pane current --current` (launch-time `HERDR_WORKSPACE_ID` and `HERDR_TAB_ID` can be stale), then create the tab with the worker marker, labelled with the agent name, and parse its ids:\n\n```bash\ntask_workspace_id=$(herdr pane current --current | jq -er '.result.pane.workspace_id')\ntask_cwd=$(pwd -P)\nhelper_tab=$(herdr tab create --workspace \"$task_workspace_id\" --cwd \"$task_cwd\" \\\n  --label \u003Cagent-name> --env FLEET_ROLE=worker --env DISABLE_AUTO_UPDATE=true --no-focus)\nhelper_tab_id=$(printf '%s\\n' \"$helper_tab\" | jq -er '.result.tab.tab_id')\nhelper_pane_id=$(printf '%s\\n' \"$helper_tab\" | jq -er '.result.root_pane.pane_id')\n```\n\n**(b) The root pane of a task workspace you just created** (creating one: `launch.md`). Give its one idle shell pane to the first helper and rename its tab to the agent name; `herdr-launch` exports `FLEET_ROLE=worker` in it and verifies the export:\n\n```bash\nhelper_pane_id=$(herdr pane list --workspace \"$task_workspace_id\" \\\n  | jq -er '.result.panes | if length == 1 then .[0].pane_id else error(\"expected one pane\") end')\nhelper_tab_id=$(herdr pane get \"$helper_pane_id\" | jq -er '.result.pane.tab_id')\nherdr tab rename \"$helper_tab_id\" \u003Cagent-name>\n```\n\nThe agent name keeps its role prefix and the task slug (`impl-cart-price`), matches `[a-z][a-z0-9_-]{0,31}`, and is unique among live agents; `herdr-launch` checks the prefix and the pattern.\n\n**2. File the ticket and write the brief.** Before a slice's first lane, file one ticket for the slice: `taskr work add --as ROOT --generation GEN` with title, intent, acceptance (checkable lines), scope, and dependencies (the slices it waits for). The ticket owns those facts; the brief (below) adds only lane things (model, ownership, report, validation); herdr-launch --work inserts the ticket's intent, acceptance and scope, so the brief does not repeat them. Every implement, fix, review, and research lane in a campaign has a ticket, and one ticket can have many lanes; gate shells and hub-to-lead prompts have none. A PR has one writing lane at a time and one lead; a second campaign ships its half as a stacked PR. Write the brief with that workspace, tab, and pane, in the campaign folder on the host that runs `taskr new`.\n\n**3. Launch:** `herdr-launch [--push] [--work W] LANE NAME BRIEF REPORT PARENT [PANE]`; `--work W` puts ticket W in the brief and sets `work=` on the lane (without PANE it creates the tab itself in the caller's workspace or `--workspace W`). It refuses a lane that does not launch as NAME's prefix, checks that a given PANE (in any workspace) is at its shell prompt, registers the task and launch, exports `FLEET_ROLE=worker`, `TASKR_TASK`, and `TASKR_LAUNCH` (for Claude also `CLAUDE_CODE_SANDBOXED=1`, the folder-trust bypass; with Codator installed, its forwarding functions), verifies the export before `herdr agent start` with the lane's flags: full permissions, no sandbox, folder and hook trust (`launch.md` \"Unattended flags and trust\"), then sends the brief with `taskr prompt --file`. It prints `task= launch= tab= pane=`.\n\nOn a failure it prints the failed step and the ids obtained so far. Inspect those (`taskr status`, the pane) before any manual step in `launch.md`; never repeat a completed registration, start, or prompt.\n\n```sh\nherdr-launch --work W LANE impl-SLUG BRIEF REPORT PARENT [PANE]\n```\n\nThe lane's allowed prefixes and settings come from the resolved table. Optional\ntools and account policy belong to the host overlay.\n\n## Brief and wait\n\nEvery brief starts with the header and ends with the report contract:\n\n```text\nHERDR-BRIEF role=\u003Corchestrator|sub-orchestrator|implementer|mechanical-worker|researcher|code-reviewer|reviewer|architect|code-validator>\norchestrator=\u003Cyour agent name or pane id>   report=\u003Cabsolute path>.md\nTask topology: workspace=\u003Ctask-workspace-id> tab=\u003Cowned-helper-tab-id> pane=\u003Cowned-pane-id> cwd=\u003Ctask-worktree-path>\nPR: OWNER\u002FNAME#N\n\nObjective: \u003Cone bounded outcome>\nIntent: \u003Coptional: the orchestrator's own words for what done looks like for the owner>\nNon-goals: \u003Cexplicitly excluded outcomes>\nOwnership: \u003Cfiles or module you may edit>   Forbidden: \u003Cfiles you must not touch>\nContext: \u003Ccurrent behavior, evidence, decisions already made>\nSkills to load: \u003Crepository skills mapped to this work; code-reviewers also name taskr references\u002Freview.md>\nAcceptance: \u003Cobservable conditions> (a --work brief gets the ticket's lines from herdr-launch)\nValidation: \u003Cexact commands, one per acceptance item>: leaf checks only (the Leaf checks slot); no build, suite, or gate\n  Gate: parent at head (implementer or fixer)\nProgress: taskr SKILL.md worker rules\n\nOther agents share this repository. Preserve their edits. Do not commit, push,\nopen a PR, update the issue tracker, or start agents. If a product, ownership,\nor acceptance decision is missing, ask it through taskr as Progress says\n(without a ledger, reply NEEDS_ORCHESTRATOR_DECISION with evidence). Write\nchanged files, summary, validation evidence, risks, and blockers to the report\npath, then reply with the path and three lines.\n```\n\nAn implementer or fixer brief replaces the sentence that starts \"Do not commit\" with: \"You MAY commit your owned paths only, with exactly `git add -- PATHS && git commit -m MSG -- PATHS` and only the hook switch that the Leaf checks slot names. On `index.lock`, retry up to 3 times, a few seconds apart through normal commands, not a sleep loop, then `taskr ask --blocking`; never delete a lock. Do not push, amend, rebase, open a PR, update the issue tracker, or start agents. When committed: `taskr ready SLICE --report REPORT --kv repo=OWNER\u002FNAME --kv pr=NUMBER --kv head=\u003Cfull OID>`, then `taskr done`. For an unpushed slice, keep repo\u002Fhead and use `--kv pr=none --kv reason=unpushed`. Stay in your pane: the lane stays done but open until a green gated head that contains your head (`git merge-base --is-ancestor`) is reviewed READY.\" Ownership must be disjoint: a path-limited commit does not separate two lanes' edits to one file. Reviewer and researcher briefs stay read-only.\nReviewer and researcher briefs replace the sentence that starts \"Do not commit\" with: \"Do not commit, push, open a PR, or update the issue tracker. Do not start agents except gather helpers (taskr references\u002Freview.md); a brief may say Gather helpers: none. A gather- lane never starts helpers\". Reviewer briefs include one exact `PR: OWNER\u002FNAME#N` line for the reviewed PR, plus any prose context. They name taskr `references\u002Freview.md` in Skills to load.\n\nA brief that hands a slotr runtime to a worker (`herdr-fleet`) says the worker stops its run with `slotr stop \u003Crun>` before `taskr done`, unless the brief hands the runtime to the lead.\n\nNever run `slotr stop` on another campaign's run to enforce priority. Keep your request queued and ask the hub through taskr with the campaign, pool and observed wait reason. The hub sets campaign weights with `slotr priority set`. slotr applies caps, quiet holds and the fairness floor at admission. Weight changes never revoke an admission. Stop only an owned run under its cleanup or cancellation authority, with `--reason`.\n\nThe brief and launch record carry the task topology and the task-qualified agent name; a writing brief lists the helper's disjoint ownership, so that a recovery can confirm the task workspace. An orchestrator, sub-orchestrator, or code-reviewer brief adds the rules in `workflow.md`; write a code-reviewer brief only after reading its journal rules there.\n\nRequire each Codex and Claude worker's initial report or checkpoint to record the provider, the effective native-home path, and the native session reference. Inside Codex it queries only `CODEX_HOME` and `CODEX_THREAD_ID` (`printf '%s\\n' \"$CODEX_HOME\" \"$CODEX_THREAD_ID\"`; empty home means `~\u002F.codex`); inside Claude only `CLAUDE_CONFIG_DIR` (empty means `~\u002F.claude`). No environment dumps, invented Claude variables, or credential or profile stores. `CODEX_THREAD_ID` is the Codex session ID; a Herdr `agent_session` from `agent get` is an optional fallback while the name is live. A Claude session reference counts only if its CLI or Herdr reports it. Validate a saved ID as nonempty and not literal `null`; if none is verified, record that limitation, and stop and report when a resume needs it. Record provider, model, and effort from the actual launch argv, not `agent get`.\n\nWhen the host skill defines a heavy-command lock, at most one heavy command runs host-wide under it, and your head gates use it too. A leaf gets a wrapped command only for the one focused repro that a failure prompt names (`workflow.md` \"Head gate\"). Keep a campaign's briefs, reports, and plan doc in `~\u002F.local\u002Fstate\u002Fherdr-orch\u002F\u003Crepo>-\u003Ccampaign>\u002F` on the host where its lanes run, never in a worktree (removed at teardown) or `\u002Ftmp` (lost at reboot). Keep database dumps, toolchains, `node_modules`, and repository clones out of it: bulk evidence stays in the task worktree.\n\nCollect with one long wait (default 540000 ms timeout, Codex orchestrators included); pass `--ack` only for a newly handled pending event, and after a timeout or an error that reports `acked_event_id`, do not repeat that ack:\n\n```bash\ntaskr wait --as \u003Cme> --for ready,ask,answer,owner_answer,done,fail,prompt_outcome,herdr,message [--ack \u003Chandled>]\n```\n\nNever loop short waits, shell `sleep` for a lane, or put this wait in an `&` background job: it dies with the tool call. On a timeout, `w1` with `\"owed\":0` means no lane owes a result. At each settled wait, read `taskr work list ROOT` for ready and waiting tickets. After `ready`, read the report and the diff, not the pane, and record each decision, sha, next step, and done ticket as it lands (`workflow.md`). Without a ledger, stalls, gates, and blocked agents: `workflow.md`. After accepting a result: `teardown.md`. Process lane results as they land; never leave a `ready` or `done` unread. When idle with nothing to do, leave a root note that says why, or park after your final note (`owner.md`).\n\n## Gates before publishing\n\n- Never branch, switch, stash, or commit in the shared main checkout. Other agents run there. The orchestrator's own edits to tracked files go to a task worktree first, and every commit, push, and PR runs from that task worktree. A task worktree has one task workspace; it is not a worker-only workspace.\n- Implementer report read and the worktree diff inspected by the orchestrator.\n- Independent review of a gated head under the brief and operator policy, then the repository's review skill on the final diff.\n- The publish gate is the repository's proof rule at the final head (`workflow.md` \"Head gate\"). Where that rule is a local gate, a green head gate at the final head that ran the full gate command after `git clean -ffdx` counts; else run the full gate once at the final head, under the host's heavy-command lock if it has one. Then publish with the repository's PR workflow from the task worktree. Publication stays with the orchestrator.\n- Stacks, under the repository's publish workflow: before opening a PR, check open PRs for file overlap with the repository's tool. Base an overlapping or dependent PR on that PR (its implementer brief names that branch as the base) and link it into a stack. Restack with `gh stack rebase` and `gh stack push` (lease-protected) only on stack branches you or your lanes own; never force-push a branch you do not own. A stack lands from the top as one merge group. A lead's handover lists its open stacks bottom to top.\n- Merge only when verified, evaled where a runtime lane applies, CI green where the repository has CI, and every review comment resolved.\n\nOnly the hub and the campaign leads write to the owner (`owner.md`).\n",{"name":5,"description":7},"main","957239c83a2110ce9881bc0f48758a46adf1add9","products\u002Fsetup\u002Fskills\u002Fherdr-orchestration","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit","https:\u002F\u002Fgithub.com\u002Folafurns7","2026-11-15 09:48:34",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add olafurns7\u002Fherdr-kit --skill herdr-orchestration",{"tool":36,"command":37},"bunx","bunx skills add olafurns7\u002Fherdr-kit --skill herdr-orchestration",{"tool":39,"command":40},"pnpm","pnpm dlx skills add olafurns7\u002Fherdr-kit --skill herdr-orchestration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002FSKILL.md",true,[44,50,54,58,62,66],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"lanes.md","REFERENCE","参考文档",6102,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Flanes.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"launch.md",35603,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Flaunch.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"owner.md",8258,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Fowner.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"recovery.md",13440,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Frecovery.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"teardown.md",4904,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Fteardown.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"workflow.md",23131,"https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002Fworkflow.md",[71,79,84,89,95,102],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":75,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7F2K8GZYY901ZW6NAMHFV13","taskr","Report progress\u002Fquestions\u002Fcompletion and orchestrate Herdr campaigns through the task ledger.","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Ftaskr\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Ftaskr\u002FSKILL.md",[],[],{"skillNo":80,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7F2K5SMSTVR1Q3JPTZHTKC3","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Ftests\u002Ffixtures\u002Fcutover-12698ba\u002Fproducts\u002Ftaskr\u002FSKILL.md",[],[],{"skillNo":85,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7F2K4GFXFS46NWPBF82C18Y","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Ftests\u002Ffixtures\u002Fcutover-12698ba\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-orchestration\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7F2K1Z3PWYB0HJP4AE7MS1G","herdr-fleet","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Ftests\u002Ffixtures\u002Fcutover-12698ba\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-fleet\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7F2JZ27RMVQ11AGB8K8M0ZG","herdr-verification","Author or maintain a project verification map using its existing driver, real user paths, and durable evidence.","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-verification\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7F2JWS6927Y4BW1T6K50EKB","herdr-practices","An on-demand reference index for research, review, measurement, fix verification, and retrospectives; not always-on and not a mode.","https:\u002F\u002Fgithub.com\u002Folafurns7\u002Fherdr-kit\u002Fblob\u002Fmain\u002Fproducts\u002Fsetup\u002Fskills\u002Fherdr-practices\u002FSKILL.md",[],[]]