Orchestrate

From boshu2/agentops · View interactive version

Orchestrate is an AI agent skill from the GitHub repository boshu2/agentops. Dispatch parallel workers without write collisions and decide what idle or finished ones do next. Use when: managing agents, or running or planning agents in parallel, even two.

How to use this skill

Skill file

Orchestrate

This skill decides what each worker does next and launches it safely. The core

move: send free capacity to finished work that still owes checks, integration

or a judgment before starting anything new, and launch nothing until every

packet in the batch is valid with canonical write scopes that do not collide.

It worked when no finished-but-unchecked candidate waits while new work starts,

no task runs on a closed but unintegrated prerequisite, no two launched workers

share a canonical path or a contended resource, and each packet has a result

naming observed engagement, terminal status and not_as_briefed.

One agent and one writer is the default. Give work to parallel workers only

where the pieces are independent: disjoint canonical write scopes and no

contended runtime resource. Dependent or overlapping work stays with one writer

or runs in sequence. Within that, concurrency follows the observed bottleneck:

reserve capacity for integration, review and repair, and reduce new starts

while candidates accumulate.

recovery and integration order.

toward frozen acceptance.

factory completion never validate output.

or agy-native for one headless run the caller

selected.

Before any dispatch

worker saying "done" makes a candidate. It still owes its checks, integration

and, when one is owed, a fresh judgment.

not_as_briefed (refused, held, worked around or unverified), the task is

not complete. A result marked out of authority is not a candidate. Retry

the step yourself only within your authority and the caller's limits, never

by the route the worker was denied. Otherwise integrate the finished part

only if it stands alone, and report the open step as a blocker.

integration or an owed judgment, free capacity goes there first: candidates

that unblock held dependents, then the oldest. A free slot alone is not a

dispatch reason; start new implementation with what is left.

context that did not write it.

the intended checkout. A closed item whose change is missing, stale or

unavailable there is not ready: hold its dependents, keep its native status,

and report the gap.

runtime state, validators included, before dispatching. Never duplicate an

assignment because this conversation lacks it. For each task check who holds

it, its starting content, its write scope, pending checks, the current

candidate and who integrates it; an empty ready list does not prove

completion (Navigate).

names (Navigate), never to an

implementer; with BD, pull build work with bd ready --exclude-type decision.

Record only the concrete constraint and next action in the existing native

handoff.

Check the packets

Dispatch a fresh implementer for one coherent accepted task through the

runtime's task-only dispatch; a forked session, cleared summary or resumed

author context still carries the history

(RPI).

Every packet fills every field, the

per-packet result fields among them:

```text

packet_id: the caller's packet id

intent: caller intent with its accepted examples

constraints: applicable constraints

role: the worker's role

executor: selected executor

workspace: the worker's workspace

starting_commit: the commit the worker starts from

prerequisites: usable prerequisites

source_scope: authorized source scope

evidence_destination: where its evidence goes

transitive_effects: all transitive effects

must_not: actions it must not take, such as push, merge, history rewrite, tracker or external writes

checks: the checks it must run

integrator: who integrates its result

bounds: the real remaining bounds

result_fields: the per-packet result fields

write_scope: canonical and workspace-relative, generated companions and regeneration outputs included, in separate isolation

```

If any packet is invalid, launch none: starting the valid ones and fixing

the rest later is a partial launch.

case-insensitively so an alias cannot hide a collision. A lexical check alone

cannot prove symlink or runtime isolation. Disjoint files are not

independence: workers, readers included, contend on a resource one of them

writes, installs into or holds exclusively, such as a bound port, a database

it writes, a package install it mutates or a locked browser profile; give

each its own instance or serialize only those. A shared model-provider limit

is backpressure, launched in waves, not serialized

(shared runtime).

step cannot run in the worker's environment, the worker holds that step and

whatever depends on it, does not reach the same effect by another route,

leaves finished edits in place, completes the independent parts and lists

