orchestune-dispatch
Skill1 starsChanged 3 months agoMITView on GitHub
Internal follow-up skill invoked by orchestune to schedule and dispatch eligible tasks to local/cloud coding agents.
In this repository11 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- local-ci-developerSkill
- orchestune-dispatchSkill
- orchestune-provisionSkill
- orchestuneSkill
- local-ci-developerSkill
- orchestune-provisionSkill
- orchestuneSkill
- workflow-templateSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
If the state file run_state.json is lost (such as after GitHub Actions cache eviction), the dispatcher self-heals by reconstructing its …
- Very specific: line 80
Read the current run's JSON and return dispatch outcomes (launched tasks, worktree paths, logs) to the orchestune skill for final reporting …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 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
orchestuneCLI tools (orchestune-dispatch,orchestune-dag) must be installed on the system. - The GitHub CLI (
ghcommand) must be installed and authenticated (gh auth status). - Mutating dispatcher operations (label updates,
git worktreecreation, agent process launches) are executed by default (--apply).--no-applyskips 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:autofor local/interactive runs (auto-detects local CLIs on PATH withclaudepreferred,agysecond,codexthird, 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 passinglocaltriggers backward-compatible dummy launches (trueno-op, for tests and dry-run purposes). Cloud targets support Claude Code Cloud Routine (cloud-routine, requiringORCHESTUNE_ROUTINE_TOKENenv var, andORCHESTUNE_ROUTINE_ID/routine-idin TOML) and Codex Cloud (codex-cloud, requiringORCHESTUNE_CODEX_CLOUD_ENVorcodex-cloud-envin TOML).codex-cloudpushes the task branch tooriginbefore runningcodex cloud exec, and treats an open PR on the target branch as the completion signal. See the Setup Guide for details. - The reviewer (
reviewer-botin configuration files) defaults toautoand is selected only after the dispatch target resolves: Claude targets request Codex review; Codex andagytargets request Claude review. Explicitclaudeorcodexvalues inorchestune.tomloverride the mapping. Genericlocalcannot infer a reviewer and warns; customlocal-cmdtemplates receive the resolved value only through an explicit{reviewer_bot}placeholder. - Routine dispatch CLI options are strictly:
-p/--parent-issue,--apply/--no-apply,--dispatch-target,--max-concurrent,--profile, and--allow-unsafe-agent-execution(for local CLI targets). All non-routine configuration is set viaorchestune.toml. The one explicit exception is--child-review-gate off(orchild-review-gate = "off"inorchestune.toml): use it only as the recovery for an already handed-off child described in child-review-gate.md, and only with the user's explicit approval.
Workflow: Scheduled Dispatch Execution
Run the dispatcher to schedule and assign tasks to agents. Pass the required parent Issue number (
parent_issue_numberfrom the approved decomposition plan, or the parent Issue being resumed) via-p/--parent-issue(or execute from aparent/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 fromparent/issue-{number}tomainrequires human review). Before each child integration updates the parent branch, the Integrator verifies that every child has passing, head-bound review evidence in its done Outcome Record (child-review-gate, defaultrequired). It never runs a review itself. If a child lacks that evidence it stops fail-closed and moves the parent Issue tostatus:blocked-human-reviewwith the per-child reasons; do not turn the gate off to get past it unless the user explicitly accepts integrating without review evidence, and follow child-review-gate.md to resume.# Dry-run (preview changes without applying) orchestune-dispatch --no-apply -p <parent_issue_number> # Apply and launch parallel workspaces orchestune-dispatch -p <parent_issue_number>stdout shows flushed progress by default, including on pipes; it is no longer JSON. Read the final JSON file instead of
dispatch | jqor redirecting stdout as JSON. Human runs use the absolutereport savedpath. Automatic results usereport-dir(default.orchestune/reports/dispatch, relative to the primary checkout), underparent-<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 viaORCHESTUNE_DISPATCH_REPORT_PATH(relative paths use invocation cwd). Preserve the exit code before reading even a failed run's report:session_dir=$(orchestune 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 -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.$sessionDir = orchestune 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 -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.lockremains 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).plannedmeans dry-run selection;launchedmeans launch procedure committed, not task completion;localis a dummy target. Progress failure does not stop result saving.- If the state file
run_state.jsonis lost (such as after GitHub Actions cache eviction), the dispatcher self-heals by reconstructing its execution state fromstatus:in-progressGitHub Issues and open PR head branches, allowing dispatch to continue safely. - Read the current run's JSON and return dispatch outcomes (launched tasks, worktree paths, logs) to the orchestune skill for final reporting to the user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

