Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .agents/skills/herdr-peers/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: herdr-peers
description: "Ask another coding agent in a Herdr pane — on this machine or another one — and get exactly one authorized reply back, with a loop guard, depth limit 1, a fan-out cap and a record of every delegation; send one-way notices; keep a plan's lead with epochs and succession; lead a multi-agent debate to decide, research the state of the art, stress-test or verify (rounds, angles, red teams, counted ballots and claims, a panel seated from idle panes or agentkit accounts); run autopilot, a human-started daemon that accepts the recommended option for every waiting agent, keeps every open plan running (a plan queue, a brain for what rules cannot decide, a lane appointed when a lead and its successors are gone). Use only when the user mentions Herdr, peers, autopilot, a debate, panel or research by several agents, or another agent, pane or machine, or when a plan you are executing delegates a task through Herdr. Do not use merely because parallel work could help. Requires HERDR_ENV=1 and Herdr's official herdr skill."
version: "2.2.1"
version: "2.4.0"
license: MIT
allowed-tools: Bash, Read
metadata:
version: "2.2.1"
version: "2.4.0"
protocol: 2
---

Expand All @@ -29,7 +29,7 @@ Upgrading from 1.x: `docs/MIGRATING.md` in the herdr-peers repository (protocol
`herdr --skill` (always matches the installed binary), or install it pinned:

```bash
npx --yes skills add herdrdev/herdr@v0.9.3 --skill herdr -g
npx --yes skills add herdrdev/herdr@v0.9.5 --skill herdr -g
```

- Run only inside a Herdr-managed pane: `test "${HERDR_ENV:-}" = 1`. If that
Expand Down Expand Up @@ -81,7 +81,7 @@ opinion nobody asked for, or to avoid doing the work yourself.
| `lead takeover --plan P --as-lane` | A lane of a granted plan takes the lead when the lead, every successor and every earlier lane are gone, probed twice; never with `--reason`; at most two appointments per plan. |
| `lead verify --plan P` | **Before any merge, tag or release.** Are you still the lead, here and on the plan's other machines (read-only reports)? Exit 4 when not, or when any machine shows a higher epoch or an earlier lead at the same epoch; exit 5 when a machine could not be reached (unless `--allow-unreached`, recorded). Writes nothing remotely. |
| `cancel <id> [--reason R]` | Closes an open ask (yours, or one you decline). |
| `autopilot [run\|start\|stop\|status\|logs]` | **Started by a human only** ([autopilot.md](autopilot.md)). `start` (alias `on`) runs it in the background, detached from the pane, logging to `autopilot.out` in the state directory; `stop` (alias `off`) stops it and waits; `status` shows whether it runs, since when, how, its options and last ten actions; `logs [--lines N] [-f]` prints or follows the background log; no verb runs it in the foreground. Watches every agent on every enabled machine and accepts the option that lets a waiting one go on — a question (the recommended option, then the pre-selected one, then the first), a tool approval, plan approval, folder trust, an update prompt (skipped); follows a dialog of several steps to its end; tells an agent that stopped by asking in prose to continue; retries a pane at its usage limit every 30 minutes. Never touches a login or Claude's bypass acknowledgement, never picks a refusal, free text or a row that widens permissions, never keys a pane without a recognised menu or with a human draft on its input line. Options: `--dry-run`, `--once`, `--passes N` (foreground only), `--interval S` (default 60, minimum 15), `--exclude <machine>:<pane>`, `--scope`, `--no-nudge`, `--catch-up`. One per server; records every action. With `--loop` it also keeps every open plan running: each enabled machine reports the plans that have a lead record, the idle lead of a plan that is not finished gets one fixed prompt to continue it (after 5 unchanged minutes, never while its lanes work or it awaits a reply), a blocked plan is left, three prompts without progress stop it (`plan_stalled`), and a lead that is gone has its first reachable successor asked to take over; `--notify "<command>"` runs a command (no shell) with a `plan-event-v1` object when a plan stalls, is blocked, loses its lead or completes. With `--loop --brain` it also launches and keeps a dedicated decision agent (ask mode, a Claude account with quota by default via coding-agents-kit 1.3.0+ (1.5.0+ recommended), `--brain-kinds` for others, `--brain-model kind=model`), asks it only what its rules cannot decide, and acts only on one action from a closed list, answered with `autopilot answer <question> <action>` from the brain's own pane ([autopilot.md](autopilot.md) §6). With `--loop --appoint` (on the human's word) a plan whose lead record carries the appointment grant and whose lead and every successor have been gone 15 minutes, with no progress, gets its first live lane asked to take the lead (`lead takeover --as-lane`; [autopilot.md](autopilot.md) §7). With `--loop --revive` (the human's standing grant) a plan on this machine whose lead is gone (or at a usage limit resetting more than 30 minutes away) and whom nobody in its record can take over gets one fresh agent launched (ak, ask mode, the plan's checkout) that takes it with `lead takeover --reason revive` against the daemon's one-time ticket; a stalled plan's live lead is asked to hand over to it; capped, recorded, never adopted by other machines ([autopilot.md](autopilot.md) §7b). With `--loop` it also starts the next approved plan of a repository's queue (`queue.json` beside its plans, written by the plan tool, read only) by one fixed prompt to its lead ([autopilot.md](autopilot.md) §5.4). |
| `autopilot [run\|start\|stop\|status\|logs\|resume]` | **Started by a human only** ([autopilot.md](autopilot.md)). `start` (alias `on`) runs it in the background, detached from the pane, logging to `autopilot.out` in the state directory; `stop` (alias `off`) stops it and waits; `status` shows whether it runs, since when, how, its options and last ten actions; `logs [--lines N] [-f]` prints or follows the background log; `start --resume` records the human's start so that `resume` starts the same autopilot again after a reboot or a Herdr restart (a no-op when it runs or nothing is recorded; `stop` forgets the record); no verb runs it in the foreground. Watches every agent on every enabled machine and accepts the option that lets a waiting one go on — a question (the recommended option, then the pre-selected one, then the first), a tool approval, plan approval, folder trust, an update prompt (skipped); follows a dialog of several steps to its end; tells an agent that stopped by asking in prose to continue; retries a pane at its usage limit every 30 minutes. Never touches a login or Claude's bypass acknowledgement, never picks a refusal, free text or a row that widens permissions, never keys a pane without a recognised menu or with a human draft on its input line. Options: `--dry-run`, `--once`, `--passes N` (foreground only), `--interval S` (default 60, minimum 15), `--exclude <machine>:<pane>`, `--scope`, `--no-nudge`, `--catch-up`. One per server; records every action. With `--loop` it also keeps every open plan running: each enabled machine reports the plans that have a lead record, the idle lead of a plan that is not finished gets one fixed prompt to continue it (after 5 unchanged minutes, never while its lanes work or it awaits a reply), a blocked plan is left, three prompts without progress stop it (`plan_stalled`), and a lead that is gone has its first reachable successor asked to take over; `--notify "<command>"` runs a command (no shell) with a `plan-event-v1` object when a plan stalls, is blocked, loses its lead or completes. With `--loop --brain` it also launches and keeps a dedicated decision agent (ask mode, a Claude account with quota by default via coding-agents-kit 1.3.0+ (1.5.0+ recommended), `--brain-kinds` for others, `--brain-model kind=model`), asks it only what its rules cannot decide, and acts only on one action from a closed list, answered with `autopilot answer <question> <action>` from the brain's own pane ([autopilot.md](autopilot.md) §6). With `--loop --appoint` (on the human's word) a plan whose lead record carries the appointment grant and whose lead and every successor have been gone 15 minutes, with no progress, gets its first live lane asked to take the lead (`lead takeover --as-lane`; [autopilot.md](autopilot.md) §7). With `--loop --revive` (the human's standing grant) a plan on this machine whose lead is gone (or at a usage limit resetting more than 30 minutes away) and whom nobody in its record can take over gets one fresh agent launched (ak, ask mode, the plan's checkout) that takes it with `lead takeover --reason revive` against the daemon's one-time ticket; a stalled plan's live lead is asked to hand over to it; capped, recorded, never adopted by other machines ([autopilot.md](autopilot.md) §7b). With `--loop` it also starts the next approved plan of a repository's queue (`queue.json` beside its plans, written by the plan tool, read only) by one fixed prompt to its lead ([autopilot.md](autopilot.md) §5.4). The map also carries each agent's account and cached usage when its machine's coding-agents-kit answers `ak ps --json` ([autopilot.md](autopilot.md) §9). With `--loop --handoff` (the human's standing grant) an agent on this machine whose account is close to its limit — a fresh `low` or `critical` reading, a reset more than 30 minutes away — gets one fresh agent launched on another account (ak, ask mode, the same directory), is asked once to write a handoff to a file the daemon names and stop, and the new agent is told to carry on from it; capped together with revives, recorded, given up and released when it does not complete ([autopilot.md](autopilot.md) §7c). Each machine's report also lists its pending plans — not finished, named by no lead record, changed in the last 14 days, in a repository its agents work in (on the daemon's machine, also one they worked in during the last 30 days) — and the map, `fleet` and `fleet ui` show them with no option ([autopilot.md](autopilot.md) §5.5, §9). With `--loop --adopt` (the human's standing grant; coding-agents-kit 1.3.0+, fail-closed) a pending plan that began, is approved (its last approval cites its live contract id; a begun plan's markdown, which its own execution rewrites, is not compared), is not tracked by git, is not blocked and changed in the last 24 hours is taken up again: the one idle agent of its checkout gets one fixed prompt asking it to claim the lead and continue the plan if it was executing it (two or more agents: nobody is asked), and a plan on this machine with no agent left for 15 minutes (or whose agents are all at a usage limit resetting more than 30 minutes away) gets one fresh agent launched (ak, ask mode, the plan's repository) that is told to claim the lead and resume it through the plan tool; the daemon writes no plan file and no lead record; capped together with revives and handoffs, recorded, given up and released when the plan is not claimed ([autopilot.md](autopilot.md) §7d). |
| `autopilot answer <question> <action>` | **The brain's own verb, for the brain only** — run in the brain's pane, under the key file the daemon names; the daemon checks it and acts only on an allowed action. Never run it as a person or another agent ([autopilot.md](autopilot.md) §6.2). |
| `plans [--json]` | The plans led on this machine (`herdr-peers/plans-v1`): lead, epoch, succession, lanes, class (`open`, `blocked`, `completed`, `unreadable`), progress digest. Read-only; works outside a Herdr pane. |
| `fleet [--json]` | The map the autopilot loop keeps (`herdr-peers/fleet-v1`): every machine, its agents with repository and branch, the plans and each agent's role. Read-only, from this machine's copy, with its age; exit `7` without one, `5` when stale. Works outside a pane. |
Expand Down Expand Up @@ -253,7 +253,20 @@ named here) and `Read`.
target (`ssh … python3 -`, the report module on standard input); the map
file `fleet.json` (`0600`) in the herdr-peers state root of this machine
and of each machine that answered; and, with `--notify`, the command the
human named ([autopilot.md](autopilot.md) §5, §8).
human named ([autopilot.md](autopilot.md) §5, §8). On its own machine
the daemon's pass also keeps one small private file in the herdr-peers
state root, `known-repos.json` (`0600`): the repositories it saw agents
work in during the last 30 days. `herdr-peers plans` and the report run
on another machine read it when present and write nothing
([autopilot.md](autopilot.md) §5.5).
- `autopilot --loop --adopt`, **only when the human started it**: one fixed
prompt to the one idle agent of a pending plan's checkout; and, for a
plan on this machine with no agent left, an `ak pick`/`ak lease` on the
human's accounts (ask mode), one workspace of its own in the plan's
repository (closed when the launch is given up), one fixed prompt to that
agent, and the launch log `adopt-log.json` (`0600`) in the state
directory. No plan file, queue file or lead record is written
([autopilot.md](autopilot.md) §7d).

- **2.0**: the brain gets one workspace of the daemon's own whose shell starts
in a fresh, empty, private directory (never the state directory; removed
Expand Down
Loading