the step under not_as_briefed; an authorized safer alternative stays

allowed (change safety).

or a file outside the worker's workspace, does not resolve there; pass a

readable path or paste the rule.

launch and isolation

before launch.

When several workers will apply one set of decisions, such as a batch of

review findings or one rewrite that must read the same in many files, open

decide once, apply in parallel

before splitting the work. When the caller wants file bytes kept out of its own

context, open context-budget delegation

before dispatching a bulk-reader or code-writer. When a packet is a

judgment leg, open model dispatch

before launch.

Launch and observe

  1. Record the dispatch association in the caller's native work comments or

metadata before execution can fail. At startup, capture the observed

runtime, session and context identity into that record; a requested ID is

not an observed one. The worker confirms its HEAD is the starting commit

before its first edit; a mismatch is a launch failure, never repaired by

reset. When a launch is refused, fails, or reports an authentication-shaped

error, or before creating a worktree, open

launch and isolation. When a

tracker item must be tied to the session that worked it, open

session associations.

  1. Delivery is not engagement. A delivered prompt or an acknowledgement

such as "Got it, starting" proves transport only. Prove engagement from

observable state: session output, tool activity, changed files.

  1. Observe through native waits or status notifications. Unchanged state is no

reason for another analysis, review or retrospective; a known blocking

failure deserves action even as other jobs run.

  1. Capture before restart. Before a nudge, replacement or restart, capture

the worker's observable state. A restart destroys the evidence of why it

stalled. Silence alone does not justify a restart.

  1. Dispatch once. An executor error is a result, not a retry trigger. A

headless worker cannot ask: on a choice its packet leaves open it takes no

irreversible or out-of-scope step and returns the choice under gaps. New

authorized work after a worker completes uses the runtime's follow-up or

resume operation that starts a turn; a queued message is not a resumed

attempt.

  1. A result whose observed tool activity shows an excluded action is

out of authority, not a candidate, whatever its checks show.

When a worker died, evidence disproves a running assignment's premise, a

finished workspace is to be removed, or a caller-selected factory runs the

work, open recover and resume.

Integrate and obtain judgment

Name the integration responsibility before launch, and decide then whether the

integrated candidate needs a fresh judgment at all. Follow the consumer

repository's integration policy and run affected checks on the actual

integrated subject. Combine parallel results one at a time in dependency order

and run the affected checks after each, so a failure points at one result; a

merge without conflicts does not show that two changes work together. A result

that conflicts, or whose changed paths or prerequisites changed on the target

after it started, goes back to its author through a follow-up or is redone

from the current target; it is not merged blind. A write outside a worker's

declared scope, or recurring collisions, means the scope split cannot be

trusted for this change: finish the rest serially.

For an ordinary candidate the integrated checks and CI are the gate; assign one

fresh author-distinct judgment only in the costly cases

Validate names.

Preserve every explicitly required review leg; advisory Review, Plan challenge

and Council advice cannot stand in for a judgment the caller requested

(advice or acceptance).

Known failures return to the responsible task for direct repair; a genuine

causal stall gets RPI's one bounded helper.

Per-packet result

packet_id:        the caller's packet id
executor:         selected runtime; requested model; observed model if reported
observed_session: session/context id the runtime reported, else unknown
engagement:       observable evidence the worker started, else unobserved
last_activity:    time and kind of the last observed tool call, output or file change, else unobserved
terminal_status:  exit or terminal state | running | launch failed | not launched
result:           candidate <ref> | evidence <ref> | out of authority <action> | error <verbatim>
not_as_briefed:   worker-reported steps refused, held, worked around or unverified | none reported
gaps:             recording failures, open choices and unknowns

Ask for not_as_briefed in the packet: a summary of what the worker did leaves

out what it did not do. Where the adapter returns its own denial record

(permission_denials, denied_actions), read that too and list a mismatch

under gaps.

When the caller asks for coordination status, return the

status block; answer a quick question in prose.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.