WooCommerce stale PR audit
When to use
Use this skill when a maintainer wants to review a defined cohort of inactive
pull requests and decide whether each PR should close, remain open, or receive an
owner decision. It covers cohort collection, current-trunk comparison,
representative user testing, action recommendations, and a checklist report.
Run the audit read-only. Closing, commenting, labeling, assigning, pushing, or
merging are separate actions that require explicit authorization.
Inputs required
Collect these before starting:
- GitHub repository as
owner/name.
- Positive whole-number inactivity threshold, such as 60 or 90 days. Use 90 only
when the user does not specify one.
- Exact as-of timestamp used to calculate the cutoff.
- Default branch and authoritative remote.
- Required output location and whether private publication is expected.
- Available local test tooling and safe environment capacity.
Calculate cutoff = asOf - inactivityDays and define cohort membership
explicitly. The bundled collector uses open PRs with updatedAt < cutoff.
Procedure
Read references/workflow.md completely. It defines evidence collection,
current-trunk comparison, runtime-testing rules, bounded parallel work,
checklist persistence, publication, and the mutation boundary.
Read references/audit-schema.md before producing records. Use its field
contract, enums, and consolidation invariants unchanged across workers.
Inspect the checkout with git status --short --branch. Preserve unrelated
work and use isolated worktrees for branch inspection and testing.
Fetch the current default branch and record its full commit SHA.
Freeze the cohort:
python3 scripts/collect_cohort.py \
--repo woocommerce/woocommerce \
--inactive-days 60 \
--as-of 2026-08-25T00:00:00Z \
--output work/cohort-raw.json
Preserve inactivityDays, asOf, cutoffExclusive, ordered PR numbers, and
captured trunk metadata. Do not rewrite membership when PRs later change.
For every PR, recover its intended outcome, inspect linked issues and
discussion, compare the exact change with current trunk and history, assess
compatibility risk, classify Bug versus Enhancement using live repository
labels, and identify a current reviewer or owning team when it should remain
open.
Run a representative user flow when the behavior is runnable. Record setup,
exact code state, fixtures, user steps, expected and observed results,
assertions, teardown, and verified cleanup. Do not call CI, unit tests, source
inspection, or a successful build “user testing.”
Write one audit record per frozen cohort member. Validate it:
python3 scripts/validate_audit.py \
--cohort work/cohort-raw.json \
--audit work/audit.json \
--labels work/repository-labels.json
Immediately before reporting, fetch current state:
node scripts/fetch_live_state.mjs \
--repo woocommerce/woocommerce \
--cohort work/cohort-raw.json \
--output work/cohort-live-state.json
When approval-loss observations matter, fetch authoritative dismissal events:
node scripts/fetch_review_dismissals.mjs \
--repo woocommerce/woocommerce \
--cohort work/cohort-raw.json \
--output work/review-dismissals.json
Produce a private checklist report. Keep initial audit recommendations,
final live GitHub state, and the user's handled state as separate layers.
Preserve handled-state choices and user edits when refreshing the artifact.
Verification
Cohort count, ordered numbers, threshold, as-of timestamp, and cutoff reconcile.
Every cohort PR occurs exactly once in the audit and no extra PR appears.
Current-trunk conclusions cite a fetched SHA and concrete evidence.
All runnable tests identify the tested code state and verify cleanup.
Proposed labels exist in the live repository vocabulary and are not already
present; Bug versus Enhancement is explicit.
Keep-open and owner-decision records name a reviewer or team with a reason.
Recommendation, relevance, priority, complexity, and confidence totals each
equal the frozen cohort size.
All four packaged copies build successfully:
node shared/scripts/skillpack-build.mjs --clean \
--targets=codex,vscode,claude,cursor \
--skills=woocommerce-stale-pr-audit
Failure modes / debugging
- Cohort changed during the audit: retain the original membership and record
the change only in final live state.
- GitHub connection reports more data: paginate it, or mark evidence
incomplete. Never silently treat
first: 100 as complete.
- The old branch does not run: test current trunk as a control and, when
useful, a temporary clean merge or minimal port. Distinguish an obsolete branch
from an unresolved user need.
- No representative flow exists: use
not-runnable-obsolete only with
evidence that the flow or subsystem is gone. Staleness alone is not evidence.
- Counts changed after human review: show initial and final counts with their
timestamps instead of overwriting history.
- Publication cannot be verified: save the artifact locally and report the
access or rendering gap.
Escalation
Ask the maintainer when the cutoff rule, repository scope, linked issue validity,
compatibility impact, product ownership, or acceptable test substitute remains
ambiguous after source and discussion review. Ask before any external mutation or
before increasing local environment concurrency beyond known-safe capacity.
1---2name: woocommerce-stale-pr-audit3description: Audit a fixed cohort of inactive WooCommerce pull requests against current trunk, linked issues, review history, repository labels, and representative user flows, then produce evidence-backed actions and a private checklist report. Use for stale or backlog PR cohort reviews, not ordinary single-PR code review.4---56# WooCommerce stale PR audit78## When to use910Use this skill when a maintainer wants to review a defined cohort of inactive11pull requests and decide whether each PR should close, remain open, or receive an12owner decision. It covers cohort collection, current-trunk comparison,13representative user testing, action recommendations, and a checklist report.1415Run the audit read-only. Closing, commenting, labeling, assigning, pushing, or16merging are separate actions that require explicit authorization.1718## Inputs required1920Collect these before starting:2122- GitHub repository as `owner/name`.23- Positive whole-number inactivity threshold, such as 60 or 90 days. Use 90 only24 when the user does not specify one.25- Exact as-of timestamp used to calculate the cutoff.26- Default branch and authoritative remote.27- Required output location and whether private publication is expected.28- Available local test tooling and safe environment capacity.2930Calculate `cutoff = asOf - inactivityDays` and define cohort membership31explicitly. The bundled collector uses open PRs with `updatedAt < cutoff`.3233## Procedure34351. **Read `references/workflow.md` completely.** It defines evidence collection,36 current-trunk comparison, runtime-testing rules, bounded parallel work,37 checklist persistence, publication, and the mutation boundary.382. **Read `references/audit-schema.md` before producing records.** Use its field39 contract, enums, and consolidation invariants unchanged across workers.403. Inspect the checkout with `git status --short --branch`. Preserve unrelated41 work and use isolated worktrees for branch inspection and testing.424. Fetch the current default branch and record its full commit SHA.435. Freeze the cohort:4445 ```bash46 python3 scripts/collect_cohort.py \47 --repo woocommerce/woocommerce \48 --inactive-days 60 \49 --as-of 2026-08-25T00:00:00Z \50 --output work/cohort-raw.json51 ```5253 Preserve `inactivityDays`, `asOf`, `cutoffExclusive`, ordered PR numbers, and54 captured trunk metadata. Do not rewrite membership when PRs later change.556. For every PR, recover its intended outcome, inspect linked issues and56 discussion, compare the exact change with current trunk and history, assess57 compatibility risk, classify Bug versus Enhancement using live repository58 labels, and identify a current reviewer or owning team when it should remain59 open.607. Run a representative user flow when the behavior is runnable. Record setup,61 exact code state, fixtures, user steps, expected and observed results,62 assertions, teardown, and verified cleanup. Do not call CI, unit tests, source63 inspection, or a successful build “user testing.”648. Write one audit record per frozen cohort member. Validate it:6566 ```bash67 python3 scripts/validate_audit.py \68 --cohort work/cohort-raw.json \69 --audit work/audit.json \70 --labels work/repository-labels.json71 ```72739. Immediately before reporting, fetch current state:7475 ```bash76 node scripts/fetch_live_state.mjs \77 --repo woocommerce/woocommerce \78 --cohort work/cohort-raw.json \79 --output work/cohort-live-state.json80 ```818210. When approval-loss observations matter, fetch authoritative dismissal events:8384 ```bash85 node scripts/fetch_review_dismissals.mjs \86 --repo woocommerce/woocommerce \87 --cohort work/cohort-raw.json \88 --output work/review-dismissals.json89 ```909111. Produce a private checklist report. Keep initial audit recommendations,92 final live GitHub state, and the user's handled state as separate layers.93 Preserve handled-state choices and user edits when refreshing the artifact.9495## Verification9697- Cohort count, ordered numbers, threshold, as-of timestamp, and cutoff reconcile.98- Every cohort PR occurs exactly once in the audit and no extra PR appears.99- Current-trunk conclusions cite a fetched SHA and concrete evidence.100- All runnable tests identify the tested code state and verify cleanup.101- Proposed labels exist in the live repository vocabulary and are not already102 present; Bug versus Enhancement is explicit.103- Keep-open and owner-decision records name a reviewer or team with a reason.104- Recommendation, relevance, priority, complexity, and confidence totals each105 equal the frozen cohort size.106- All four packaged copies build successfully:107108 ```bash109 node shared/scripts/skillpack-build.mjs --clean \110 --targets=codex,vscode,claude,cursor \111 --skills=woocommerce-stale-pr-audit112 ```113114## Failure modes / debugging115116- **Cohort changed during the audit:** retain the original membership and record117 the change only in final live state.118- **GitHub connection reports more data:** paginate it, or mark evidence119 incomplete. Never silently treat `first: 100` as complete.120- **The old branch does not run:** test current trunk as a control and, when121 useful, a temporary clean merge or minimal port. Distinguish an obsolete branch122 from an unresolved user need.123- **No representative flow exists:** use `not-runnable-obsolete` only with124 evidence that the flow or subsystem is gone. Staleness alone is not evidence.125- **Counts changed after human review:** show initial and final counts with their126 timestamps instead of overwriting history.127- **Publication cannot be verified:** save the artifact locally and report the128 access or rendering gap.129130## Escalation131132Ask the maintainer when the cutoff rule, repository scope, linked issue validity,133compatibility impact, product ownership, or acceptable test substitute remains134ambiguous after source and discussion review. Ask before any external mutation or135before increasing local environment concurrency beyond known-safe capacity.