skill(orchestrating-agent-relay): subscribe live PR owners on Agent Relay 12.4

Closed
KH
6d ago
+205-18

Summary

Audit skills/orchestrating-agent-relay/SKILL.md against the Agent Relay 12.4 CLI (agent-relay --version → 12.4.0) and make this the durable orchestrator default:

The moment a worker opens or owns a PR, subscribe that live PR-owner agent to the PR's GitHub provider resource so review comments, pushes, check changes, and discussion wake it:

agent-relay integration subscribe github \
  --resource '/github/repos/<owner>/<repo>/pulls/<n>/**' \
  --to @<PR-owner-agent>

Why this belongs in the orchestrator skill

Provider wakes are not a workflow-YAML concern here. Headless teams that ship PRs with node/fleet workers currently poll inbox/gh and miss review traffic while idle. 12.4 integration subscribe provisions a Relay inbound webhook, a Relayfile path_glob subscription, and a binding keyed by (provider, resolved path glob). That is the orchestrator's job the instant a PR number exists.

What the skill now requires

  • Subscribe immediately on PR open, targeting the live owner identity (--to @Owner), not a helper and not a shared channel.
  • Rebind after respawn. Bindings follow recipient identity. A new name (Implementer2, --delete-agent) does not inherit the old route; re-subscribe. Same-name release without delete keeps the binding — confirm --list still points at @Owner.
  • No duplicate writable subscriptions on helpers. A second subscribe to the same (github, glob) replaces the owner's route (create-first). Reviewers read via git/gh or channel traffic.
  • Unsubscribe/release hygiene. Unsubscribe owned resources, verify webhookId / webhookSubscriptionId / binding disappeared, then fleet release. Do not tear down a working binding before a replacement lands.
  • Verify delivery, not binding creation. --list + webhook inventory + live fleet agent list are necessary but not sufficient. A real GitHub event must arrive as a Relay message from github with a Relayfile path under that glob (check_inbox / list_messages). node deadletters must not hold it. Cloud/Nango 2xx is not proof.

12.4 CLI corrections (validated against --help)

  • integration subscribe / unsubscribe / subscribe --list are the provider-binding surface. integration subscription list is a different Relay workspace-event API.
  • integration webhook create takes <channel> (inbound). The older <url> --event shape in public docs is stale.
  • fleet spawn / fleet release / fleet agent list are the control-plane lifecycle commands; node agent * remains local-broker.
  • Spawn providers on 12.4 include muse, grok, opencode, devin (plus the existing CLIs). droid stays high-risk for delegation.
  • node deadletters is the failed-delivery inspection path.

Relationship to PR #56

Inspected https://github.com/AgentWorkforce/skills/pull/56 (skill(writing-agent-relay-workflows): lessons from multi-CLI game test).

That PR edits writing-agent-relay-workflows, not this skill. After the 12.4 audit:

#56 changeVerdict
Per-turn interactive spawn rowUseful, wrong home for orchestrating. Salvaged into writing-agent-relay-workflows (still absent on main 1.6.24).
Idle-detection (~30s) vs wait-for-event, idleThresholdSecsUseful, wrong home. Salvaged there. Confirmed idleThresholdSecs exists on @relayflows/core WorkflowBuilder.
LLM-as-oracle anti-patternUseful, wrong home. Salvaged as a Common Mistakes row.
Repair-step counterweightUseful, wrong home. Salvaged next to "Workflows repair before they fail."
Everything else in #56Stale/duplicative of later 1.6.x work already on main (conversation vs pipeline, chat-native recipes, repairable gates).

This replacement PR therefore supersedes #56: unique surviving lessons are preserved in writing-agent-relay-workflows 1.6.25; the orchestrating skill is the 12.4 operational surface #56 never covered.

Test plan

  • Read canonical orchestrating-agent-relay skill end-to-end.
  • Audit agent-relay 12.4 --help for node, fleet (spawn/list/release/agent list), integration (subscribe/unsubscribe/webhook/subscription), observer, message, agent.
  • Cross-check changelog 12.0–12.4, provider-subscriptions.mdx, and tests/e2e/github-subscriptions/README.md for binding/replacement/delivery semantics.
  • Validate every newly documented command group with --help (all OK).
  • prpm.json parses; package files exist; descriptions ≤500 chars; no duplicate package names.
  • Inspected PR #56 diff/comments; salvaged only still-valid workflow lessons.
  • After this PR exists: subscribe @skills-orchestration-audit-grok to /github/repos/AgentWorkforce/skills/pulls/<this>/** and verify webhook binding + delivery evidence.
  • Close #56 as superseded with a link to this PR.

[!NOTE]
Low Risk
Documentation and skill version bumps only; no runtime or application code changes.

Overview
Bumps orchestrating-agent-relay to 2.4.0 (and package metadata/README) to document Agent Relay 12.4 headless orchestration: when a worker owns a PR, subscribe that live agent via integration subscribe github to four Relayfile globs (PR body, reviews, status, issue comments), with rebinding after respawn, helper/no-duplicate-binding rules, unsubscribe-before-release hygiene, and delivery verification (real GitHub events in inbox, not just --list).

The skill also expands quick reference and protocol for fleet agent list / fleet release, node deadletters, corrected integration CLI surfaces (subscribe --list vs subscription list, inbound webhook create), and extra spawn CLIs; release flow now requires unsubscribing owned resources first.

writing-agent-relay-workflows goes to 1.6.25 with workflow-authoring fixes salvaged from superseded work: when not to add repair steps, per-turn interactive spawn vs long waits, idleThresholdSecs / ~30s idle detection vs “wait for channel event”, and new common-mistake rows (LLM-as-oracle, pointless repair gates).

Reviewed by Cursor Bugbot for commit 19676901776cd775d50389c770db085c4d4e8660. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • claude session a32d0191 · contributor · ran gh pr commands · last active 2026-09-21