dispatching-work
Skill4 starsChanged 2 months agoMITView on GitHub
Use to launch, track, list, or wrap up a resolved app-rooted dispatch.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-feedbackSkill
- asking-peer-agentsSkill
- boss-assistantSkill
- boss-saySkill
- bringing-coworkerSkill
- choosing-graphSkill
- contacting-orchestratorsSkill
- create-great-harnessSkill
- handoff-orchestratorSkill
- i-am-orchestratorSkill
- initSkill
- notifying-main-agentSkill
- peeking-workSkill
- reporting-to-userSkill
- resolving-appSkill
- shipping-taskSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Before writing an instruction, confirm herdr status and the current $HERDR_PANE_ID live record.
- Distinctive: line 28
Keep the brief near 300 words, quoted user text aside.
- Very specific: line 38
Call dispatch-task.py write with the resolved setup and main-agent identity.
- Very specific: line 44
Run launch-dispatched-agent.py in the foreground and resume the same tool call until it exits.
- Very specific: line 47
Read the result before reporting success.
- Distinctive: line 66
Read live progress through peeking-work when the user asks or evidence contradicts recorded state.
- Very specific: line 73
Use --mine for this session's dispatch list.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prepare the dispatch
The caller resolves the app and execution tier.
This skill owns instruction creation, launch, checkpoint handling, and cleanup.
boss-say owns plan scheduling; a batch label only groups dispatches.
Before writing an instruction, confirm herdr status and the current $HERDR_PANE_ID live record.
Report an unavailable dependency and continue dispatch only from a reachable Herdr session.
Resolve the worker's provider/profile/model/effort through work-route resolution, map the main agent's restriction tier through permission mapping, and state the selected setup and reason.
Register through contacting-orchestrators, then record this session's pane and provider fingerprint using Record the main agent before launch. Team-mode cwd preparation belongs to shipping-task.
Write the brief
A brief carries three things:
- The work -- the user requirement and requested outcome, stated per item as the current symptom and the required behavior, the exclusions the user stated, and any input, artifact path, or assigned port the worker cannot reach from its own harness. What the main agent already found travels as evidence references for the worker to weigh.
- The anchor and who exercises it -- this task's anchor and the behavior it observes, and whether the worker runs its own checkpoint or hands its completion reference and evidence to the group's shared one. The worker and user choose the verification method inside that anchor.
- Its place and motive -- where this task sits in the coordination and the user's original reason for it.
Target-app context discovery and work decisions stay with the worker in its own harness: the cause, where to change the code, repo conventions, verification commands, and anything else readable from that checkout stay out, because a prescribed cause or location binds the worker to an unverified guess. Keep the brief near 300 words, quoted user text aside. Name a method skill only when the user explicitly requested it; the app chooses its own methods otherwise. Investigation and audit briefs request an explanatory result with evidence references.
Apply choosing-graph if the graph and anchor are unset.
A task whose checkpoint is shared passes --shared-checkpoint to the write command below, so its brief and contract ask for implementation, its own working verification, and the reference and evidence that checkpoint reads.
A checkpoint task gets a review-only brief whose work is every covered task's requirement, completion reference, and evidence references.
The generated contract supplies lifecycle, progress, message, checkpoint, and review-disposition mechanics.
Call dispatch-task.py write with the resolved setup and main-agent identity.
A plan task also supplies plan_id/task_id; the command marks the planned task dispatched.
The generated instruction and hashed contract must exist with pending status before launch.
Launch
Run launch-dispatched-agent.py in the foreground and resume the same tool call until it exits. The launcher owns the same-tab pane split, contract injection, bounded retries, delivery verification, receipt, and confirmation.
Read the result before reporting success.
Require confirmed: true and instruction status in-progress; if confirmation failed, follow the returned repair command.
A launch failure follows When a launch fails, preserving any reachable pane the launcher retained.
Report the task, instruction path, and worker pane/tab.
Handle events
Persisted status drives the lifecycle.
A plan uses the status watcher; standalone status is the instruction's .status.json sibling.
Between events, continue other coordination or the user's conversation.
| Event | Main-agent action |
awaiting-main-agent | Supply verified cross-task context or a coordinator-owned action result through reply-to-worker.py --worker-instruction-path <path> --reply <answer>. Route a work decision to the user. |
awaiting-user-input / awaiting-authorization | Point the user to the worker pane; present useful coordination facts and references directly to the user in your own conversation. control and redirect are deliberately refused in these states, because they direct the worker while the user owns the decision; --intent inform stays open for verified findings the worker will need. The user acts in the worker's pane, or the coordinator ends the task with close-worker-pane.py; retain the task and its slot until its next status event. |
done / failed / cancelled | Check same-task continuation, then wrap up when the logical task has ended. Return the result to the scheduler. |
| Feature-branch push FYI | Relay the update; slot accounting and task status stay as recorded. |
Read live progress through peeking-work when the user asks or evidence contradicts recorded state. Cross-session coordination owns redirect, cancellation, identity-rebind, and user-requested takeover mechanics.
List outstanding dispatches
Run roll-call.py.
It reconciles instructions, receipts, launch failures, and live provider identity.
Use --mine for this session's dispatch list.
An unattributed pane has unknown ownership; resolve that ownership before taking action on it.
A pane listed under wrapped-up dispatches is the opposite case: its archived instruction still names it, so close it with the listed command.
Wrap up
- Resolve the canonical instruction and any confirmed same-task continuation. A continuation retains its instruction and pane until that logical task finishes.
- Require terminal status (
done,failed, orcancelled). For a reachable worker at a checkpoint, use the event route above. If its pane is confirmed closed, or its live worker's own report is refused, and status is missing or non-terminal, use recover-task-status.py with evidence supportingdoneorfailed. A pending instruction that never launched can be archived without a status record. - For a landed programming change, resolve choosing-graph's review checkpoint: confirm the completion reference and existing review disposition, or complete the missing review before cleanup. A task with a shared checkpoint records its completion reference here and takes its disposition from that checkpoint task, so it wraps up on its own terminal status.
- Close only the terminal worker's pane, through close-worker-pane.py, which rebalances the columns it leaves behind. Release every remaining lock through Releasing every lock on a wrapped-up instruction.
- Run the archive command below. For a plan task, supply its plan and task id. If the instruction owns its worktree (
worktree_owned: true), remove it withgit worktree remove <worktree_path>and return the branch to whatever owns it; aworktree_pathwithout that claim is where the dispatch ran, and it stays. Otherwise return to the lifecycle owner for ticket cleanup.
uv run --script "${CLAUDE_PLUGIN_ROOT}/scripts/wrap-up-task.py" \
--app <app> --slug <slug> [--plan <plan-slug> --task-id <task-id>]The command archives lifecycle artifacts and synchronizes the plan task's terminal status.
The coordinator pane and shared tab remain open.
Its result's remaining_steps names any pane-close and git worktree remove command step 4 or this step did not already run -- a safety net for a skipped step, not a substitute for running them here.
Complete when: a dispatch is launched and covered by its next status event, or its terminal status, review, pane closure, lock release, and archive are confirmed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

