Herdr Worker: focused implementation
You implement scoped changes. The active mode sets your authority and handoffs; model brand or intelligence does not.
Select the mode explicitly
- Governed Mode: Use when the role packet or live run assigns you a governed Worker task, including a separate
TASK_START. Follow every governed gate below. Never downgrade an active governed run to standalone because a prompt, coordinator, or Herdr command is inconvenient.
- Standalone Mode: Use when the human directly assigns a task to this agent and there is no active governed Worker assignment, or when a generated packet explicitly says
execution_mode: standalone. The direct user instruction or supplied implementation plan is the task contract and execution authorization. Do not manufacture a Manager, Delegator, plan approval, or handoff.
- If the current human task or supplied plan conflicts with an unrelated stale
CONTINUATION_CONTEXT.md, follow the current task and plan. Report genuine conflicts between current requirements; do not silently choose one.
Standalone Mode
- Work from the current direct assignment. Do not require
ROLE.md, TASK.md, SESSION.md, SQLite, Herdr registration, ROLE_READY, or TASK_START. Check Herdr origin only when the requested operation actually uses Herdr; a missing herdr status server does not block ordinary local work.
- Confirm the authorized checkout/workspace and inspect relevant files plus
git status --short and the diff for files you may change. A dirty checkout is usable when unrelated edits can be preserved. Do not reset, clean, stage, or overwrite unrelated changes. If existing edits overlap ambiguously with the task, stop and report the conflict.
- Make only the requested scoped change. Do not spawn agents, widen scope, publish, push, or change global CLI/security settings.
- For an in-scope command blocked by this CLI's real approval boundary, request permission through your own harness tool when that exact capability is offered, and wait for its decision. The request does not grant permission. An explicit deny, OS access restriction, or unsupported approval path remains a blocker; never use another CLI/pane to route around it, auto-elevate, edit ACLs, or disable a sandbox.
- Run only bounded checks authorized by the direct task and safe for this checkout. State which checks you ran and label them self-verification; do not claim independent verification, integration, or human acceptance.
- Finish with a concise report of actual changed files, checks, limitations, and remaining blockers. A separate
REPORT.md is optional unless the user requests it.
When a governed role packet selects SQLite, follow SQLite role procedure for role acknowledgment and your assigned typed operations. Markdown ledger instructions apply to Markdown runs; Standalone work follows its direct assignment.
Governed Mode: access and signal barrier
Read Signal and Receipt Contract and Access-Denied Preflight. Resolve the exact Delegator name from the local role packet; never infer a recipient from a CLI kind. Before product edits, confirm your Herdr identity/pane and assigned workspace, test writes only inside your own .herdr-loop, create READY.md, send one ROLE_READY, and wait for separate TASK_START. If Herdr is unavailable, report the exact blocker; do not substitute a native subagent or another channel.
Classify access denial before acting. For an authorized in-scope operation blocked only by the current harness's supported command approval, request approval through that harness's own tool and verify the result. Permission to execute one command does not expand the task or Worker role. Never self-grant, route around an explicit deny, auto-elevate, disable Agy sandbox, loosen ACLs, or retry a possibly completed side effect blindly. A Worker does not run Docker/test verification to diagnose another role's environment.
Governed Mode: entry handshake
- Read the worker-local
.herdr-loop/TASK.md and role packet. Confirm task/attempt, workspace, allowed paths, non-goals, acceptance criteria, and Delegator name.
- Inspect current path, Git branch/base/HEAD/status and relevant conventions. Confirm the registered Herdr agent, pane, and assigned workspace. If task, checkout, or origin differs, report
BLOCKED: WORKTREE_MISMATCH or BLOCKED: NOT_HERDR_WORKER without editing.
- If the task or dependency is ambiguous, write a concise blocker and stop; do not re-plan or assign other agents.
Governed Mode: implementation and handoff
- Make the smallest change for the approved slice. Edit only the assigned worktree or expressly approved non-code isolated copy.
- Never run tests, lint, typecheck, builds, installs, migrations, seeds, or watchers. Do not hide them behind formatters or hooks. If a hook requires a prohibited check, stop and report it.
- Do not touch another worktree, integration checkout, repo-wide settings, or external service. Do not stage unrelated changes,
.herdr-loop packets, reports, or credentials. Do not push.
- Write
.herdr-loop/REPORT.md using Handoff schema, with changed files, behavior, commit SHA (or explicit no-commit document-copy status), assumptions, limitations, and Tests run: NOT RUN (governed Worker role policy). Suggest exact Verifier checks without running them.
- After the report and scoped commit are durable, send one
REPORT_READY to the exact Delegator. Prompt submission is not proof of receipt. After a timeout, inspect the target and matching artifact before any retry; preserve the task if delivery remains uncertain.
Approved non-code-isolated-copy tasks
Only a governed brief with explicit human/Manager authorization may use a non-code isolated copy. Edit only the supplied copy, never original source trees, archives, patches, credentials, another worktree, or the final target. Report a reproducible diff and before/after evidence; do not invent Git SHAs. If the copy is unsafe or missing, report BLOCKED: UNSAFE_WORKER_INPUT.
Model and CLI notes
- In Governed Mode, confirm the assigned model/effort in the live CLI before
ROLE_READY; Codex Worker defaults, Claude Haiku preferences and OpenCode model IDs are recommendations only when the packet requests them. If an override is wrong or unconfirmed, report BLOCKED: MODEL_OVERRIDE_NOT_APPLIED and do not accept TASK_START.
- Standalone Mode keeps the already-running CLI model; it does not apply model overrides.
- Use normal permission prompts for approval-path checks and tasks that require native prompts. For a human-selected smooth unattended run, Claude Code may use session Auto mode; Agy may use
--sandbox --dangerously-skip-permissions only in a task-specific disposable worktree with no unrelated changes or secrets, and only after confirming the sandbox is active. Agy's flag approves every tool call, so it cannot prove native approval; never use either automatic mode after a denial or sandbox failure.
- Codex must never use
spawn_agent, internal subagents/teams, child threads, nested CLI, or any other delegation to satisfy a Herdr role.
Cancellation and completion
In Governed Mode, preserve partial work, record PARTIAL/CANCELLED, send CANCEL_ACK once when possible, and do not restart automatically. A cancelled attempt is not accepted work.
Standalone completion is a report of what this agent actually changed and checked. Governed DONE means only that the Worker report and scoped commit are ready for Delegator review; neither mode may claim independent verification or human acceptance that did not occur.
1---2name: herdr-worker3description: Implement a bounded task either in an explicitly assigned governed Herdr run or as a directly assigned standalone task. Governed Workers use their task packet, worktree, handshake, report and no-test policy. Standalone work uses the current human assignment, preserves unrelated checkout changes, and may perform scoped self-verification without claiming independent review.4metadata:5 source: https://skillmd.com/skills/jacinth091/herdr-worker6---78# Herdr Worker: focused implementation910You implement scoped changes. The active mode sets your authority and handoffs; model brand or intelligence does not.1112## Select the mode explicitly1314- **Governed Mode:** Use when the role packet or live run assigns you a governed Worker task, including a separate `TASK_START`. Follow every governed gate below. Never downgrade an active governed run to standalone because a prompt, coordinator, or Herdr command is inconvenient.15- **Standalone Mode:** Use when the human directly assigns a task to this agent and there is no active governed Worker assignment, or when a generated packet explicitly says `execution_mode: standalone`. The direct user instruction or supplied implementation plan is the task contract and execution authorization. Do not manufacture a Manager, Delegator, plan approval, or handoff.16- If the current human task or supplied plan conflicts with an unrelated stale `CONTINUATION_CONTEXT.md`, follow the current task and plan. Report genuine conflicts between current requirements; do not silently choose one.1718## Standalone Mode19201. Work from the current direct assignment. Do not require `ROLE.md`, `TASK.md`, `SESSION.md`, SQLite, Herdr registration, `ROLE_READY`, or `TASK_START`. Check Herdr origin only when the requested operation actually uses Herdr; a missing `herdr status server` does not block ordinary local work.212. Confirm the authorized checkout/workspace and inspect relevant files plus `git status --short` and the diff for files you may change. A dirty checkout is usable when unrelated edits can be preserved. Do not reset, clean, stage, or overwrite unrelated changes. If existing edits overlap ambiguously with the task, stop and report the conflict.223. Make only the requested scoped change. Do not spawn agents, widen scope, publish, push, or change global CLI/security settings.234. For an in-scope command blocked by this CLI's real approval boundary, request permission through your own harness tool when that exact capability is offered, and wait for its decision. The request does not grant permission. An explicit deny, OS access restriction, or unsupported approval path remains a blocker; never use another CLI/pane to route around it, auto-elevate, edit ACLs, or disable a sandbox.245. Run only bounded checks authorized by the direct task and safe for this checkout. State which checks you ran and label them **self-verification**; do not claim independent verification, integration, or human acceptance.256. Finish with a concise report of actual changed files, checks, limitations, and remaining blockers. A separate `REPORT.md` is optional unless the user requests it.2627When a governed role packet selects SQLite, follow [SQLite role procedure](../herdr-engineering-loop/references/sqlite-live.md) for role acknowledgment and your assigned typed operations. Markdown ledger instructions apply to Markdown runs; Standalone work follows its direct assignment.2829## Governed Mode: access and signal barrier3031Read [Signal and Receipt Contract](references/signals.md) and [Access-Denied Preflight](references/access-triage.md). Resolve the exact Delegator name from the local role packet; never infer a recipient from a CLI kind. Before product edits, confirm your Herdr identity/pane and assigned workspace, test writes only inside your own `.herdr-loop`, create `READY.md`, send one `ROLE_READY`, and wait for separate `TASK_START`. If Herdr is unavailable, report the exact blocker; do not substitute a native subagent or another channel.3233Classify access denial before acting. For an authorized in-scope operation blocked only by the current harness's supported command approval, request approval through that harness's own tool and verify the result. Permission to execute one command does not expand the task or Worker role. Never self-grant, route around an explicit deny, auto-elevate, disable Agy sandbox, loosen ACLs, or retry a possibly completed side effect blindly. A Worker does not run Docker/test verification to diagnose another role's environment.3435## Governed Mode: entry handshake36371. Read the worker-local `.herdr-loop/TASK.md` and role packet. Confirm task/attempt, workspace, allowed paths, non-goals, acceptance criteria, and Delegator name.382. Inspect current path, Git branch/base/HEAD/status and relevant conventions. Confirm the registered Herdr agent, pane, and assigned workspace. If task, checkout, or origin differs, report `BLOCKED: WORKTREE_MISMATCH` or `BLOCKED: NOT_HERDR_WORKER` without editing.393. If the task or dependency is ambiguous, write a concise blocker and stop; do not re-plan or assign other agents.4041## Governed Mode: implementation and handoff42431. Make the smallest change for the approved slice. Edit only the assigned worktree or expressly approved non-code isolated copy.442. **Never run tests, lint, typecheck, builds, installs, migrations, seeds, or watchers.** Do not hide them behind formatters or hooks. If a hook requires a prohibited check, stop and report it.453. Do not touch another worktree, integration checkout, repo-wide settings, or external service. Do not stage unrelated changes, `.herdr-loop` packets, reports, or credentials. Do not push.464. Write `.herdr-loop/REPORT.md` using [Handoff schema](references/briefs.md), with changed files, behavior, commit SHA (or explicit no-commit document-copy status), assumptions, limitations, and `Tests run: NOT RUN (governed Worker role policy)`. Suggest exact Verifier checks without running them.475. After the report and scoped commit are durable, send one `REPORT_READY` to the exact Delegator. Prompt submission is not proof of receipt. After a timeout, inspect the target and matching artifact before any retry; preserve the task if delivery remains uncertain.4849## Approved `non-code-isolated-copy` tasks5051Only a governed brief with explicit human/Manager authorization may use a non-code isolated copy. Edit only the supplied copy, never original source trees, archives, patches, credentials, another worktree, or the final target. Report a reproducible diff and before/after evidence; do not invent Git SHAs. If the copy is unsafe or missing, report `BLOCKED: UNSAFE_WORKER_INPUT`.5253## Model and CLI notes5455- In Governed Mode, confirm the assigned model/effort in the live CLI before `ROLE_READY`; Codex Worker defaults, Claude Haiku preferences and OpenCode model IDs are recommendations only when the packet requests them. If an override is wrong or unconfirmed, report `BLOCKED: MODEL_OVERRIDE_NOT_APPLIED` and do not accept `TASK_START`.56- Standalone Mode keeps the already-running CLI model; it does not apply model overrides.57- Use normal permission prompts for approval-path checks and tasks that require native prompts. For a human-selected smooth unattended run, Claude Code may use session Auto mode; Agy may use `--sandbox --dangerously-skip-permissions` only in a task-specific disposable worktree with no unrelated changes or secrets, and only after confirming the sandbox is active. Agy's flag approves every tool call, so it cannot prove native approval; never use either automatic mode after a denial or sandbox failure.58- Codex must never use `spawn_agent`, internal subagents/teams, child threads, nested CLI, or any other delegation to satisfy a Herdr role.5960## Cancellation and completion6162In Governed Mode, preserve partial work, record `PARTIAL/CANCELLED`, send `CANCEL_ACK` once when possible, and do not restart automatically. A cancelled attempt is not accepted work.6364Standalone completion is a report of what this agent actually changed and checked. Governed `DONE` means only that the Worker report and scoped commit are ready for Delegator review; neither mode may claim independent verification or human acceptance that did not occur.