AGENT SKILL

PR 门禁失败修复

pr-driver-protocol

在 PR 上每次 `git push` 之后使用——枚举当前所有门禁失败项,在本地一次性修复全部问题,然后仅推送一次。遵循“推送前全部修复”的不变式。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 6
Forks
0

01 前言 Front Matter

name
pr-driver-protocol
description
Use after every `git push` on a PR — enumerates ALL current gate failures, fixes ALL in one local pass, and pushes once. The fix-all-before-push invariant.

03 SKILL.md 正文

PR driver protocol — fix-all before push

A standalone, callable protocol for any agent (worker, babysit, human) that is driving a PR to green. The single rule: after every push, fix ALL known gate failures in one local pass before the next push. "CI pending" is not an idle state.

When to use this protocol

  • You just pushed a commit and need to wait for CI to come back
  • You see the same gate failure 2+ times in a row (worker or babysit perspective)
  • You are babysitting a worker that appears to be partial-fixing
  • You are tempted to do "one quick fix and re-push" — stop, run this protocol first

The 5-step loop

1. ENUMERATE   — read ALL current gate failures, not just the first
2. CLASSIFY    — group by file + root cause (same root cause = one fix)
3. FIX-ALL     — apply every fix locally; do not push until all are staged
4. VERIFY      — run the local equivalent of each failing gate
5. PUSH        — single commit covering all fixes; then back to step 1

Step 1: ENUMERATE

Do not stop at the first failure. Use /green <PR> or read the failure-class log and build a complete list. For each failure, capture:

  • Gate name (Green Gate, Evidence (draft phase, not /green), inline threads; CodeRabbit and Bugbot are optional advisory reviewers: never a gate or a wait, so not enumerated or verified here)
  • File and line (e.g., packages/cli/src/doctor.ts:142)
  • Failure text (the actual error message, not a paraphrase)
  • Root cause hypothesis (what is wrong, not just what is failing)

Step 2: CLASSIFY

Group failures by the underlying root cause. Two failures with the same root cause are one fix:

F1: dist/index.js argv shape not recognized in non-canonical check   (cli/doctor.ts:142)
F2: worker binary path resolution fails when global npm is used        (cli/doctor.ts:203)
  → Same root cause: argv path normalization is regex-naive
  → ONE fix: switch to path.basename() comparison

Do not push two commits to fix one root cause; that partial-fix-then-push loop is what this protocol stops.

Step 3: FIX-ALL

Apply every fix in one local working tree. Stage selectively — never git add -A. The commit message should describe the bundle, not each individual fix; for example, <repo commit prefix> fix: doctor argv-path handling (resolves gate 1 + 2) with a body listing the changed lines and the added test.

Step 4: VERIFY

Run the local equivalent of each failing gate before pushing:

Gate Local verification
Green Gate (CI) the repository's test command (and the relevant package test)
Evidence Verify only the applicable proof for each changed claim under PR lifecycle and evidence standards.
Inline threads gh api graphql ... isResolved — every thread resolved?

If verification fails, do not push. Go back to step 3 with the new failures added to the list.

Step 5: PUSH

One commit, one push, then immediately back to step 1 (the loop continues). While CI is running, pre-diagnose the next likely failure by reading:

  • The previous run's tail (often the next failure is in the same area)
  • Optional CodeRabbit or Bugbot feedback, when available, may inform diagnosis; it is advisory only and never a gate or a wait

Worked example

Three gate failures arrive together: two share one root cause (a config value), one is separate logic. Partial pushes would cost three CI round-trips. Instead: enumerate all three, classify them into two fixes, apply both in one tree, run the repository's test command for each, and push one commit.

Anti-patterns (will be flagged by the harness)

  • ❌ "Push one fix, wait, push another fix" — this is the failure mode
  • ❌ git add -A to bundle fixes — staging must be selective per file
  • ❌ Reading only the first failure in gh pr checks — always read the full list
  • ❌ "CI pending, I'll wait and see" — CI pending is parallel-fix time, not idle time
  • ❌ Generic ao send "fix CI" from babysit — DRIVER mode requires file:line + specific change
  • ❌ "Let me first rebase, then fix, then push" — rebase is not a fix; do it after the fix-all is staged

Babysit pairing

The babysit skill is archived in this repository, so the observer-side DRIVER-mode pairing is inactive. This protocol stands alone on the worker side.

Origin

  • Bead: bd-snx3

04 同仓库更多 Skills

jleechanorg
jleechanorg/jleechan-skills

disk-reclaim-playbook

Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.

★ 6
jleechanorg
jleechanorg/jleechan-skills

claudea-bench

Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr

Alias for the canonical pr-lifecycle PR workflow skill (/pr-workflow, /prw).

★ 6
jleechanorg
jleechanorg/jleechan-skills

whisper

OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.

★ 6
jleechanorg
jleechanorg/jleechan-skills

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 6
jleechanorg
jleechanorg/jleechan-skills

pr-report

This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, /pr-report, or wants per-PR summary with delta files/lines. Generates a structured report for one or more open PRs covering purpose, files changed, +/− line counts, /code-standards + /thermo review findings, /ponytail simplification opportunities, file-overlap combination candidates, and /green status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.

★ 6