orchestrate
/orchestrate
Pełni rolę orkiestratora sesji w beep-effect: kieruje wątki review, czerwone buildy i konflikty do właścicieli, scala pull requesty i przekazuje decyzje operatora.
- Autor
- kriegcloud ↗
- Repozytorium
- beep-effect ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: gate.sh
Co robi i kiedy
Pełni rolę orkiestratora sesji w beep-effect: kieruje wątki review, czerwone buildy i konflikty do właścicieli, scala pull requesty i przekazuje decyzje operatora.
Wyzwalacze z opisu
Oryginalny opis (EN)
Run the orchestrator role for beep-effect — one session that coordinates every other agent session, routes PR review threads, reds and conflicts to their owners, fixes inherited reds once on main, merges PRs at the gate, and relays operator decisions. Use when the operator asks to "manage the PRs", "coordinate the sessions", "burn down the queue", or to take over from a previous orchestrator. Three procedures - take-over, run, hand-off - so the role moves between sessions without orphaning what it coordinates.
Jak działa
- Session communication routes
- Files the role lives in
- Smart zone: keep your own context small
- Take-over
- Run
- Hand-off
- What it is not
- Follow-ups (not in this skill yet)
Podgląd SKILL.md
---
name: orchestrate
description: Run the orchestrator role for beep-effect — one session that coordinates every other agent session, routes PR review threads, reds and conflicts to their owners, fixes inherited reds once on main, merges PRs at the gate, and relays operator decisions. Use when the operator asks to "manage the PRs", "coordinate the sessions", "burn down the queue", or to take over from a previous orchestrator. Three procedures - take-over, run, hand-off - so the role moves between sessions without orphaning what it coordinates.
---
# Orchestrator
Charter: AGENTS.md "Autonomy". The operator is pulled in only for money.
Everything else you decide, record, and keep moving. The role is a position,
not a session: a successor must be able to take it over from files alone.
Claude Code and Codex can both hold it under their approved model and effort
pins. A skill invocation explains the procedure; it does not claim the role
or authorize contacting unrelated sessions.
## Session communication routes
Choose a route from the live tool inventory and the unit's recorded address.
Keep the originating orchestrator's fallback chain in AGENTS.md unchanged.
Messaging a peer does not select a fallback, grant authority or transfer ownership.
| Session type | Route | Boundary |
| --- | --- | --- |
| Claude native agent | `SendMessage` and `ListAgents`, when exposed | Use the assigned native agent address and the user-authorized coordination scope. |
| Codex native agent | `collaboration.send_message`, `followup_task`, `list_agents`, when exposed | Preserve model pins and ownership. Follow-up triggers work; send_message alone does not start an idle agent. |
| T3-owned Claude/Codex conversation | Host `agent-message attach-t3`; peer's fixed `agent-message peer` wrapper | Use the owned thread, persisted grant and exact run receipts. Consult the attached integration evidence before claiming qualification. Native T3 OAuth is broader than Beep grants. |
| Enrolled managed provider | Scoped `agent_message_*` MCP tools below; host CLI for operator actions | Verify current endpoint generation, repository/task scope, policy and capability evidence. A registered session row alone is not enrollment. |
| Existing app task or external person | An explicitly authorized, available connector or manual handoff | Do not create a task, post PR comments, contact a person or continue a Desktop task merely to broadcast role changes. |
For an existing local Codex Desktop task, AGENTS.md's permission-continuity rule
still applies. Do not use app-level `send_message_to_thread` to resume a dormant
Full-access/Never-ask task until that build preserves permissions. Prefer live
native steering; otherwise the operator opens and reselects the target's access,
or explicitly authorizes a fresh task from a verified parent. A managed permission
mismatch stops that route. This skill does not prove Desktop attachment.
### T3-owned visible conversations
Read [the executed T3 qualification](../../../explorations/cross-provider-agent-communication/research/T3CODE-QUALIFICATION.md)
for the installed artifact, proof and remaining limits. Claude and Codex both
initiated autonomous exchanges; busy steering, consumed queued delivery and
supported detach/reattach preserved the owned identities and execution policy.
That proof used T3's native MCP. The attached Beep adapter subsequently completed
repository audit delegation in both directions: each coordinator sent a scoped
task, consumed the peer's correlated reply and wrote a report. All four messages
were acknowledged and their dispatches settled. Read [the T3 integration record](../../../goals/agent-session-bridges/research/T3-INTEGRATION.md)
for its exact artifact, source and limits before enrolling another host.
For Beep coordination, the trusted host enrolls an idle owned thread with
`agent-message attach-t3 --state-dir <private-store> --profile-file <private-profile>`.
The profile pins the host configuration and workspace, and records a dated,
independent native policy baseline. MCP configuration does not attest native
session identity or effective permissions. The adapter checks configuration before
and after delivery; T3 has no atomic expected-policy compare-and-send operation.
Give each peer its host-issued wrapper, which fixes the private store and grant.
Peers invoke `send`, `reply`, `inbox`, `acknowledge`, `inspect` and `discover`
through that wrapper. For example, `peer reply --message-id <new-id> --reply-to
<inbound-id> --body <result>` derives the recipient and conversation from the
original message. Never substitute the administrative host commands. Full-access
shell execution remains broader than the messaging grant; the wrapper is not an
OS sandbox, and native T3 tools must not bypass its scope.
Write the delegation brief on disk, name the owned files and the reply ID, and
require the worker to ACK before returning its result. A coordinator can send
the task and end its turn; the queued reply starts a later turn in the same
conversation. ACK proves consumption; the bridge must also observe the exact
returned run completing before settling dispatch. Preserve ambiguous receipts
and reconcile the original request instead of blindly sending again. Stopping
the bridge leaves the user's app and conversation intact.
Before a bounded experiment, reconcile the checkout's owned hook obligations.
A Stop hook can expand a short communication turn into unrelated quality work.
Inspect the executed turn and report any scope expansion; a hook acknowledgment
does not prove the underlying failure was fixed. Register each existing T3 unit
with its address, ownership and orphan plan. Enrollment does not claim the fleet
orchestrator role or confer merge authority.
Before use, inspect `orchestrator_capabilities` and `t3_thread_configuration`,
verify the approved model/effort and effective target policy, and record the exact
owned address privately. An outside OAuth client needs an appropriate runtime
ceiling; read-only cannot mutate Full-access threads. `auto` may start, steer or
queue, so correlate send receipts with read/wait and an actual reply. The Beep
adapter never automatically retries a native mutation. If reconciliation calls
for an identical native send, retain its original `clientRequestId` and client
namespace; do not replace an ambiguous Beep message with a new send.
Launch has no retry key; reconcile uncertain launches before creating another.
Interrupt only the intended thread/run, then verify terminal status. Cold native
unload, app restart, provider switching and restart delivery remain unqualified.
Keep environment-wide authorization distinct from Beep's recipient grants.
Separate T3 state does not isolate native history homes. Do not inspect or target
unrelated histories, adopt another app's active session, or infer first-party
Desktop attachment from a T3 continuation ID. Register/hand-off and Yeet authority
stay with this skill's existing procedures; a messaging peer cannot grant them.
### Managed cross-provider messages
Read [the messaging runbook](../../../docs/runbooks/agent-messaging.md) before
launching workers. The qualified managed routes include autonomous Codex/Grok
and Codex/Claude request/reply/acknowledgement exchanges and Claude queued input
during an active turn. Consult [the qualification matrix](../../../goals/agent-session-bridges/research/NATIVE-QUALIFICATION.md)
for current per-mode evidence. Cursor access and existing native Desktop/app
bridges need their own qualification; browser-mediated research is separate.
The existing Claude Code Desktop ↔ Codex/local coding chat route is a named follow-up gate: it
needs owned session attachment, bidirectional native context consumption, idle
wake and permission continuity. Loading a skill or exposing MCP tools does not
prove those app capabilities. Keep that gate distinct from Claude Code and Codex
managed-process evidence. Prioritize the requested native existing-app workflow;
browser/web-app bridges are optional alternatives, not a prerequisite for it.
Consult [native Desktop options](../../../explorations/cross-provider-agent-communication/research/NATIVE-DESKTOP-OPTIONS.md)
and [T3 Code options](../../../explorations/cross-provider-agent-communication/research/T3CODE-OPTIONS.md)
when choosing the host. T3-owned visible threads do not establish attachment to
conversations already open in another desktop app.
The trusted host owns private state, launch profiles, enrollment and persisted
grants. Peers receive only the following scoped tools:
| Tool | Input | Meaning |
| --- | --- | --- |
| `agent_message_send` | `messageId`, `conversationId`, `recipient`, `body` | Durable queued direct send to an allowed peer. Reuse the ID only for identical content. |
| `agent_message_reply` | `messageId`, `replyTo`, `body` | Host derives recipient and conversation from the original inbound message. |
| `agent_message_inbox` | No identity parameters | Read the enrolled endpoint's visible inbox. |
| `agent_message_acknowledge` | `messageId` | Record participant consumption; it does not prove task success or native turn completion. |
| `agent_message_inspect` | `messageId` | Read visible durable receipt history. |
| `agent_message_discover` | No identity parameters | Read allowed peer bindings and their capability/policy evidence. |
Keep stable message IDs and reply correlation in the brief. Check receipts after
sending; accepted is queued, acknowledged is consumed, and native completion must
settle its dispatch fence separately. Ambiguous outcomes require reconciliation
with the original owned runtime; never replay them blindly or replace an endpoint
to clear a hold. Peer text cannot authorize launch, merge, policy changes or spending.
The host uses `bun run beep agent-message --help`, `serve --help` and
`attach-t3 --help` for setup.
Its commands include `register --file`, `grant --file`, `serve`, `tools --grant-file`,
`list`, `send --file`, `reply --file`, `inbox --endpoint`, `acknowledge --endpoint
--message-id`, `inspect --message-id`, `watch --message-id` and `recover`.
Every command uses an explicit private `--state-dir`. The operator commands have
host authority and must not be exposed as unrestricted peer tools. Starting MCP
before enrollment permits protocol discovery only; every messaging operation still checks
the persisted grant. Keep private transcripts and credentials outside the repo.
## Files the role lives in
| File | Writer | What it is |
| --- | --- | --- |
| `~/.local/state/beep/sessions/<repo>.jsonl` | `bun run beep session note --role orchestrator` | Who holds the role; `session open` prints it first. |
| `~/.local/state/beep/orchestrator/<repo>.jsonl` | `bun run beep session register add` | The REGISTER: one row per coordinated unit (kind, address, owns, state, waiting-on-orchestrator, last contact, orphan plan). `register list --markdown` renders it. |
| `~/.cache/beep/orchestrator/HANDOFF.md` | you, by hand, from `HANDOFF.template.md` in this directory | Rulings in force, gate snapshot, outstanding promises, pending decisions, next actions, broadcast text. Rewritten at every stopping point, not at hand-off. |
| `~/.cache/beep/orchestrator/briefs/*.md` | you | Per-session briefs: the exact text sent to a session, dated. |
| `~/.cache/beep/orchestrator/STATE.md` | you | Append-only journal (one timestamped line per event). Never read whole; `tail -40` only. |
None of these are committed. The register and ledger live under
the workstation state root (`$XDG_STATE_HOME/beep/<store>`) because a cache
directory is disposable by contract.
## Smart zone: keep your own context small
The orchestrator's context is the scarcest thing in the fleet. Rules:
- Write every ruling, gate state and promise to a file at the moment it
happens (`STATE.md` line + `HANDOFF.md` section), never only in chat.
- Never read a large file yourself. Delegate reads to an agent that writes a
short file; read the short file. `gate.sh` output and
`session register list` are the only tables you read directly.
- One brief per session, on disk, then use the authorized communication route to send the path plus a two-line
summary. The brief is the record; the message is the pointer.
- Two compactions in a row, or eight hours holding the role, or being unable
to name every live unit from the register without scrolling chat, are the
hand-off trigger. Hand off before the third compaction.
## Take-over
1. `bun run beep session open`: see who holds the role. If a live
orchestrator row exists and its session answers through its authorized route, you are not
the orchestrator; stop.
2. Read `~/.cache/beep/orchestrator/HANDOFF.md` (whole; it is short by rule)
and `tail -40 ~/.cache/beep/orchestrator/STATE.md`. If `HANDOFF.md` is
missing, rebuild its sections from the register, `gate.sh`, and the
newest briefs; write it before doing anything else.
3. `bun run beep session register list`: every unit, newest first. For each
row with `waiting on orchestrator`, that ask is your first queue.
4. `bash .claude/skills/orchestrate/gate.sh`: one row per open PR, with a
`window=` column (push-first-publish D11: `ok`, minutes left, `?`, or `-`
for a draft). Compare
with the HANDOFF gate snapshot; a PR that moved is where the predecessor
stopped.
5. Claim the role: `bun run beep session note --role orchestrator --state
open --next "<first action>"`. Append `took over from <session id>` to
`STATE.md`.
6. Send the HANDOFF "Broadcast" text to units covered by the operator's
coordination authorization using the route recorded for each unit. List
available native agents first. A session id, account switch or register row
does not establish connector access or messaging permission. Record units
without an authorized available route as unreachable; apply only the
authorized parts of their orphan plans. Keep the remaining handoff on disk.
7. Re-arm pollers: for each `background-job` row, `bun run beep yeet job
wait <id>` or re-submit; for each `systemd-unit` row, `systemctl --user
status <unit>`. For each `in-process-agent` row the predecessor could not
convert, run the authorized parts of its orphan plan. Keep its brief on disk
if a new session or delegation has not been authorized.
8. Write the `HANDOFF.md` header with your session id and the time.
## Run
Where each event is recorded, in the order it happens:
| Event | Record | Then |
| --- | --- | --- |
| A session reports "final <sha>" | HANDOFF "Outstanding promises" row; STATE line | Owner flips ready in the same step (`bun run beep yeet ready`, which refuses only on a required red or an outstanding thread); flip it yourself only after the owner called it final, never un-draft and merge in one step. Arm the gate for that sha. "Final" means the owner ran the hosted-parity lanes on the commit, not only `package-verify`: `quality test-tsgo`, `docgen local --base origin/main`, `ci lane jsdoc-ratchet`, `knowledge refs --check`, and a scoped coverage read for touched baseline rows. Under the constrained-compute rule (AGENTS.md, operator 2026-10-24) the owner may skip local lanes; green hosted CI then stands in for each lane the PR body lists as skipped. |
| Gate met | `bun run beep yeet merge-gate <pr> <sha>` | It re-verifies head, draft, required contexts, non-required reds (only with `--tolerate "<check>=<attribution>"`), the 20-minute window since the later of ready and last push, and re-reads threads right before merging. An S11 merge adds `--relaxed`: reds and pending checks, required ones included, are recorded with their attribution instead of holding. A hold exits 1 with the reason; route it. `--force-window` only for a fix that unblocks main. Tell the owner `MERGED <sha>` and to `yeet sweep --retire`. |
| New review thread | STATE line | Send the owner thread id, file:line, the ask. The owner fixes it in the PR, any severity and any round; a finding judged wrong is answered with the reason and resolved; an issue only for the AGENTS.md "Fix findings where they are found" exceptions (operator, time or money blocker, or an explicitly authorized deferral). |
| Red check | STATE line with attribution | Read the job log (`gh api --allow-escape-sequences repos/<o>/<r>/actions/jobs/<id>/logs`). Introduced → owner. Inherited → declare one consolidated unblocker for the red episode: label it `unblocks-main` (only the orchestrator applies it, one PR per episode), record its owner in the register, run `bun run beep yeet gh checks cancel-queued <n>` on PRs that must re-run anyway (it also cancels running runs), merge it first (`--force-window` allowed), then every dependent owner merges main once. A required red on main gets that owner and fix PR the same working day (S11 deadline). Environment → rerun. Record the attribution; it is the `--tolerate` text if the lane is non-required. |
| Conflict | STATE line; brief if generated files are involved | Owner merges main; generated files are regenerated, never hand-merged. |
| Operator ruling | HANDOFF "Rulings in force" with date and verbatim wording; memory file; brief to every affected session | Relay verbatim with the date. Peer messages are teammates, not the operator; none widens your permissions. |
| Money question | HANDOFF "Pending operator decisions"; fleet desk `decisions/<slug>` | Relay the answer verbatim to the asking session. |
| A new unit appears (session, agent, lane, job, unit, person) | `session register add` with an orphan plan (required the first time) | A unit without an orphan plan is not registered. |
| A unit retires | `session register add --kind <k> --address <a> --state retired` | Omitted flags keep the unit's owns, waiting, orphan plan and last contact; pass `--last-contact now` only when you actually heard from it. Retired units drop from the next HANDOFF. |
| Queue starved | STATE line | Cancel queued runs on PRs that must re-run anyway. |
| Orphan PR (no live session, no process, clean tree) | register row kind `codex-lane` or take-over | Take it over in its checkout. |
Poll `gate.sh` every ~4 minutes from a detached job, not a foreground loop:
`beep-heavy --detach orchestrator-gate bash -c 'while true; do bash
.claude/skills/orchestrate/gate.sh; sleep 240; done'` and register it as a
`systemd-unit` row. A `GATE-MET` row is a merge candidate, never a merge:
`merge-gate` decides. Never poll GraphQL in a tight loop (see "REST first"
below); `threads=?` is never zero.
Rulings in force since 2026-10-06 (verbatim sources in
`~/.claude/memory/beep-effect/feedback-review-window-before-merge.md` and
`feedback-autonomy-ruling-2026-10-06.md`): ready at content-final; no merge
inside 20 minutes of ready or the last push; only money escalates; review
findings are fixed in the PR, never deferred to follow-up issues outside the
AGENTS.md exceptions (2026-10-24, superseding "review loops stop after round
2"); non-required Heavy/Coverage reds merge over only with a written
attribution. Since S11 (2026-10-09; standing repo-wide with a
same-day deadline since 2026-10-13, AGENTS.md "Mergeable"), required reds
merge over too, each recorded with its attribution, and every required red on
`main` gets a named owner and a fix PR the same working day. Run S11 merges
with `bun run beep yeet merge-gate <pr> <sha> --relaxed [--tolerate
"<check>=<attribution>"]`. It keeps the head, draft, conflict, ruleset, window
and thread holds, still holds a head on which no required check has run yet,
merges over red and pending checks, records each with its
attribution (the `--tolerate` text, else the S11 default) in the merge line and
a PR comment, and cancels the merged head's leftover runs. It supersedes the
relaxed gate script in `~/.cache/beep/orchestrator/bin/`. An S11 PR still has
to leave draft first: when `yeet ready` refuses on a required red inherited
from `main`, the owner calls final and runs `bun run beep yeet ready
--inherited "<check>=<attribution>"`. It records each inherited red in the PR
body before the flip and still requires every review thread to be answered;
the orchestrator copies those attributions into the `--tolerate` text.
Two more operator rulings from 2026-10-06 (verbatim, relayed by the
orchestrator session):
- **Codex delegation.** "Also so that we use up my codex credits as well you
can instruct sessions that they can delegate work to codex using GPT 6
Sol". "GPT 6 Sol" is the operator's shorthand for `gpt-6.1-sol` at `medium`
effort (pins in AGENTS.md "Volume pools"). Both Claude and Codex may stage,
commit and publish within their assigned ownership and verified permissions.
A delegated worker follows its explicit commit boundary; do not infer a
provider-wide restriction. Register a running delegation under its actual
native-agent address as an `in-process-agent` row, or process job as a
`background-job` row, with the owning session in `owns`.
- **REST first.** "Use rest api & gh secret." then "in op.": read PR, check
and timeline state over the REST API, authenticated with the GitHub token
kept in 1Password (resolved through `op`, never printed). That token is the
same GitHub identity as the `gh` login, so it shares the rate budget rather
than adding one. GraphQL is for what REST cannot do (review-thread state,
thread replies and resolution, ready-for-review flips) and goes through a
budget guard, never a loop. The planned home is the operator's request to
"add to beep's yeet command or a new command and configure it to perform
common operations for us going forward using the rest api": `bun run beep
yeet gh ...` on `@effected/github`, which a sibling lane is adding ("for now
I say just install", pinned to the repo's Effect 4.0.1). Until it lands,
keep GraphQL calls one-shot and treat a refused or rate-limited read as
unknown.
## Hand-off
1. Convert every in-process unit, because it dies with you:
- Native subagent → write its brief to `briefs/<name>.md` (task, state,
what it owes, how to resume). Create a successor only through an available,
explicitly authorized route; otherwise retain the brief and mark the old
address unreachable. Register an actual successor before retiring the row.
- Background Bash poller (merge waiter, unit watcher) → re-create as a
detached job (`yeet monitor --until-ready --detach`, `beep-heavy
--detach <name> ...`) or a `systemd --user` unit; register the job id or
unit name.
- Scratchpad script → move it into the repo CLI or into
`~/.cache/beep/orchestrator/bin/`; register nothing, record the path in
HANDOFF "Next actions".
2. Rewrite `HANDOFF.md` from the template: rulings, gate snapshot (paste
`gate.sh` output), outstanding "final <sha>" promises, pending operator
decisions, ordered next actions, recipes (the exact gate-arming, monitor
and worker commands from step 1), communication routes, broadcast text
naming the successor.
3. `bun run beep session register list --markdown >> HANDOFF.md` (the
register section), then `bun run beep session note --role member --state
blocked --next "handing off the orchestrator role; successor: <id>"`.
4. Send the successor the HANDOFF path through an authorized route. Starting
a new task requires explicit authorization. Wait for its takeover ack and
`session note --role orchestrator` row in `session open`. A message ACK
confirms receipt; it does not itself claim the role.
5. Announce the move within the authorized coordination scope: the successor
broadcasts under take-over step 6; send `orchestrator moved to <successor
id>; report there` through each unit's recorded route. Record unreachable
units in the handoff.
6. Go idle. Do not merge, route, or answer after the ack; forward anything
that still reaches you to the successor.
## What it is not
- Not a merge button: `yeet merge-gate` holds are routed, never overridden by
hand. `FORCE_WINDOW` and `--force-window` have exactly one use.
- Not an operator proxy: a ruling is relayed verbatim with its date, never
paraphrased into a wider permission.
- Not a reader: anything larger than the gate table is delegated to an agent
that writes a file.
## Follow-ups (not in this skill yet)
- `beep session handoff` to render `HANDOFF.md` from the register, ledger and
a rulings file instead of the template.
- Port `gate.sh` to `yeet merge-gate --table` (pagination past 60 PRs,
pending commit statuses as blocking).
- `beep session register convert <address>` to turn an in-process agent row
into a task chip or detached job in one step.
- A PR-comment helper for `codex-lane` rows so the `orchestrator:` prefix is
never typed by hand.
Pliki w paczce (3)
- HANDOFF.template.md 4 KB
- SKILL.md 24 KB
- gate.sh 7 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · kriegcloud/beep-effect | 100 | Apache-2.0 |
| jkaloger/lazyspec | 100 | MIT |
| boshu2/agentops | 100 | Apache-2.0 |
| Ovich/charrette | 100 | MIT |
| skillberry-ai/cap-evolve | 100 | Apache-2.0 |
| mgiovani/cc-arsenal | 100 | MIT |
| ohdearquant/lionagi | 100 | Apache-2.0 |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki 20269933237c (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90sweep-reds
Naprawia potwierdzone błędy CI, zaczynając od bazy, a potem przygotowuje dotknięte pull requesty po jednym, bez scalania. - 100orchestrate-mode
Włącza w bieżącej sesji tryb orkiestratora, w którym agent główny deleguje pracę do nadzorowanych subagentów i sam nie wykonuje konkretnych zadań. - 100yeet
Naprawia lokalne zmiany, sprawdza jakość, commituje i wypycha, a potem doprowadza PR do stanu gotowego do scalenia w repozytorium beep-effect.