/loop-dispatch:new-loop-routinefrom loop-dispatch
Stand up the standardised loop-dispatch routine and caller GitHub Action for a repo — the one-time setup that onboards a repo to the loop automation. Use when onboarding a new repo to the loops, or to standardise/rewrite existing routines. Interactive/local.
Ships in loop-dispatch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The single source of truth for a repo's loop automation. Every repo gets one
loop-dispatch routine plus one committed caller workflow — identical except for
the repo. The routine is fired by the GitHub Action (via its Fire URL), so there are no
UI event triggers and none of the event-type-mixing limits they impose.
Why a GitHub Action, not UI triggers: the routines UI can't put different GitHub event
types (issue + PR + PR-review) on one routine, and each is a separate manual, un-scriptable
setup. A committed Actions workflow subscribes to all event types at once, routes at the
edge (route-event.sh), and fires the routine only when the event maps to a loop — so
non-matching events (a Dependabot dependencies label) cost nothing.
| Field | Value |
|---|---|
environment_id | your ops cloud env — the one running the cloud-skill-sync setup script (from /schedule; account-specific, not written here). |
model | claude-sonnet-5 — the dispatcher base; the loops pick their own subagent tier. |
allowed_tools | ["Bash","Read","Write","Edit","Glob","Grep","Skill","Task"]. |
sources | the target repo, e.g. https://github.com/umbraco/<repo>. |
mcp_connections | Slack + Claude_Code_Remote (for push) — connector UUIDs from /schedule (account-specific, not written here). |
| trigger | none / disabled cron placeholder — the routine is fired by the Action's Fire URL, not a schedule or UI event. |
The routine's stored prompt is the Consolidated routine block in
references/routine-prompts.md (copy verbatim, replace
{{OWNER_REPO}}, no rewording). The Action appends the edge-resolved route to each fire.
Never use fable. Never put secrets in the prompt or config.
Preconditions (once per repo):
ai-ready, pr-open, ai-blocked, auto-merging,
ai-discussing (see self-learning-system.md's "Setup § 2. Labels"); auto-releasing is
auto-release-loop's own (see that skill's SKILL.md).loop-dispatch (and the loops) are in the
cloud-skill-sync SKILLS list on main (each session start pulls it; no rebuild).hifi-phil/umbraco-mcp-ops
(if the org restricts actions to "selected", allowlist it).agent-outcomes plugin's hook
tells the Worker the run is alive and what step it's on, so a run that dies goes
ai-stuck naming its last step. See
Routine heartbeats.The agent-outcomes hooks run in the routine. In a session the Worker fired, they send
the Worker's POST /routine-signal:
PostToolUse hook, after every tool call)Notification hook), and ended when the session ends without an outcome (a SessionEnd hook). A loop reports its outcome through post-outcome.sh, not a hookA session the Worker didn't fire sends nothing, so one environment can serve Worker repos and caller-workflow repos alike.
Set up, on the ops cloud environment:
Two environment variables. They're secrets: set them in the environment's settings, never in the setup script, the routine prompt or the repo.
| Variable | Value |
|---|---|
AGENT_OUTCOMES_ENDPOINT | the Worker's URL + /routine-signal: tofu -chdir=worker/terraform output -raw worker_url, then append /routine-signal |
AGENT_OUTCOMES_TOKEN | tofu -chdir=worker/terraform output -raw routine_signal_secret |
Network access. If the environment limits outbound hosts, allow the Worker's host
(<script>.<subdomain>.workers.dev).
The plugin is in the env. agent-outcomes is in the cloud-skill-sync SKILLS
list. A SKILLS change reaches the next
session once it's on main; network access is an environment setting.
How it behaves:
Bash: Run the tests, Skill: mcp-review), never a command, prompt or path, because an expiry quotes
it in a public GitHub comment.Notification and SessionEnd hooks run once each, when a permission prompt appears
and when the session ends.~/.cache/agent-outcomes/capture.log). A lost
heartbeat costs only detail. A lost blocked or ended means the Worker learns of the
stall only when the watchdog expires.Checking it works: the e2e suite's real hook scenario (e2e/ in
umbraco-mcp-ops) run this hook against the deployed Worker, which proves the contract.
On a live repo, the proof is a run's ai-stuck comment quoting a step (Last reported step: …) instead of "No progress step was ever reported".
Stand it up:
RemoteTrigger create) with the Standard config,
enabled: false, a cron placeholder, and the consolidated prompt. One per repo.LOOP_DISPATCH_FIRE_URL (the
Fire URL) and LOOP_DISPATCH_TOKEN (the token) — gh secret set ….references/caller-workflow.yml
verbatim to the repo as .github/workflows/loop-dispatch.yml (open a PR).
Skip this for a repo the agent-orchestration Worker dispatches
(umbraco-mcp-ops today): instead, install the Worker's GitHub App on the repo and add
the repo's Fire URL + token to the Worker's repo_routines (worker/README.md,
"Deploying"). The App's webhook then routes its events; there's no caller or secrets.ai-ready (Action fires → routine builds
a PR), and label a PR dependencies (Action computes route=none → routine never fires).When the caller template itself changes (a new event added to
caller-workflow.yml — e.g. issue_comment for the
discussion loop), every already-onboarded repo keeps the old copy and silently won't fire the
new trigger. The committed workflow is the subscription; the reusable workflow can't add one.
So re-commit the template verbatim to each repo that has it (one PR each) and note in the PR
which trigger is new. Check which repos are affected with:
gh api "search/code?q=repo:umbraco/<repo>+filename:loop-dispatch.yml+path:.github/workflows"
# or per repo: gh api repos/umbraco/<repo>/contents/.github/workflows/loop-dispatch.yml --jq .sha
routine-prompts.md) and the caller
workflow (caller-workflow.yml) are copied verbatim; changing them means editing
those files in a PR, never hand-editing a live routine or repo workflow.sources/name and the two
secrets.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hifi-phil/umbraco-mcp-ops --plugin loop-dispatch3 skills in this plugin
/loop-dispatchSingle front door for a repo's automation loops, so one routine per repo can handle every loop event instead of one routine per event. Deterministically routes each triggering GitHub event to the matching loop skill; a non-matching event is a quiet no-op. It only routes; each loop owns its own guardrails. Repo-agnostic; github-ops required. Trigger from one per-repo routine wired to all the loop events./worker-envWhat THIS cloud worker environment provides for Umbraco MCP work — the .NET SDK, whether SQL Server is available, and how to bring a fresh Umbraco instance up per session — plus how to read it from the manifest the env-build writes. Consult this BEFORE any DB-backed work (running integration tests, chaining to a live CMS) so you use what's already installed instead of probing or reinstalling.