Skip to content
Back to skills

Orchestune Dispatch

ASecurity

Internal follow-up skill invoked by orchestune to schedule and dispatch eligible tasks to local/cloud coding agents.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsrustgoshellbashgit

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add Saltmu/orchestune --skill orchestune-dispatch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orchestune Dispatch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orchestune Dispatch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/saltmu-orchestune-dispatch-orchestune/badge)](https://www.skillsdirectory.com/skills/saltmu-orchestune-dispatch-orchestune)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "orchestune-dispatch"
description: "Internal follow-up skill invoked by orchestune to schedule and dispatch eligible tasks to local/cloud coding agents."
version: "1.0.0"
category: "Development"
input_schema:
  type: "object"
  properties: {}
output_schema:
  type: "object"
  properties: {}
---

# Orchestune Dispatch Skill

This skill accepts filed GitHub Issues (or Issues filed by `orchestune-provision`) and handles dispatch configuration, worktree management, agent process invocation, and execution monitoring via the `orchestune-dispatch` CLI.

> [!NOTE]
> **User-Facing Response Language**:
> While this skill instruction is written in English, all user-facing explanations, plans, questions, and responses must use the user's preferred language (e.g., Japanese if the user interacts in Japanese or matches the user's environment). The language of this instruction document must not determine the output language.

## Trigger Conditions

**This is not normally a skill users invoke directly.** The [orchestune skill](../orchestune/SKILL.md) loads it internally as a handoff once decomposition and Issue provisioning are complete.

As an exception, a human may load this skill directly if they only want to re-run or resume dispatch for existing subtask issues (e.g. manual resumption after a lost state file, verifying a cron rerun).

## Prerequisites

