orc-pr-driver

Executes stacked pull request plans with per-layer build, test, and lint gates.

6|1|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/azure-id/orc --skill orc-pr-driver-azure-id
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: orc-pr-driver
Source: https://github.com/azure-id/orc/tree/main/templates/skills/orc-pr-driver
Command: npx skills add https://github.com/azure-id/orc --skill orc-pr-driver-azure-id

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Splitting a large change into stacked pull requests is error-prone: files get lost between layers, lower layers break the trunk when merged alone, and rebases silently turn previously-green branches red. This Skill takes an approved stack plan and executes it safely, enforcing a per-layer green gate so every PR in the stack is reviewable and mergeable on its own. ## Core Features & Use Cases - Plan-driven stack execution: Reads a validated stacked-pr/<slug>/stack-plan.md and refuses to run on incomplete plans (missing ticket, unanswered decisions, fewer than 2 layers, red build). - Snapshot-protected splitting: Commits the existing worktree to a snapshot branch before touching any branch, then materializes each layer file-by-file with a completeness check proving nothing was dropped. - Mandatory per-layer green gate: Runs build, scoped tests, lint attributed to each layer's own base, and the repo's pre-commit hooks — never --no-verify, never submitting a red layer. - Stack lifecycle management: Submits via gh stack submit, writes PR bodies from templates, and handles sync, rebase, conflict resolution, and bottom-up merging. - Use Case: After planning a 4-layer stack with /orc-pr-setup, run this Skill to create one branch and PR per layer, verify each layer passes CI independently, and merge them bottom-up as reviews complete. ## Quick Start Ask the assistant to run /orc-pr-driver to build and submit the stacked pull requests from your approved stack plan.

Frequently Asked Questions about orc-pr-driver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create stacked pull requests on GitHub?▼

Create a stack plan with /orc-pr-setup or `orc pr stack template <slug>`, then run /orc-pr-driver. It uses the github/gh-stack extension to create one branch per layer, submits them with `gh stack submit`, and chains each PR's base to the layer below.

How do I split a large change into multiple PRs?▼

The driver snapshots your existing worktree into a temporary branch, then materializes each layer file-by-file from the plan's file list. Splits are file-granular only — hunk surgery and partial-file splits are forbidden, and a completeness check verifies no file was dropped.

Does gh stack work with forked repositories?▼

No. GitHub stacked PRs cannot cross forks, so the driver's preflight checks fail on a fork and it recommends a single regular PR instead. The repository must also have gh 2.0+ and the github/gh-stack extension installed.

Why does my linter flag unused code on a lower stack layer?▼

A foundation layer that declares a function only a higher layer calls is genuinely dead code as a standalone PR. The driver stops and asks whether to merge the layers, move the first caller down, or add an explicit reasoned suppression — it never suppresses silently.

What happens when I amend a lower layer in a stack?▼

Amending a layer rewrites every branch above it, so previously-green upper layers can go red. The driver runs `gh stack rebase --upstack` and re-runs the full build-test-lint gate at every layer above the change, bottom-up.

When should I not use stacked pull requests?▼

Avoid stacking for changes spanning multiple repositories (unsupported by GitHub), on forks, or when the change fits one reviewable PR. Above 6 layers the planner warns, and above 8 it stops, since each layer costs a full CI run and review cycle.