chore(skill): Scope iterate-pr archive check to the stack tip#29
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the iterate-pr skill guidance so agents handle the PR OpenSpec Archive Check correctly in stacked-PR workflows, avoiding premature archiving on non-tip PRs.
Changes:
- Adds instructions to determine whether the current PR is the tip of a stack (no open PRs based on its head branch).
- Directs agents to ignore the OpenSpec archive-check failure on non-tip PRs, and require archiving on the tip PR only.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
thecodedrift
added a commit
that referenced
this pull request
Jun 12, 2026
Address review on PR #29: - Clarify that pr-check-openspec.yml is scoped to `pull_request.branches: [main]`, so it only runs on PRs targeting main (typically the bottom of a stack and any PR retargeted to main); a PR based on another feature branch won't run or fail it at all. - Make the tip-detection commands copy/pasteable via a HEAD shell var. - Name the full dated archive destination `openspec/changes/archive/YYYY-MM-DD-<name>/` so the change isn't moved to a non-standard location that still satisfies CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Teach the iterate-pr skill that the PR OpenSpec Archive Check (pr-check-openspec.yml) is expected-red on every PR in a stack except the tip. An OpenSpec change is archived exactly once, at the end of the work, so a stacked PR that still carries the in-progress change directory must not archive — doing so would remove the change docs before the implementation PRs above it merge. The skill now determines whether a PR is the tip (no open PR targets its head branch as base) and only treats the archive check as actionable there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address review on PR #29: - Clarify that pr-check-openspec.yml is scoped to `pull_request.branches: [main]`, so it only runs on PRs targeting main (typically the bottom of a stack and any PR retargeted to main); a PR based on another feature branch won't run or fail it at all. - Make the tip-detection commands copy/pasteable via a HEAD shell var. - Name the full dated archive destination `openspec/changes/archive/YYYY-MM-DD-<name>/` so the change isn't moved to a non-standard location that still satisfies CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c1845a5 to
52ef35a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teach the
iterate-prskill to treat thePR OpenSpec Archive Check(pr-check-openspec.yml) as expected-red on every PR in a stack except the tip.An OpenSpec change is archived exactly once, at the end of the work. In a stack of PRs that all carry the same in-progress change directory, that check fails on every PR — and archiving on an intermediate PR is wrong, since it would remove the change docs before the implementation PRs above it have merged.
The skill now determines whether a PR is the tip of the chain (no other open PR targets its head branch as base) and only treats the archive check as actionable there. Every other check is handled normally regardless of stack position. This came directly out of iterating the local-rule-routing stack, where the archive check is red on #23–#27 by design.