Herdr team coordination policy for AI coding agents
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Process steps in order. Do not skip ahead.
Before any finish with enrolled work, reconcile the whole fleet under
skills/herdr-foreman/references/supervision.md. Continue observation while
authorized work remains. Finish only after a genuine user pause or a verified
successor/reset continuation satisfies the Stop gate. A saved handoff hold
does not permit Stop on its own. Keep user
attention visible under skills/herdr-foreman/references/attention.md.
Before any team-round action outside Step 1's bounded factual lookup, read the
team-round contract in full. It is the
file rules/agent-team-operation.md points to, and it binds every step below.
Every worker brief names it as a required read.
skills/herdr-foreman/references/team-operation.mdYou run on the foreman's selected tier: the operator's coordination row,
resolved through select_tier and checked against the capability table
(skills/herdr-foreman/references/team-operation.md Foreman Seat).
Each command resolves HS to its installed Herdr skill or that skill in a
herdr-policy clone. Repeat the resolver in every call. Prose skills/...
paths are relative to the package root.
Read the lookup rule before running these command blocks:
rules/herdr-bootstrap.mdBefore each listed owner decision, load its records and read every listed file:
HS=.tessl/plugins/jbaruch/herdr-policy/skills/herdr-foreman/; [ -d "$HS" ] || HS="$HOME/$HS"; [ -d "$HS" ] || case "$(git config --get remote.origin.url)" in git@github.com:jbaruch/herdr-policy|git@github.com:jbaruch/herdr-policy.git|https://github.com/jbaruch/herdr-policy|https://github.com/jbaruch/herdr-policy.git|ssh://git@github.com/jbaruch/herdr-policy|ssh://git@github.com/jbaruch/herdr-policy.git) HS=skills/herdr-foreman/ ;; *) echo "herdr-policy skill not found: install jbaruch/herdr-policy" >&2; exit 1 ;; esac
bash "$HS/foreman.sh" load-set --decision <plan|brief|gate|diagnose> --task <task>HS=.tessl/plugins/jbaruch/herdr-policy/skills/herdr-foreman/; [ -d "$HS" ] || HS="$HOME/$HS"; [ -d "$HS" ] || case "$(git config --get remote.origin.url)" in git@github.com:jbaruch/herdr-policy|git@github.com:jbaruch/herdr-policy.git|https://github.com/jbaruch/herdr-policy|https://github.com/jbaruch/herdr-policy.git|ssh://git@github.com/jbaruch/herdr-policy|ssh://git@github.com/jbaruch/herdr-policy.git) HS=skills/herdr-foreman/ ;; *) echo "herdr-policy skill not found: install jbaruch/herdr-policy" >&2; exit 1 ;; esac
bash "$HS/foreman.sh" load-set --decision wake --enrollment <enrollment-id>| Decision | Step | Target |
|---|---|---|
plan | Step 5 | --task |
brief | Step 8 | --task |
wake | Step 11, per wake event | --enrollment |
gate | Step 12 | --task |
diagnose | Step 13, diagnosis mode | --task |
It prints JSON whose files list is the floor for that decision; a file with
present: false is a gap to resolve, not one to skip. A non-zero exit names a
refused task, enrollment or unreconciled dispatch on stderr; resolve it first.
The contract is skills/herdr-foreman/references/working-memory.md "Load a
decision's records".
Load the reference named by the current step before acting. Read its contracts in full; execute only the current step and its stated continuation. Do not preload later stages or rerun earlier stages on resume. Step numbers in these references match this execution plan.
Delegation in either mode follows rules/agent-team-operation.md Delegation.
In a team round, use the existing Herdr owner route under
skills/herdr-foreman/references/team-operation.md Delegation.
A refusal naming the legacy teamlead default home is a one-time operator
step, not a mode: record it as a
user-attention blocker naming foreman migrate-home (skills/herdr-foreman/state-schema.md Home
Migration), and run nothing else until the operator has stopped every foreman
and run it.
Four request kinds are answered offline, need no live Herdr, and finish here after the requested operation. Each reference carries its own owner commands and their contracts. Use the recorded state override or default, report any non-zero diagnostic, and never fabricate missing history. They grant no new task authority.
Catch-up or saved attention — skills/herdr-foreman/references/attention.md. Read all
attention pages before claiming completeness.
Lesson curation, saved foreman context, or a foreman handoff —
skills/herdr-foreman/references/working-memory.md.
A saved retrospective — skills/herdr-foreman/references/retrospectives.md. Report the note's
date, coverage, conclusions, and path.
A task's cost or resource use — run the read-only report, omitting
--task for every task:
HS=.tessl/plugins/jbaruch/herdr-policy/skills/herdr-foreman/; [ -d "$HS" ] || HS="$HOME/$HS"; [ -d "$HS" ] || case "$(git config --get remote.origin.url)" in git@github.com:jbaruch/herdr-policy|git@github.com:jbaruch/herdr-policy.git|https://github.com/jbaruch/herdr-policy|https://github.com/jbaruch/herdr-policy.git|ssh://git@github.com/jbaruch/herdr-policy|ssh://git@github.com/jbaruch/herdr-policy.git) HS=skills/herdr-foreman/ ;; *) echo "herdr-policy skill not found: install jbaruch/herdr-policy" >&2; exit 1 ;; esac
bash "$HS/foreman.sh" cost-report --task <task>It prints JSON with a `tasks` list and an `unrecorded` list. Relay each
quantity separately, and every `unknown` value as `unknown`. Never total the
quantities or claim a saving. A non-zero exit writes its diagnostic to stderr
for an unusable state file or an unknown task; report it and stop. The output
contract is `skills/herdr-foreman/state-schema.md` (Writer / Reader Contract).
For every other request, read `HERDR_ENV` and the controller's attached context before running scripts.
- **Owner-attested remote context**
- Read the remote contract in full:
```text
skills/herdr-foreman/references/remote-context.md
```
- Verify its owner preflight and supervision binding.
- Load the team-round contract.
- Use the bound Python owners.
- Do not manufacture `HERDR_ENV`.
- Do not start another foreman brain.
- Native-only shell preflights and reset hooks do not authorize remote operation.
- Preserve every remaining stage-local gate.
- Run Step 2's remaining gates through the controller's configured owners.
- Proceed immediately to Step 5 only when those gates pass.
- **Unset, without a verified remote context** — this skill does not apply. Say so and do the task
directly, without roster calls, briefs, provisioning, reports, or simulated
worker roles. Finish here.
- **Set, with a bounded factual lookup**
- Read `skills/herdr-foreman/references/team-operation.md` Bounded Factual Lookup.
- Answer within that boundary.
- Cite the source.
- Run no round preflight, roster measurement, enrollment, report gate or context reset for the lookup.
- Finish here only with no enrollment requiring supervision or a valid Stop-gate condition; otherwise resume Fleet Supervision at Step 11.
- **Set, outside Bounded Factual Lookup, with a team task or new retrospective** — Proceed to Step 2.
- **Set, outside Bounded Factual Lookup, with a lookup, a file inspection, research, a bounded question, a
review of existing code, a repository edit, or any other task deliverable** —
a round, whatever its size. None of it is foreman work. Staff it in Step 5.
Proceed to Step 2.
- **Set, none of the above applies, and the answer is already in the foreman's
context** — say it. Finish here.
## Step 2 — Run the Round Preflight
Run capability migration and the consolidated round preflight. Relay the worktree
report and warnings verbatim. Exit 0 proceeds immediately to Step 5, or the stow's
continuation step after a checkpoint or resume. Cadence-only maintenance and unrelated worktrees
never block the selected task. Exit 1 follows the named owner's recovery; exit 2
reports the diagnostic and finishes here. Preserve enrolled supervision obligations.
Read before acting:
```text
skills/herdr-foreman/references/round-preflight.mdStep 2 includes this check. For a standalone authority check, run the documented command and record namespace evidence. Non-owned repositories require explicit per-action permission; otherwise remain read-only or finish here. On non-zero, report the diagnostic and finish here. Proceed immediately to Step 4.
Read before acting:
skills/herdr-foreman/references/round-preflight.mdStep 2 includes this measurement. For a re-measurement, run the documented owner command. Preserve failed measurements and unknown billing; recover required seats through their owner route. Proceed immediately to Step 5 when required readings are available.
Read before acting:
skills/herdr-foreman/references/round-preflight.mdLoad the plan decision's records. Read the waiting queue, choose the needed responsibilities, resolve composition triggers, validate any review partition, and save the owner's plan and rationale. Preserve developer reservations, task identity, cumulative fix count, correction bounds and independent verification. Plan only after trigger and partition validation pass. Staff specialists when the task's triggers or unresolved judgment require them, not every round. Proceed immediately to Step 6.
Read before acting:
skills/herdr-foreman/references/role-planning.mdBuild the recorded-base-to-pushed-head review package for reviewer and tester briefs. Resolve any diagnostic before composition; other roles need no package. Proceed immediately to Step 7.
Read before acting:
skills/herdr-foreman/references/role-planning.mdRoute on Step 2's worktree check before provisioning. Provision every writing worker and every checkout named in a brief; consultations may be read-only. Preserve the task's original authorized base. Never dispatch a missing worktree or manually remove another task's checkout. Proceed immediately to Step 8.
Read before acting:
skills/herdr-foreman/references/assignment-delivery.mdLoad the brief decision's records. Resolve policy paths and compose complete, bounded briefs with fresh report paths and recorded authorization. Accepted behavior, reproducible failure and a bounded correction permit a direct developer brief. Unsettled behavior, evidence, scope, causal uncertainty or exhausted allowances take their named consultation route; return to Step 5 when required. The foreman never substitutes substantive judgment. Proceed immediately to Step 9.
Read before acting:
skills/herdr-foreman/references/assignment-delivery.mdOptionally label the team layout once; skip an already named sidebar. Report partial label failures and continue immediately to Step 10.
Read before acting:
skills/herdr-foreman/references/assignment-delivery.mdCheck retrospective cadence and transition coverage, then apply the saved plan with the composed briefs and fresh report paths. Preserve task authorization, identity and fix count. Apply enrolls before input; reconcile uncertain sends before retrying. An applied send is not task acceptance. Unanswered task decisions and blockers retain their dispatch gate. Proceed immediately to Step 11.
Read before acting:
skills/herdr-foreman/references/assignment-delivery.mdRetain and await the bounded fleet watch's real execution handle, then gate its events. A quiet deadline ends only the checkpoint. Acknowledge suppressed events with their recorded reason. For each wake event, load its enrollment's records and verify report delivery. Persist user attention and acknowledge only handled event IDs; do not assess outcomes or close enrollments here. Continue watching every observation obligation. Proceed to Step 12 when required reports are delivered or their unavailability and recovery are recorded.
Read before acting:
skills/herdr-foreman/references/fleet-checkpoint.mdLoad the gate decision's records. Classify reports, read every report in full, and record classifier gates before assessment. Contract lines decide acceptance; labels and a clean worker exit never replace the verdict. Verify any mechanical oracle and partition against the dispatched plan and current tip. Record assessed assignment outcomes separately from the task's gate; close enrollments only after the owner verifies the ledger and report evidence. Resume Step 11 for remaining observation obligations.
Blocking verdicts take the bounded fix loop or a required Step 13 ruling. A contradicting classifier gate or weighing nomination goes to Step 13. Exhausted approach allowances go through the investigator's assessed report to judge diagnosis, without waiting for an operator decision. Advisory findings go in the round log; they do not become blocking verdicts. Never weigh findings yourself or use a judge report to clear a verdict gate.
Every return to Step 4 crosses Steps 16 and 17 first, with the named continuation saved in the stow. An accepted investigation presents findings without inferring implementation or release, then goes to Step 15 if cleanup is needed, otherwise Step 16. Release requires broad independent reviewer and tester passes at the current pushed tip. With release criteria met, proceed immediately to Step 13.
Read before acting:
skills/herdr-foreman/references/round-gate.mdNo judge trigger: proceed immediately to Step 14. Otherwise run the referenced judge round, preserving its pinned tier, independence and verified ruling. Diagnosis loads the diagnose decision's records. Skip writing-worktree provision for the read-only judge. After any ruling, log and checkpoint through Steps 16 and 17 before its named continuation.
Read before acting:
skills/herdr-foreman/references/round-completion.mdRelease is a fresh assignment, not a prompt into the developer's existing context. Follow the Step 7, 8, 10 and 11 release route with fresh report evidence. Open verdict gates and source-changing release findings return to Step 12; bot disagreements return to Step 13. Verify the reported release against live VCS and release gates, record the evidence, then proceed immediately to Step 15.
Read before acting:
skills/herdr-foreman/references/round-completion.mdAfter merge, fast-forward the shared checkout, remove only the merged task's own
worktree with git worktree remove, then delete its branch. Follow the mandatory
post-merge order in rules/agent-worktree-isolation.md. Re-sweep the round's other
worktrees through Step 7's referenced sweep contract. Proceed immediately to Step 16.
Read before acting:
skills/herdr-foreman/references/round-completion.mdFinalize the ledger and remaining obligations. Complete the task only after its acceptance, release and cleanup requirements are verified. Close merged or abandoned tasks through the owner; resolve any refusal before continuing. Keep in-progress tasks open. Preserve lessons and retrospective notes; report outstanding attention first, then the outcome and saved paths. Proceed immediately to Step 17.
Read before acting:
skills/herdr-foreman/references/round-completion.mdStow the handoff, active goal, required reads, gaps and the outcome's continuation step. Keep the current foreman context and goal active. Never schedule a reset, clear the pane or create a handoff hold merely for a round boundary. Run Steps 1 and 2 in this context, then continue at the saved step; resume Step 11 for enrolled observation obligations. A checkpoint is not a pause, completed goal or transfer of supervision.
After an explicitly requested restart or replacement, the next context reads
the stow and its required files, explicitly sets /goal <saved objective>
and verifies the goal is active, then reconciles supervision,
reads the queue, runs Steps 1 and 2, then takes the stow's continuation step in
place of Step 5. The queue lists seats only; gating, release and closure resume
at their saved step. Finish here only with no authorized work remaining or a
genuine pause or verified continuation satisfying the Stop gate.
Read before acting:
skills/herdr-foreman/references/round-completion.mdFor the daily standup, use Skill(skill: "herdr-standup").
.tessl-plugin
skills
herdr-foreman
classify
foreman
references
specialists
templates