Skip to content

chore(skill): Scope iterate-pr archive check to the stack tip#29

Merged
thecodedrift merged 2 commits into
mainfrom
chore/iterate-pr-archive-tip
Jun 12, 2026
Merged

chore(skill): Scope iterate-pr archive check to the stack tip#29
thecodedrift merged 2 commits into
mainfrom
chore/iterate-pr-archive-tip

Conversation

@thecodedrift

Copy link
Copy Markdown
Member

Teach the iterate-pr skill to treat the PR 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.

Copilot AI review requested due to automatic review settings June 12, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .claude/skills/iterate-pr/SKILL.md Outdated
Comment thread .claude/skills/iterate-pr/SKILL.md Outdated
Comment thread .claude/skills/iterate-pr/SKILL.md Outdated
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>
thecodedrift and others added 2 commits June 11, 2026 21:19
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>
@thecodedrift thecodedrift force-pushed the chore/iterate-pr-archive-tip branch from c1845a5 to 52ef35a Compare June 12, 2026 04:19
@thecodedrift thecodedrift merged commit 14d70f9 into main Jun 12, 2026
2 checks passed
@thecodedrift thecodedrift deleted the chore/iterate-pr-archive-tip branch June 12, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants