Turn the current session into an SDLC orchestrator that coordinates parallel background agents running PRP skills in isolated worktrees - decompose work into workstreams, launch and steer background agents with your harness's delegation tools, hold review gates as the user's proxy, and sequence merges. Use when the user wants to "spawn N agents in separate worktrees", "run prp-issue on these issues in parallel", "orchestrate these features", "act as my orchestrator", "coordinate agents through the PRP pipeline", "ship these issues in parallel", or invokes $prp-orchestrate.
77
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Arguments:
$ARGUMENTS(and$1,$2, ...) refer to the arguments given when this skill was invoked. Take them from the user's request; if absent, infer them from the conversation.
Coordinate multiple PRP workstreams from one session. The orchestrator is the user's proxy: it decomposes the goal, launches background agents that run PRP skills, steers them mid-flight, sits at review gates (deciding autonomously when a standing decision covers it, escalating a digest when it doesn't), and sequences the merges. The run is live and dynamic — the user can add work, stop work, redirect an agent, or ask for status at any moment, and the orchestrator absorbs it without restarting anything. The end artifacts are merged PRs plus a run file at $PRP_DIR/orchestration/<run-id>.md recording every workstream, decision, and merge.
Input: $ARGUMENTS (if absent, infer the goal and workstreams from the conversation)
# --- PRP store resolver (canonical; keep byte-identical across skills) ---
_gd="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
case "$_gd" in */.git) _root="${_gd%/.git}" ;; "") _root="$PWD" ;; *) _root="$_gd" ;; esac
_root="$(cd "$_root" && pwd -P)"
_name="$(basename "$_root" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' | sed 's/^-*//;s/-*$//')"
PRP_DIR="${PRP_HOME:-$HOME/.prp}/${_name:-project}-$(printf %s "$_root" | git hash-object --stdin | cut -c1-8)"
mkdir -p "$PRP_DIR"; [ -f "$PRP_DIR/project.json" ] || printf '{"path": "%s", "name": "%s"}\n' "$_root" "${_name:-project}" > "$PRP_DIR/project.json"references/launching.md → Detached fallback).gh pr view/checks, git state. An agent saying "done" is a claim; a green PR is a fact.auto) or escalated as a short digest (act on the answer, record it). Never guess on destructive or product-shape decisions.prp-issue (investigate, then fix)prp-implement (+ prp-pr)prp-loop, or staged prp-plan → gate → prp-implement when the user should see plans before codeprp-review / prp-codebase-question (plain background agents, no worktree)--max-parallel 3; raise only when workstreams are provably disjoint. More parallel agents = more merge surface and more gates.CHECKPOINT — the first gate. Present the run plan as a table (workstream, engine, dependencies, parallel group) plus proposed standing decisions. Do not launch until the user approves. Approval of the plan is approval of the batch — individual launches don't re-ask.
templates/orchestration-run.md, run mkdir -p "$PRP_DIR/orchestration", and create $PRP_DIR/orchestration/<run-id>.md from it exactly (run-id: YYYY-MM-DD-<slug>); report the expanded absolute path.--resume, reload the newest run file and re-verify against reality (task list, gh pr list, git worktree list) before acting.Pre-flight, before any spawn: reconcile the base branch with origin — git log origin/<base>..<base> must be empty (push or resolve what isn't). Worktree agents branch from one tip while PRs diff against the other; a stale origin makes every PR carry the unpushed base commits as phantom scope.
Launch each workstream as a background agent via your delegation tool — see references/launching.md for the exact call shape and prompt template (read it before the first launch of a run):
--max-parallel: queue the rest, launch as slots free.Prompts must be self-sufficient (agents inherit nothing from this conversation) and must end with the escalation rule: if blocked on a decision only a human can make, stop and report the blocker — the orchestrator relays it to a gate and resumes the same agent via a follow-up message with the answer, context intact.
Monitoring is event-driven, not polled: background agents notify on completion, and their final report returns to the orchestrator. Between events, stay responsive to the user — this phase is a loop of reacting to whichever arrives first:
On agent completion: verify the claim against authority (PR exists? checks green? artifacts written?), update the workstream row and Event Log, then launch the next queued workstream into the freed slot. A "blocked" report → gate it (Phase 5), then message the decision back to the same agent to continue.
On user input at any time — the run absorbs it live:
dropped + reason; the worktree/branch survive for later.gh pr list if stale.Stall rule: an agent silent well past its engine's expected runtime → check task status/output; either send a nudge with corrective context, or stop it and gate the failure (retry / reassign / drop). Two failed restarts → stop restarting, escalate.
Gate points: after plans land (staged pipelines), when a PR opens, before every merge, on every "blocked" report, and on any destructive or ambiguous call.
auto: <action> per SD-<n> in the Event Log.Hard rules regardless of standing decisions: never merge to a protected branch without the user having approved that merge path at least once this run; never delete a branch or worktree with unmerged commits.
When PRs are green and gate-approved:
gh pr diff <n> --name-only; overlapping pairs merge farthest apart.gh pr checks before the next merge.complete with a final outcomes table.references/launching.md → Cleanup). Keep the run file — it is the record.references/launching.md — same protocol, headless CLI, artifacts as truth.references/launching.md — launch call shapes, the workstream prompt template, steering/stop/status patterns, the detached headless fallback, cleanup. Read before the first launch of a run.templates/orchestration-run.md — the run-file format. Read before creating the run file; follow it exactly.1142738
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.