pr-feedback-quality-gate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PR Feedback Quality Gate

PR反馈质量门

Use this when a PR has review feedback, merge conflicts, pending checks, or needs a monitored follow-up after a fix.
当PR存在评审反馈、合并冲突、待处理检查,或修复后需要监控跟进时使用本流程。

Workflow

工作流程

  1. Inspect PR state first: comments, reviews, mergeability, checks, branch, and local worktree status. Keep unrelated local changes out of the PR.
  2. Use an isolated worktree for review fixes or conflict resolution when the main checkout is dirty, behind remote, or being used by another agent.
  3. Make the smallest safe fix. Preserve the original bug invariant and any newer upstream structure introduced by
    main
    .
  4. Run the narrow validation first, then the repository-required gates. For this repo, include
    pnpm guard
    ; add package typechecks/builds/tests when touched files require them.
  5. Before commit or push, run a read-only cross-review of the staged or proposed diff. Forbid file edits and git write or coordination commands.
  6. Treat cross-review as evidence, not authority. Accept only findings grounded in the diff, repository rules, user goal, or validation results. Downgrade or reject style preferences, broad scope expansion, and suggestions that conflict with safety or ownership boundaries; record the reason briefly.
  7. If accepted blockers remain, fix them, rerun validation, and repeat the review. Commit and push only after validation passes and there are no accepted blockers.
  1. 首先检查PR状态:评论、评审结果、可合并性、检查项、分支以及本地工作区状态。确保PR中不包含无关的本地更改。
  2. 当主检出目录存在未提交更改、落后于远程分支或正被其他Agent使用时,使用独立工作区来处理评审修复或冲突解决。
  3. 做出最小且安全的修复。保留原始问题的不变性,以及
    main
    分支引入的任何新上游结构。
  4. 先进行窄范围验证,再执行仓库要求的管控检查。针对本仓库,需包含
    pnpm guard
    ;当修改的文件需要时,添加包类型检查/构建/测试。
  5. 在提交或推送前,对暂存或拟推送的差异进行只读交叉评审。禁止文件编辑以及Git写入或协作命令。
  6. 将交叉评审视为参考依据而非权威结论。仅接受基于差异内容、仓库规则、用户目标或验证结果的发现。降低或拒绝风格偏好、大范围功能扩展以及与安全或权限边界冲突的建议;简要记录原因。
  7. 若仍存在需处理的阻塞问题,修复后重新运行验证并重复评审。仅在验证通过且无待处理阻塞问题后再提交并推送。

Monitoring cadence

监控频率

  • Active review or failing checks: check often enough to unblock quickly.
  • Clean or approved PR waiting for merge: check about every 12 hours.
  • Merged PR: reduce to daily lightweight observation for CI, release, or regression signals, and stop making code changes unless asked.
  • 活跃评审或检查失败:频繁检查,以快速解除阻塞。
  • 状态正常或已获批准等待合并的PR:约每12小时检查一次。
  • 已合并的PR:减少为每日轻量观察,关注CI、发布或回归信号,除非收到要求否则不再进行代码更改。

Report

报告

Always report PR state, actions taken, cross-review verdict, accepted or rejected findings, validation run, commits pushed, skipped checks with reasons, remaining risks, and next step.
需始终报告PR状态、已执行操作、交叉评审结论、已接受或拒绝的发现、已运行的验证、已推送的提交、跳过检查的原因、剩余风险以及下一步计划。