wave-audit
Audit open issues against merged PRs — find and close orphaned issues with proper comments
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- args
- Phase number, Wave number
- name
- wave-audit
- description
- Audit open issues against merged PRs — find and close orphaned issues with proper comments
03 SKILL.md 正文
Audit open issues for a wave and close any that were resolved but not auto-closed.
Instructions
1. List merged PRs for the wave
gh pr list --state merged --base "deployments/phase-{N}/wave-{M}" --json number,title,body,headRefName
2. Extract issue references from PRs
For each merged PR, parse the body for:
Closes #NFixes #NResolves #N
Build a map: {issue_number → [PR_number, PR_title]}.
3. List open issues for the wave
The canonical wave label is the phase-agnostic wave-{X} (#810); legacy
p{N}-wave-{M} labels are grandfathered. Query BOTH and union (gh ANDs
multiple --label flags, so run them separately):
gh issue list --state open --label "wave-{X}" --json number,title,labels
gh issue list --state open --label "p{N}-wave-{M}" --json number,title,labels # grandfathered
4. Identify orphans
An orphan is an open issue that:
- Is labeled with the wave label (
wave-{X}or grandfatheredp{N}-wave-{M}) - Was referenced by a merged PR's
Closes/Fixes/Resolvesbut was not auto-closed
Cross-reference the two lists. Also check for issues that may have been implemented but the PR forgot to include the Closes reference — match by branch name pattern:
{FirstInitial}.{LastName}/{ISSUE_NUMBER}-*
5. Report findings to user
Present a table before taking action:
**Wave Audit: Phase {N} Wave {M}**
| Issue | Title | Status | Implementing PR | Action |
|-------|-------|--------|-----------------|--------|
| #123 | ... | Open | PR #456 | Close |
| #789 | ... | Open | (none found) | Keep |
**Orphans found:** {count}
**Issues with no implementing PR:** {count}
Do NOT close any issues until the user confirms. Present the list and wait for approval.
6. Close confirmed orphans
For each confirmed orphan, close with a comment:
gh issue close {NUMBER} --comment "$(cat <<'EOF'
Closed by wave audit. This issue was resolved by PR #{PR_NUMBER} ({PR_TITLE}) which merged to `deployments/phase-{N}/wave-{M}`.
Added label: `fixed-in-phase{N}-wave-{M}`
EOF
)"
Add the fixed-in-phase{N}-wave-{M} label:
gh issue edit {NUMBER} --add-label "fixed-in-phase{N}-wave-{M}"
7. Report summary
**Audit complete:**
- Issues closed: {count}
- Issues remaining open: {count} (no implementing PR found)
- Issues already closed: {count} (correctly auto-closed)
What remains manual
- User must approve all closures before they execute
- Issues with no implementing PR require manual triage (defer, reassign, or close as won't-fix)
- The skill does not verify that the PR actually implemented the issue — it relies on
Closes #Nreferences and branch naming conventions
04 同仓库更多 Skills
wave-wrapup
Finalize a wave — PR review, merge sequencing, issue cleanup, worktree cleanup, and handoff to retro
wave-start
Initialize a new wave — worktree cleanup, branch creation, label setup, status file update
wave-scope
Reconcile declared-vs-labeled wave scope between /wave-retro and /wave-kickoff — collect dispositions, fold in retro carry-forwards and memory must-includes, and refresh the meta-issue
wave-retro
Automated wave retrospective — PR analysis, assessments, trust matrix updates, feedback log, charter change proposals
wave-kickoff
Automated wave planning — branch creation, label management, issue labeling, kickoff comments, and execution plan
watch-deploy
Monitor (and, within bounds, remediate) a deploy triggered by a merge — staging automatically post-merge, production only after the owner approves the queued deploy. Polls the deploy run to a terminal state, classifies failures, attempts bounded fix-forward, and escalates with a precise diagnosis.