orchestune-dispatch
Skill1 starsChanged 52 days agoMITView on GitHub
Internal follow-up skill invoked by orchestune to schedule and dispatch eligible tasks to local/cloud coding agents.
In this repository14 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- issue-design-reviewSkill
- local-ci-developerSkill
- orchestune-dispatchSkill
- orchestune-provisionSkill
- orchestuneSkill
- issue-design-reviewSkill
- local-ci-developerSkill
- orchestune-provisionSkill
- orchestune-readinessSkill
- 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 85
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 86
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 408,460 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) 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: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,agyand Grok targets request Claude review. Explicitclaudeorcodexvalues inorchestune.tomloverride the mapping for every target, and[reviewer_by_target]overrides it per target. 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,--dispatch-target,--max-concurrent,--profile, and--allow-unsafe-agent-execution(for local CLI targets). Local CLI targets (including when local defaultautodetects a local CLI) require--allow-unsafe-agent-executiononly 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 viaorchestune.toml. The explicit gate exceptions are--child-review-gate off(orchild-review-gate = "off"inorchestune.toml) and--semantic-review-mode {required,advisory,off}(orsemantic-review-mode = "off"inorchestune.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
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). 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 tostatus: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 tostatus: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).
# 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>- Layer 1 (Child review-evidence gate, default
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 --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.$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 --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.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.

