Skip to content
SprecherEast
Issue 157

process: PR Policy fails a dependent PR that isn't on a native stack

Back to our plan
Open
ciprocesstoolingpriority: medium

Type

process

Problem

AGENTS.md (from #155) requires dependent PRs to sit on a native GitHub stack, and the pr-review skill treats a prose merge order as a Blocker. Nothing automatic checks it yet. A PR whose base is another PR's branch, but which isn't in a stack, can still be opened, and nobody notices until review.

Proposed fix

Extend the PR Policy check (.github/workflows/pr-policy.yml). When a PR's base isn't the default branch, look up its stack:

GET /repos/{owner}/{repo}/stacks?pull_request=<n>
X-GitHub-Api-Version: 2026-03-10

Fail with a pointer to .agents/skills/stacked-prs/SKILL.md if the PR isn't in one.

Design points:

  • The Stacks API is in public preview. If the API errors (anything but a clear empty result), warn and pass. A required check must not break every PR.
  • The workflow only triggers for PRs into main (branches: [main]). GitHub runs it for every PR in a stack, but an unstacked PR based on another branch may not trigger it at all. Widen the trigger, or check it from the PR into main instead.
  • Test it on a throwaway stack and an unstacked dependent PR before merging.

Acceptance criteria

  • Not done: An open PR based on another PR's branch, not in a stack → PR Policy fails with a clear message and the skill link.
  • Not done: Stacked PRs and PRs on main → unchanged.
  • Not done: A Stacks API error → warning, not failure.

Area

ci, tooling

Priority

medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab