/orch:orch-deliveryfrom orch
Drives an Orch Delivery run from Claude Code: plan construction, the plan gate, activation, and the per-issue dispatch/review/merge loop. Load this after orch-architect, once a mutating request has been read-only investigated and a plan is ready to propose.
Ships in orch. 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.
This skill is the wire contract and presentation layer for a Delivery
run. Every decision (what routes where, what is allowed next, what a
gate result means) comes from orch run <verb>; your job is to
construct honest requests, run the verb, and present its result
faithfully.
orch run <verb> < <scratch-file> and capture stdout.
PowerShell (5.1 and pwsh 7) rejects < ("The '<' operator is
reserved for future use."); use the pipe form instead:
Get-Content -Raw <scratch-file> | orch run <verb>. On Windows
PowerShell 5.1 specifically, that pipe alone silently corrupts
non-ASCII (em dashes, §) into ?; guard it with
$OutputEncoding = New-Object System.Text.UTF8Encoding $false; Get-Content -Raw -Encoding UTF8 <scratch-file> | orch run <verb>.orch run status --json never reads stdin — call it bare.
Selection-bearing wire versions are closed: StatusDoc 4, GateDoc 4, Dispatch 4, Escalate 2, Review 4.
Reject any other schema_version before reading or submitting a Selection.
Build a PlanDoc (schema_version: 1) honestly. Routing is derived
entirely from the facts you declare; there is no field to choose a
model or effort yourself. "Adjust agent routing" at the gate always
means: revise the facts that were wrong and resubmit — never hand-edit
a routed selection.
{
"schema_version": 1, "host": "claude", "title": "...", "summary": "...",
"issues": [{
"id": "issue-slug", "title": "...", "objective": "...",
"acceptance_criteria": ["..."], "type": "feature",
"area_labels": ["..."],
"facts": {
"read_only": false, "unusually_difficult": false,
"risk_domains": [],
"downgrade": {"mechanical": false, "low_risk": false,
"fully_specified": false, "unsurprising": false}
},
"depends_on": [], "wave": 1, "required_tests": ["..."],
"tests_ci_does_not_run": ["..."],
"fixes": [123],
"usage_class": "medium"
}]
}
facts.read_only must be false for every issue — read-only work
belongs in Assist. depends_on names issues by id; a dependency's
wave must be strictly less than the depending issue's. usage_class
is light, medium, or heavy. area_labels are repository-defined:
every one you declare must already exist in the repo — activation fails
closed at a read-only preflight if any is missing (create it with
gh label create <name> or drop it from the plan).
Write acceptance_criteria and required_tests as a floor, not a
survey. Each acceptance criterion names one behavior that must hold once
the issue is done — a specific, checkable outcome an executor can
satisfy and a reviewer can confirm without guessing — never an
open-ended instruction like "handle edge cases" or "add tests" that
leaves the bar for "done" to be invented later. Each required test names
the exact command that gates the change (go test ./..., gofmt -l .);
it is not an invitation for comprehensive coverage, just the check this
change must pass.
When the repository's CI does not run one of those required tests — it
sits behind a build tag no workflow enables, needs a tool or credential
CI has not got, or no workflow invokes it at all — name that exact
command in tests_ci_does_not_run. Every entry must match one of the
same issue's required_tests strings exactly, or the plan is rejected.
The engine renders the declaration beside the test it names at the plan
gate, in the created issue body, and in the dispatch result, so the human
approves knowing which of the issue's gates CI actually holds and the
executor knows which check nothing but a local run will ever execute.
Omit the field unless you checked the repository's workflows yourself: it
is a claim about that repository, and saying nothing is honest where a
guess is not. Omitting it never asserts that CI runs everything.
When an issue fixes a defect that an earlier merged pull request of this
repository shipped, list that PR's number in fixes, so orch metrics report can attribute the escaped defect to the issue that merged it. The
field is optional; leave it out when the issue fixes no merged PR's defect,
and a plan that lists none is digest-identical to one written before the
field existed. orch run plan refuses a plan whose fixes holds a number
that is not positive or holds the same number twice. orch run activate
checks each listed PR before creating any issue, branch or worktree and
refuses, naming the PR, if it does not exist in the repository or is not
merged. The gate and the created issue body list the PRs an issue fixes,
and the issue's activate metrics event records them; nothing else carries
them. A fixed PR that no recorded merge event names (one merged before
merge events recorded PR numbers) is reported as unattributed rather than
guessed.
An acceptance criterion describes an observable outcome, and never names a function, a control-flow step, or a validity notion the change is expected to introduce. Naming one that does not exist yet hands the executor a design to invent in order to satisfy the wording, and every later review then grades how completely that invention was built rather than whether it needed to exist at all — state what must be true once the issue is done, and leave the mechanism to the executor.
A criterion requiring evidence the repository cannot produce is not a valid criterion. When nothing in the repository can observe what the criterion asks about — how an agent routes, what it decides, whether it follows an instruction it was given — the only thing that could satisfy it is a check on a proxy, such as a test asserting the instruction's prose is still present, which pins the words and says nothing about the behavior. Ask what evidence would settle the criterion before you write it: if the honest answer is a proxy, write the criterion against something the repository can actually produce evidence for, or leave it out of the plan.
When an issue declares at least one entry in facts.risk_domains, the
engine contributes one further acceptance criterion of its own. The
GateDoc, the created issue body, the audit record, and
DispatchResult.acceptance_criteria all carry it, so a risk-domain
issue's criteria list is one entry longer than the list your PlanDoc
submitted and the contributed entry is always last. Do not write it into
the PlanDoc yourself — a plan that lists it too carries it twice and
costs a second judgment saying the same thing. It reads: Blast radius
(contributed by Orch because this issue declares a risk domain, not by
the plan document): name every element of the structure this change
touches and state, for each, whether the behavior it had before this
change still holds; record a behavior this change removes as a
before-and-after in the same document that stated the old behavior,
rather than deleting that statement; and where a restriction is
attributed to one named symbol, establish whether it holds for that
symbol alone or for every symbol of its kind, and say which. What
settles it is an enumeration in the pull request body naming each
element the change touched and its before-and-after; passing tests do
not settle it. Present it at the plan gate as part of the issue's
criteria, exactly like the ones you wrote — it is part of the standard
the human is approving.
Plan text must never reference machine-local or gitignored paths such
as .memhub/, .orchestrator/state.json, or
.orchestrator/config.local.toml — an executor sees only the committed
tree inside its worktree, and none of these exist there.
Before submitting a PlanDoc, verify every fact an acceptance
criterion asserts about the repository — a path, a file, a symbol,
or a count — by running the command that checks it: git ls-files,
git check-ignore, or a grep whose output you actually read. A
count you have not confirmed this way belongs in the criterion as
"every site" — a form an off-by-one cannot falsify — not a specific
number like "the five sites". Read one issue's acceptance criteria
together as a set, not one at a time, and confirm that a single
implementation can satisfy all of them simultaneously. Symbol
visibility across a package boundary is a concrete way a set
becomes contradictory: a pair of requirements — one criterion
needing a symbol unexported, another criterion needing a different
package to reach it — is unsatisfiable by construction, so prefer a
criterion stating the invariant actually wanted ("normalization
logic has exactly one source in the module") over one prescribing
the mechanism you imagine delivering it ("a single unexported
function"); the invariant stays satisfiable however the executor
structures the code. When a criterion is justified by a claim that
something currently fails silently or passes while broken, run
that failing case once yourself — in a scratch directory or
throwaway clone outside the repository, never in this checkout
where tracked-file changes are mechanically denied in Assist, the
same convention this file already states for verb request JSON —
and read its actual outcome before writing the criterion — a
mechanism that looks fragile can fail loudly on exactly the change
you feared it would miss — and treat a memhub note or a prior
finding you are relying on as a lead to verify, not evidence to
inherit.
Call orch run plan with the PlanDoc on stdin. The result is a
GateDoc (schema_version: 4): plan_digest, plan_title, host, target
({checkout, checkout_id, github: {host, owner, repository, id}}),
config_revision, config_overrides, merge_strategy, execution, memhub
({mode, probe, recall, detail}), ci ({workflows_present, statement}), and
issues[] — each with id, title, objective,
acceptance_criteria, role, executor ({model, effort}),
reviewer ({model, effort}), reviewer_downgraded,
routing_rationale, depends_on, wave, required_tests,
tests_ci_does_not_run, fixes (present only when the plan lists some), risk,
usage_class, labels.
Render the gate in full prose before asking anything: every field of
every issue (name the routed model and effort plainly, and explain a
reviewer_downgraded via routing_rationale), then the run-level
fields (plan_title, host, merge_strategy, config_revision +
config_overrides if any, memhub, ci).
Display target.checkout and the full target.github host/owner/repository
and target.github.id before asking. Refuse an unsupported gate or a missing
or mismatched target, including a missing repository ID.
Render each entry of tests_ci_does_not_run against the required test it
names, not as a list of its own: the human is approving that command as a
check nothing but a local run will ever execute. An absent field is the
plan saying nothing about CI coverage — never report it as a finding that
CI runs every required test. Render fixes, when present, as the merged PRs
the issue fixes; an issue without it fixes none that the plan named.
Then ask one AskUserQuestion, header Plan gate, exactly these
four options in order:
Approve and enter DeliveryAdjust agent routingRevise scopeCancel and remain read-only"Adjust agent routing" = revise the facts that drove the unwanted
routing and resubmit to orch run plan for a fresh gate; routing is
always re-derived, never edited directly. "Revise scope" = change what
the plan covers (issues, objectives, acceptance criteria) and resubmit
the same way. "Cancel and remain read-only" = no activation; return to
Assist conduct.
On approval, call orch run activate with an ActivationRequest
(schema_version: 3) carrying the identical PlanDoc just gated
(same decoded content — the digest is recomputed server-side) plus:
{
"schema_version": 3,
"plan": { "...": "the exact gated PlanDoc" },
"approval": {
"plan_digest": "sha256:...", "approved_by": "...",
"target": {
"checkout": "/absolute/path/to/primary", "checkout_id": "sha256:...",
"github": {"host": "github.com", "owner": "owner", "repository": "repo", "id": "R_kgDOAAAAAQ"}
},
"approved_at": "2026-07-12T00:00:00Z",
"statement": "approve-and-enter-delivery"
}
}
Copy GateDoc.plan_digest and the exact GateDoc.target into approval.
Before GateDoc v3, the digest bound only the submitted plan; v3 bound the
effective contract (submitted scope, engine-contributed criteria, routing and
execution settings), not the checkout or GitHub destination. GateDoc v4
binds that same contract plus the verified target, including the repository ID
that distinguishes repositories at the same name. Present execution (all
six profiles, concurrency limit, merge strategy, memhub mode, and metrics
setting) alongside the issues. Never compute approval from PlanDoc.Digest
or reuse an old approval. The earlier byte-for-byte instruction is relaxed:
JSON whitespace and object-key order do not change approval. Activation v1/v2,
missing or malformed identity, and target drift are refused; re-gate with
matching engine and adapter versions and obtain fresh approval. Expect
ActivationResult schema 3.
Before state v6, v5 recorded the contract version and effective execution digest. State v6 retains them and adds block causes and resolution history; v4/v5 remain inspectable, but lifecycle verbs and resume refuse to hot-migrate them: finish using the original engine, or abort and re-plan. Effective configuration drift, including local overrides without a revision change, also requires restoring the approved settings or aborting and re-planning. This restriction applies to every lifecycle verb and resume; engine-authorized issue escalation within the approved profiles remains supported. Approval-contract v4 also refuses older approvals for every lifecycle verb and resume, even with state v6. Inspection and explicit abort remain available.
approved_by = git config user.name, falling back to "human". approved_at = current time as
UTC RFC3339. statement is the exact literal
approve-and-enter-delivery.
The result (ActivationResult) carries run_id and, per issue,
id/number/url/branch/worktree. The run is now in Delivery.
On Claude Code a subagent's cost reaches you only in its task notification, which arrives after the subagent's hand-back message (observed on 2.1.301) and carries:
<usage><subagent_tokens>N</subagent_tokens><tool_uses>N</tool_uses><duration_ms>N</duration_ms></usage>
Take every subagent's usage from that notification, never from the
hand-back. In usage and executor_usage, subagent_tokens is
total_tokens and duration_ms is duration_ms; the notification has
no input/output/cache split, so supply none. If no notification has
arrived for the work being recorded, omit the field — never estimate.
executor_usage is also omitted for a fix cycle done by a subagent
resumed with SendMessage, whose notification duration_ms is not
reliable per cycle. Wait for the executor's or reviewer's notification
before calling orch run pr-open or orch run review for its work, but
never open-endedly. The notification arrives seconds after the hand-back
and does not start a turn, so ending your turn to wait can leave you idle
indefinitely; a background command's completion does start one. Before
ending your turn to wait, start sleep 60 with the Bash tool's
run_in_background. When it completes, check for the notification: if it
has arrived, take its usage; if it still has not, make the verb call with
usage (or executor_usage) omitted rather than waiting again, so a
missing notification delays the call by at most one timer. A subagent with
a background child process still running can send its notification long
after the hand-back.
Scouts have no lifecycle verb. Record each scout's notification usage
with orch metrics record (main checkout as cwd, one observation as JSON
on stdin), run-level with role scout and no issue. It needs the current
run's run_id, so a scout that ran before activation (during planning)
is recorded after orch run activate returns: keep its notification
values until then, and set at to when the notification arrived.
Record before orch run complete or abort clears the run. session
is the scout's task or agent id, so each scout is its own stream;
id must be unique in the run and a retry of the same observation is an
exact replay. Tokens are the only counter: an observation has no
duration field, so a scout's duration_ms is not recorded.
{"schema_version": 2, "run_id": "run-20261018T001911Z-8ae3053f",
"id": "claude:scout:a1b2c3d4e5f6:tokens", "at": "2026-10-18T00:12:30Z",
"source": "claude-task-notification", "role": "scout", "host": "claude",
"session": "a1b2c3d4e5f6",
"sample": {"stream": "subagent-tokens", "mode": "cumulative", "sequence": 1,
"counters": {"total_tokens": 48213}}}
A scout with no notification is not recorded at all, rather than
guessed. See docs/metric-observations.md.
Work issues in wave order, never more than concurrency.max_subagents
in flight at once. For each issue:
Dispatch — orch run dispatch with
{"schema_version": 4, "issue_number": N}. Result
(DispatchResult): branch, worktree, executor, reviewer,
rationale, objective, acceptance_criteria, required_tests,
tests_ci_does_not_run.
Spawn the executor — spawn orch-implementer or
orch-specialist (per the routed role) via the Task tool by
name, with no model override, so the project agent definition's
frontmatter model and effort are what run. The Task tool's
model parameter accepts only the coarse tier aliases sonnet,
opus, haiku and fable — never an exact version string like claude-sonnet-5 — so
an override can never express a routed selection, and is never the
way to honor routing. The same-named definition under this project's
.claude/agents/ takes precedence over the plugin's canonical copy;
orch render-agents creates it, and activation already fails closed
when it is missing or stale. Before spawning, the selection
currently in force — the most recent EscalateResult.executor
when an escalation has rerouted the issue since dispatch,
DispatchResult.executor otherwise, as (model, effort) — must
match a project agent definition's frontmatter model and effort
exactly. If the routed selection matches no project agent's
frontmatter, stop and tell the human — never spawn a mismatched
agent, and never report the routed selection as if it ran. Every
spawn prompt opens with:
Routed selection: <model> @ <effort>
Effort is a real host parameter on Claude Code: the project agent
definition's effort frontmatter overrides the session effort while
that subagent runs, so no prompt sentence stands in for it. The
levels a model accepts depend on the model, and nothing here checks
the effort a running subagent uses. The opening line is a statement
of fact, not a behavioral nudge. Transcribe
DispatchResult.objective, .acceptance_criteria, and
.required_tests into the prompt verbatim — this is the text a
human approved at the plan gate, not the Architect's recollection of
it — along with the worktree path and branch. Transcribe each entry of
.tests_ci_does_not_run against the required test it names, so the
executor is told which of its required checks CI will not repeat; drop
nothing, an unstated one reads as a check CI holds.
Before spawning, you (the Architect) perform whatever memhub recall is relevant to the issue, with the main checkout as cwd — never a worktree. Embed the relevant recall results directly in the dispatch prompt; the executor subagent never invokes memhub itself.
PR-open — once the executor reports verification evidence, call
orch run pr-open:
{"schema_version": 1, "issue_number": N,
"verifications": [{"name": "...", "command": "...", "result": "...", "detail": "..."}],
"usage": {"input_tokens": 0, "output_tokens": 0, "cache_read_tokens": 0,
"cache_creation_tokens": 0, "total_tokens": 0, "duration_ms": 0}}
Before this update, caller-supplied verification detail values longer
than 2000 Unicode code points were silently truncated. Now pr-open and
review reject them with ErrBadRequest before mutation. Split longer
evidence across separately named verifications, each with at most 2000
Unicode code points; shorter details are kept intact. Existing records
remain readable; review-summary and engine-owned body-size policies are
unchanged.
At least one verification is required. The verification names
required-ci, merge, abandoned, and review-cycle-<n> are
engine-owned and are rejected with ErrBadRequest before any
mutation when supplied by a caller. A verification whose text
describes the branch as a whole — commit counts, file counts, diff
totals, or scope claims — must be named with the branch-scope:
prefix at this first submission, not on a later cycle: the name
is the identity orch run review's replace-by-name upsert matches
on, so a prefix added later appends a second entry instead of
replacing the original, and the unprefixed original persists in the
audit record permanently. This prefix does not collide with the
engine-owned names required-ci, merge, abandoned, and
review-cycle-<n>. usage is optional (PRD §21) and is the
executor's own cost, taken from its task notification per
Subagent usage: wait for that
notification before calling orch run pr-open, starting a 60-second
background timer before ending your turn to wait (a timer's
completion starts a new turn, a late notification does not), then
supply subagent_tokens as total_tokens and duration_ms, and
nothing from the hand-back. Omit usage when no notification has
arrived by the time the timer completes — never an estimate. Result carries pr_number, pr_url.
Spawn the reviewer — once the PR stops changing, spawn the
reviewer fresh (a new instance, not the executor continuing):
orch-reviewer-safe when the routed reviewer names the §10
safe-downgrade profile — the reviewer_downgraded routing the
GateDoc showed at the plan gate, carried in
DispatchResult.reviewer and superseded by the most recent
EscalateResult.reviewer if the issue has been rerouted since
dispatch — orch-reviewer otherwise. Spawn whichever of the
two that selection names, by name and with no model override on
either, under the same rule as the executor: the Task tool's
model parameter accepts only the coarse tier aliases sonnet,
opus, haiku and fable, never an exact version string, so it
cannot express a routed selection and an override is never the way
to honor routing — only the project agent definition's
frontmatter pins an exact model and effort. Before spawning, the
selection currently in force — the most recent
EscalateResult.reviewer when an escalation has rerouted the issue
since dispatch, DispatchResult.reviewer otherwise, as
(model, effort) — must match the selected reviewer agent's
frontmatter model and effort exactly. Check the same-named file
under .claude/agents/, which takes precedence over the plugin copy.
If the routed selection matches no project agent's frontmatter,
stop and tell the human — never spawn a mismatched agent, and never
report the routed selection as if it ran. reviewed_head_oid
must be the PR's live head OID at review time (e.g. via
gh pr view), never a cached value.
Review — the reviewer produces one consolidated report
(acceptance criteria, scope, correctness, tests, CI, security,
manifest accuracy). Call orch run review with reviewer set to
the selection currently in force: the most recent
EscalateResult.reviewer when an escalation has rerouted the issue
since dispatch, or DispatchResult.reviewer otherwise.
orch run review compares the submitted reviewer against the
issue's current routing decision and refuses a mismatch;
orch run dispatch cannot be re-run to refresh a stale value — it
accepts only the worktree-ready phase, which a dispatched issue has
already left, so you must track whichever value is current yourself:
{"schema_version": 4, "issue_number": N, "reviewed_head_oid": "...",
"verdict": "approve|request-changes|needs-evidence", "summary": "...",
"reviewer": {"model": "...", "effort": "..."},
"judgments": [{"criterion": 1, "judgment": "satisfied|unsatisfied|wrong|unverified", "reason": "..."}],
"verifications": [{"name": "...", "command": "...", "result": "...", "detail": "..."}],
"usage": {"input_tokens": 0, "output_tokens": 0, "cache_read_tokens": 0,
"cache_creation_tokens": 0, "total_tokens": 0, "duration_ms": 0},
"executor_usage": {"input_tokens": 0, "output_tokens": 0, "cache_read_tokens": 0,
"cache_creation_tokens": 0, "total_tokens": 0, "duration_ms": 0}}
judgments is required and carries exactly one entry per acceptance
criterion the issue holds: criterion is the criterion's 1-based
position in the issue's approved acceptance criteria, judgment is
one of satisfied, unsatisfied, wrong, unverified, and reason is the
reviewer's own reason for that call, which the audit record keeps as
an engine-owned acceptance-criterion-<n> verification you never
supply yourself. The engine counts the criteria from its own state,
so the request cannot decide how many it is answering — a missing,
duplicated, or out-of-range criterion is refused before any mutation.
On a risk-domain issue that count includes the engine-contributed
blast-radius criterion, last in the list and judged on the same terms
as every criterion the plan document supplied.
A verdict of approve is accepted only when every criterion is
judged satisfied. Before review v4, record request-changes otherwise
was the only non-approving path; now use needs-evidence for an
evidence-only stall, and request-changes for a real finding or wrong
criterion, including when evidence is also missing. Transcribe
the reviewer's per-criterion calls, never your own reading of its
summary.
usage is optional (PRD §21), same rule as PR-open: it is the
reviewer's own cost, taken from the reviewer's task notification
(see Subagent usage). The reviewer's
hand-back arrives before that notification, so wait for the
notification before calling orch run review, starting a 60-second
background timer before ending your turn to wait (a timer's
completion starts a new turn, a late notification does not); a review
recorded on the hand-back alone has no usage. Omit usage when no
notification has arrived by the time the timer completes.
A criterion judged wrong is the needs-human outcome, and this one
orch run review call makes it: the engine blocks the issue and
flags it needs-human itself, and the result says so in phase,
wrong_criteria, and blocked_reason. There is no second verb call
to make — do not call orch run escalate for it and do not resume
the executor. Instead surface the rejected criterion and reason to
the human, together with the returned blocked_reason, and stop
working the issue. A request-changes based on
a code finding resumes the same executor in the same worktree on
the same branch: it fixes and pushes, then a fresh reviewer is
spawned (step 4) and orch run review is called again. Because this is
the only verb call on that cycle, executor_usage (same optional shape
as usage) carries the executor's fix-and-push cost for the cycle just
finished. Fill it from a task notification as usage is, with the same
60-second timer and omission if the notification has not arrived (one
timer covers both), but omit it
when there was no fix cycle (the first review after pr-open) and for a
fix cycle done by a subagent resumed with SendMessage: that
notification's duration_ms has been seen both cumulative across
resumes and per resume, so it cannot be trusted for the cycle. Never
estimate it.
For needs-evidence, identify every unverified criterion and its reason;
all other criteria must be satisfied. Keep execution with the executor or
Architect and independent judgment with a fresh routed reviewer. The engine
keeps in-review, records the full reviewed head and retained
review-evidence-<n> receipt, and orch run next directs evidence collection
plus fresh routed review, not a fix or merge. It spends no grant code-fix
cycle and grants no new authority. Follow docs/review-evidence.md: submit
execution_evidence with criterion, full head_oid, stable artifact
identity, command, result, collected_by and RFC3339 collected_at.
The reviewer independently evaluates artifact/criterion fit. Same-head
approval needs no fix commit; missing or other-head evidence cannot discharge
pending criteria, which survive real fixes. Changed heads need new evidence
and independent review. Attribution is not authentication; the engine never
executes supplied command text. Existing reviewer permissions, CI and human
merge gates remain unchanged. At #528, Review v3/v4 or approval-contract v2/v3
mismatches failed explicitly. After #534, Review remains v4, and contract v4
is required for every lifecycle verb. On mismatch, preserve the run and use
its original engine, or abort and obtain fresh plan approval. Never migrate
an active run or replace its installed engine to continue it.
orch run pr-open is not reachable a second time, so verifications
is optional and takes pr-open's input shape — use it to carry
evidence re-run on the fix commit (e.g. tests re-run before
requesting the next review) into the audit record. The same
verification names as pr-open — required-ci, merge, abandoned,
and review-cycle-<n> — are engine-owned and are rejected with
ErrBadRequest before any mutation when supplied by a caller.
A verification whose text describes the branch as a whole —
commit counts, file counts, diff totals, or scope claims —
becomes false as soon as the executor pushes a fix commit, and
must be resubmitted on every subsequent review cycle under the
same branch-scope:-prefixed name chosen at pr-open. This
works because caller-supplied verification entries are
replace-by-name upserts: submitting the same name again on
orch run review re-stamps that entry at the live head and
supersedes its stale text; the engine's own review-cycle-<n>
entries are appended, not replaced, each cycle. A reviewer's
non-blocking findings default to the backlog rather than into
the current fix cycle, and are folded into the current cycle
only when they sit inside text the blocking fix already
touches. approve continues.
CI — orch run ci with
{"schema_version": 1, "issue_number": N} records the honest
tri-state required-CI result (never conflate no-checks with
passing).
Merge-report — orch run merge-report with
{"schema_version": 1, "issue_number": N} requires an approving
last review and mergeable CI, and pins the PR's live head as the
approved head. Before #528 the ordinary path could pin a newer head than
the review; now both standard and manual-CI paths require the successfully
recorded reviewed head to match the live head, with no pending evidence.
Result: pr_number, pr_url, head_oid,
merge_strategy, ci ({state, required, total}),
review_cycles, config_revision, and no_ci_statement (present
only when no required CI checks exist — show it plainly so "no CI
gates this merge" is never silently implied).
Merge gate — present the full merge report, then ask one
AskUserQuestion, header Merge gate: Approve merge /
Not yet. This approval is fresh for every PR, never inherited.
Merge — on approval, call orch run merge:
{"schema_version": 1, "issue_number": N,
"approval": {"pr_number": N, "head_oid": "...", "approved_by": "...",
"approved_at": "2026-07-12T00:00:00Z", "statement": "approve-merge"}}
pr_number and head_oid are pinned to exactly what merge-report
returned (drift is rejected — re-run merge-report). statement is
the exact literal approve-merge.
Cleanup — orch run cleanup with
{"schema_version": 1, "issue_number": N, "statement": "cleanup-issue"}
removes the remote branch, worktree, and local branch as one act.
Complete — once every issue is cleaned, call orch run complete with {"schema_version": 1} (run-level, no issue
number). Result carries run_id, merged, abandoned,
returned_to, memhub_wrapup_due. When memhub_wrapup_due is
true, wrap up memhub (orch-architect: main checkout as cwd,
Architect-only writes) before announcing the return to Assist.
Before #517, pending/failing required CI had no manual continuation and an
unpinned out-of-band merge remained blocked. Those remain the defaults. Only
after showing actual CI and the current run/issue/PR/full independently approved
reviewed head, ask the human explicitly whether to accept that CI and why.
Use AskUserQuestion; never infer consent from a stalled runner, a grant or
an audit receipt.
Follow the exact stdin requests in docs/manual-ci-exceptions.md (orch run help
also describes them): schema-1 merge-report and merge accept ci_exception
with run_id, issue_number, pr_number, full head_oid, human approved_by,
actual approved_at, nonempty reason, current repair_number (zero if none)
and statement accept-incomplete-ci. The decision must follow current review
and repair. Show the unchanged CI and receipt, then obtain the separate fresh
Merge gate confirmation above; send ordinary approve-merge plus the explicit
ci_exception again. Neither the receipt nor an autonomy grant supplies this
human decision or permits grant-approve-merge to waive CI.
If the PR is already MERGED, ask instead to acknowledge that completed merge
and authorize closure/bookkeeping. Use merge.merged_acknowledgment with those
same fields, statement acknowledge-already-merged-pr and an actual decision
time after the merge; omit approval and ci_exception. It requires the
same independently approved reviewed head and can recover its specific
out-of-band-merge operational block; it does not invent prior approval.
New heads/reviews/repairs need new decisions. No probe/auth/transport failure,
unresolved human/secret block, independent review, criterion, grant stop, hook or
GitHub protection is waived. Show ci_exception / manual_ci_audit results.
Cleanup and completion still need their separate ordinary calls.
On unusual difficulty, reviewer uncertainty, or repeated weak-model
failure, call orch run escalate:
{"schema_version": 2, "issue_number": N, "trigger": "...", "detail": "..."}
trigger ∈ scout-uncertainty, implementer-hard-execution,
weak-model-failure, reviewer-uncertainty, architectural-ambiguity.
Result kind:
reroute — carries a new executor/reviewer and rationale; on a
chain of two or more reroutes on the same issue, each call's result
fully replaces the routing decision, so this result is now the most
recent EscalateResult and the only one describing the routing in
force, for both roles even if only one changed. Before spawning
either into the same worktree (never a new one), confirm the new
selection's (model, effort) against its project agent definition's
frontmatter under the same exact-match rule as the spawn steps above — if
the new selection matches no project agent's frontmatter, stop and
tell the human — never spawn a mismatched agent, and never report the
routed selection as if it ran.return-to-architect — the issue is blocked for human design work;
report reason and do not push it forward yourself.On a secret in the working tree, a hook failure, an auth problem, a
GitHub API failure, a validation failure, or anything else that stops
progress, call orch run block:
{"schema_version": 2, "issue_number": N,
"class": "secret|hook|auth|github|validation|other|human-decision", "detail": "..."}
A secret class stops the entire run (run_stopped: true): every
mutating verb but block itself is refused until the human runs
orch abort or orch resume. Report a secret-class block immediately
and prominently, and make no further verb calls for the run.
Before block v2 / resume v2, a later block replaced the reason and healthy
artifacts could recover every blocked issue. Now review wrong-criterion,
return-to-architect, secret, validation, other, and human-decision blocks stay
blocked until an explicit decision; only hook/auth/github and reconciliation
operational failures recover from observations. Generic failures never replace
an unresolved decision. Clearing a run stop with orch resume --resume-stopped-run
does not resolve an issue decision.
Read StatusDoc v4 for the issue's current blocks entry (its issue-local id,
cause, original reason, and optional resolution). Present the original
reason. Only after a human/Architect explicitly resolves that exact block while
keeping approved scope and criteria unchanged, call orch run resolve-block:
{"schema_version": 1, "run_id": "...", "issue_number": N, "block_id": 1,
"resolved_by": "...", "detail": "Decision and why approved work remains unchanged",
"statement": "resolve-block-without-scope-change"}
Reject unsupported result versions: resolve-block v1, block v2, resume v2.
Resolution is recorded against the original block and leaves its phase blocked;
run orch resume afterward to reconcile artifacts. It does not reset attempts,
change criteria, authorize a merge, or bypass a stopped run. Changed scope or
criteria require aborting and returning through the plan gate for fresh approval.
Before resume v2, audit text could repopulate approved work; now edited GitHub
text cannot replace it. Legacy blocks without a cause require fresh plan approval,
not a guessed resolution. Preserve branches, worktrees and evidence throughout.
To abandon an issue without merging (closes its PR and issue, keeps
branch/worktree for cleanup), call orch run abandon:
{"schema_version": 1, "issue_number": N, "reason": "...", "statement": "abandon-issue"}
statement is the exact literal abandon-issue. An abandoned issue
still needs orch run cleanup before orch run complete can succeed.
While orch grant shows an active autonomy grant, or when the user asks to
set one up, read GRANTS.md in this skill's directory: it covers setting one
up, approving inside it, stopping and telling the user, wrap-up, and
relaying. Without an active grant every gate
stays with the user exactly as described above.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kninetimmy/orch --plugin orch-claude3 skills in this plugin
/orch-architectStanding posture for operating an Orch-managed repository from Claude Code. Applies whenever a `.orchestrator/` directory exists at or above the working directory. Load this skill before planning any change, and before any request that would modify a tracked file — even a small one. Covers reading machine-truth run state, memhub discipline, and when to hand off to orch-delivery./orch-setupShared step-loop driver for the three Orch setup interviews (`orch init --step`, `orch configure --step`, `orch configure-local --step`). Load this when following /orch:init, /orch:configure, or /orch:configure-local. Batches ordinary questions and presents each emitted pagination page through its own AskUserQuestion call.Other plugins' skills for the same job