* The `orchestune` CLI tools (`orchestune-dispatch`, `orchestune-dag`) must be installed on the system.
* The GitHub CLI (`gh` command) must be installed and authenticated (`gh auth status`).
* Mutating dispatcher operations (label updates, `git worktree` creation, agent process launches) require `--apply`. The default preview skips those actions while saving a local result JSON and creating report directories/locks.
* The dispatch target (`--dispatch-target`) is automatically selected when unspecified based on runtime environment: `auto` for local/interactive runs (auto-detects local CLIs on PATH with `claude` preferred, `agy` second, `codex` third, and falls back with a warning to a dummy launch if none are found); `cloud-routine` (Claude Code Cloud Routine) when running in GitHub Actions (`GITHUB_ACTIONS=true`). Explicitly passing `local` triggers backward-compatible dummy launches (`true` no-op, for tests and dry-run purposes). Cloud targets support Claude Code Cloud Routine (`cloud-routine`, requiring `ORCHESTUNE_ROUTINE_TOKEN` env var, and `ORCHESTUNE_ROUTINE_ID` / `routine-id` in TOML) and Codex Cloud (`codex-cloud`, requiring `ORCHESTUNE_CODEX_CLOUD_ENV` or `codex-cloud-env` in TOML). `codex-cloud` pushes the task branch to `origin` before running `codex cloud exec`, and treats an open PR on the target branch as the completion signal. See the [Setup Guide](../../docs/en/setup.md#4-setting-up-codex-cloud) for details.
* The reviewer (`reviewer-bot` in configuration files) defaults to `auto` and is selected only after the dispatch target resolves: Claude targets request Codex review; Codex, `agy` and Grok targets request Claude review. Explicit `claude` or `codex` values in `orchestune.toml` override the mapping for every target, and `[reviewer_by_target]` overrides it per target. Generic `local` cannot infer a reviewer and warns; custom `local-cmd` templates receive the resolved value only through an explicit `{reviewer_bot}` placeholder.
* Routine dispatch CLI options are strictly: `-p`/`--parent-issue`, `--apply`, `--dispatch-target`, `--max-concurrent`, `--profile`, and `--allow-unsafe-agent-execution` (for local CLI targets). Local CLI targets (including when local default `auto` detects a local CLI) require `--allow-unsafe-agent-execution` only with `--apply`; before passing it, confirm with the user that the execution environment is trusted. Preview succeeds without the flag, reports the resolved target, reviewer, and command kind, and does not launch. Preview success does not authorize apply. All non-routine configuration is set via `orchestune.toml`. The explicit gate exceptions are `--child-review-gate off` (or `child-review-gate = "off"` in `orchestune.toml`) and `--semantic-review-mode {required,advisory,off}` (or `semantic-review-mode = "off"` in `orchestune.toml` / `--force-integration-review`): use them only when necessary (e.g. recovery or explicit opt-out), and only with the user's explicit approval.

## Workflow: Scheduled Dispatch Execution

1. Run the dispatcher to schedule and assign tasks to agents. Pass the required parent Issue number (`parent_issue_number` from the approved decomposition plan, or the parent Issue being resumed) via `-p` / `--parent-issue` (or execute from a `parent/issue-<number>` branch to infer it). This ensures child task branches diverge from the parent branch (`parent/issue-{number}`), enabling the Integrator to automatically merge completed child branches into the parent branch and close issues without waiting for human intervention (only the final merge from `parent/issue-{number}` to `main` requires human review).
   Integration enforces a **two-tier review gate**:
   - **Layer 1 (Child review-evidence gate, default `required`)**: verifies passing review evidence in each child's done Outcome Record (`child-review-gate`). If absent, the parent Issue moves to `status:blocked-human-review`.
   - **Layer 2 (Integration-PR semantic review gate, default `required`)**: advances multi-round semantic review and fix loops on multi-task integration PRs. Single-child integrations qualify for the single-task Fast-Path (`fast_path_passed`) to merge immediately. If review rounds or retries exceed limits, or bots fail to acknowledge, the attempt escalates to `status:blocked-human-review`. A collaborator can explicitly resume by posting `<!-- orchestune:semantic-review-override:v1 {"attempt_id": "<attempt_id>", "head_sha": "<head_sha>", "reason": "..."} -->` to the integration PR (`skipped_by_human`).

   ```bash
   # Dry-run (preview changes without applying)
   orchestune-dispatch -p <parent_issue_number>

   # Apply and launch parallel workspaces
   orchestune-dispatch --apply -p <parent_issue_number>

   # Local CLI execution (requires explicit safety bypass confirmation)
   orchestune-dispatch --apply --allow-unsafe-agent-execution -p <parent_issue_number>
   ```

2. stdout shows flushed progress by default, including on pipes; it is no longer JSON. Read the final JSON file instead of `dispatch | jq` or redirecting stdout as JSON. Human runs use the absolute `report saved` path. Automatic results use `report-dir` (default `.orchestune/reports/dispatch`, relative to the primary checkout), under `parent-<N>/<UTC timestamp>-<UUID>/result.json`. Do not search for the newest file or reuse a previous result.
   For machine processing, create a fresh session directory with the scratch CLI and specify its unused file via `ORCHESTUNE_DISPATCH_REPORT_PATH` (relative paths use invocation cwd). Preserve the exit code before reading even a failed run's report:

   ```bash
   session_dir=$(orchestune agent scratch create dispatch-result <parent_issue_number>)
   result_path="$session_dir/dispatch-result.json"
   dispatch_code=0
   ORCHESTUNE_DISPATCH_REPORT_PATH="$result_path" orchestune-dispatch --apply -p <parent_issue_number> || dispatch_code=$?
   if [ -f "$result_path" ]; then jq . "$result_path"; else echo "report not created" >&2; fi
   # dispatch_code remains available under set -e; file existence alone is not success.
   ```

   ```powershell
   $sessionDir = orchestune agent scratch create dispatch-result <parent_issue_number>
   $resultPath = Join-Path $sessionDir 'dispatch-result.json'
   $env:ORCHESTUNE_DISPATCH_REPORT_PATH = $resultPath
   $savedPreference = $PSNativeCommandUseErrorActionPreference
   try {
       $PSNativeCommandUseErrorActionPreference = $false
       orchestune-dispatch --apply -p <parent_issue_number>
       $dispatchCode = $LASTEXITCODE
   } finally {
       $PSNativeCommandUseErrorActionPreference = $savedPreference
       Remove-Item Env:ORCHESTUNE_DISPATCH_REPORT_PATH
   }
   if (Test-Path -LiteralPath $resultPath -PathType Leaf) { Get-Content -Raw $resultPath | ConvertFrom-Json }
   else { Write-Warning 'report not created' }
   ```

   Nonzero exit can still have a complete failure report; argument/configuration errors, reservation failure, or a cycle exception before a full report can leave no result. Each rerun needs a fresh path; existing files are rejected. The dedicated `<result-name>.report.lock` remains beside explicit results; exclusion covers cooperating dispatch runs, not unrelated external writers. Do not delete a lock while another execution may use it. Exit codes are 0 success, 1 fatal/save failure, 2 retryable failure (or argument/configuration error). `planned` means dry-run selection; `launched` means launch procedure committed, not task completion; `local` is a dummy target. Progress failure does not stop result saving.
3. If the state file `run_state.json` is lost (such as after GitHub Actions cache eviction), the dispatcher self-heals by reconstructing its execution state from `status:in-progress` GitHub Issues and open PR head branches, allowing dispatch to continue safely.
4. Read the current run's JSON and return dispatch outcomes (launched tasks, worktree paths, logs) to the [orchestune skill](../orchestune/SKILL.md) for final reporting to the user.

Files in this skill

  • SKILL.md9.1 KB
  • references/child-review-gate.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.