yeet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Yeet

Yeet

Push the current work, open a draft PR, and work through the user's comments until they are satisfied. When the user marks the PR ready for review, switch to explaining feedback and recommending what to address.
将当前工作 push,创建一个 draft PR,并处理用户的评论,直到用户满意。当用户将 PR 标记为 ready for review 时,改为向用户解释反馈,并建议应处理哪些内容。

Prepare the change

准备变更

Inspect the branch, base, diff, and worktree. Include only work in scope and preserve unrelated changes. Use a feature branch when needed. Never force-push a shared default branch.
Run checks appropriate to the change and resolve failures it introduced. If GitHub access is missing, finish local preparation and report the specific access needed.
Use Conventional Commits with an imperative subject,
type(scope): summary
, without a trailing period. Follow configured commit signing, including when rewriting commits. Do not silently fall back to unsigned commits when signing fails.
After the subject, use Linux-style git trailers only. Add
Assisted-by: Vendor:model
for models known to have contributed; do not invent model identities. Preserve authorship and existing trailers when amending.
检查 branch、base、diff 和 worktree。仅纳入本次范围内的改动,并保留无关变更。必要时使用 feature branch。绝不 force-push 共享的 default branch。
运行适合本次变更的 checks,并解决由本次变更引入的 failures。如果缺少 GitHub access,则完成本地准备,并说明需要具备哪些具体权限。
使用 Conventional Commits,subject 采用祈使式,格式为
type(scope): summary
,末尾不要加句号。遵循已配置的 commit signing,包括重写 commit 时也应如此。如果 signing 失败,不要悄悄退回到 unsigned commits。
在 subject 之后,仅使用 Linux-style git trailers。对于已知参与贡献的模型,添加
Assisted-by: Vendor:model
;不要虚构模型身份。Amend commits 时,应保留 authorship 和已有的 trailers。

Open the draft

创建 Draft

Find the branch's existing PR before creating one. Open new PRs in draft and preserve an existing PR's status. The user decides when to mark it ready. Follow an explicit request for a different status.
Match the title to the main commit subject. Explain the problem and resulting behavior in a short body. Include material testing limits, without a checklist or boilerplate sections. Keep the description current when the scope changes.
Tell the user the draft is open and ready for their comments. Include the link and current check status, then begin watching for feedback. This notification does not mark the PR ready on GitHub.
创建新 PR 前,先查找该 branch 现有的 PR。新 PR 应以 draft 状态创建,并保留现有 PR 的状态。由用户决定何时将其标记为 ready。如果用户明确要求使用其他状态,则遵从该要求。
让 PR title 与主要 commit 的 subject 保持一致。在简短的 body 中说明问题及其产生的行为。包含重要的测试限制,但不要添加 checklist 或 boilerplate sections。变更范围发生变化时,及时更新 description。
告知用户 draft 已创建,可以开始评论。提供 PR link 和当前 checks 状态,然后开始监听反馈。此通知不会在 GitHub 上将 PR 标记为 ready。

While the PR is a draft

PR 处于 Draft 状态时

Identify the requesting user's review account from established context. If it is unknown, ask for the account while completing the draft. Do not assume the PR author, authenticated account, or any collaborator is that person. Accept feedback from another review tool only when its source is attributable to the user.
Watch PR conversation comments, submitted reviews, and inline threads, including replies and edits. Act on the user's feedback within the task's scope without asking them to repeat it in chat. Explain comments from other people or bots and recommend whether to address them; wait for the user's direction before acting on those comments.
Read the full thread and inspect the code before changing it. Fix the issue, run affected checks, and push the change. Resolve a thread only after verifying that the pushed change addresses it. Leave questions, disputed findings, and blocked work unresolved and explain what needs the user's judgment. Do not post separate replies unless asked.
Tell the user what changed and keep watching for their next comments. Repeat until they mark the PR ready, close it, or ask you to stop.
根据已有上下文确定请求方的 review account。如果无法确定,则在继续完成 draft 的同时询问该账户。不要假定 PR author、当前认证账户或任何 collaborator 就是请求方。只有当反馈来源可以明确归属于用户时,才接受来自其他 review 工具的反馈。
监听 PR 对话中的 comments、已提交的 reviews 和 inline threads,包括回复和编辑。在任务范围内处理用户的反馈,无需用户在 chat 中重复说明。解释其他人或 bots 留下的 comments,并建议是否应处理;执行这些 comments 之前,先等待用户指示。
修改代码前,应阅读完整的 thread 并检查相关代码。修复问题,运行受影响的 checks,然后 push 变更。只有在确认已 push 的变更解决了问题后,才能 resolve thread。对于问题尚不明确、存在争议的结论或受阻的工作,不要 resolve thread,并说明需要用户判断的内容。除非用户要求,不要单独发布回复。
告知用户做了哪些修改,并继续监听他们的后续评论。重复此过程,直到用户将 PR 标记为 ready、关闭 PR 或要求停止。

Once the PR is ready for review

PR 变为 Ready for Review 后

Explain new feedback to the user in plain language. State what the reviewer means, whether the code supports the finding, and whether you recommend fixing it now, deferring it, or leaving the code as it is.
Wait for the user's decision before editing, pushing a review fix, replying, or resolving a thread. This applies to all reviewers, including the requesting user. Follow an explicit instruction to handle a particular finding, then verify and report the result.
用通俗的语言向用户解释新的反馈。说明 reviewer 的意思、代码是否支持该 finding,以及建议立即修复、推迟处理,还是保持代码不变。
在编辑代码、push review fix、回复评论或 resolve thread 之前,等待用户决定。此规则适用于所有 reviewers,包括请求方。遵循用户针对特定 finding 的明确指示,然后验证并报告处理结果。

Keep the loop accurate

保持循环准确

Inspect the host's available PR event subscriptions, listeners, and wake tools first. Use an existing subscription or register one for this PR through the supported mechanism, then confirm it is active. Prefer event delivery to a polling loop. Subscribe to comments, reviews, and PR state changes where supported; fetch the current PR and thread when an event arrives.
Poll only for events the host cannot deliver, with bounded waits while the session runs. Track the PR, comment IDs and edits, and the last processed state so reconnecting does not repeat completed work. Fetch feedback received while you were fixing the previous batch.
Recheck the PR's draft status before starting a fix and before pushing or resolving threads. If it became ready, pause pending review changes and present them for the user's decision. If it returns to draft, resume the draft workflow. Stop on merge or closure, or when the user asks.
Report CI failures. Fix failures caused by your draft changes and recheck the final commit. After the PR is ready, explain failures and recommend a fix before proceeding unless the user already authorized that work.
Check the available tools and subscription status before declaring automatic listening unavailable. If neither event delivery nor continued polling is possible, explain the specific limitation and how to resume. Report a listener as active only after confirming it. On an access failure, preserve your place and report the blocker instead of silently abandoning the loop.
Marking a PR ready does not authorize merging it. Merge only when explicitly authorized and the repository's requirements are satisfied.
先检查 host 可用的 PR event subscriptions、listeners 和 wake tools。使用现有 subscription,或通过受支持的机制为此 PR 注册 subscription,然后确认它已处于 active 状态。优先使用 event delivery,而不是 polling loop。在支持的情况下,订阅 comments、reviews 和 PR state changes;event 到达时,获取当前 PR 和 thread。
仅对 host 无法传递的 events 进行 polling,并在 session 运行期间使用有界等待。跟踪 PR、comment IDs、edits 和最后处理的状态,以便重连时不会重复已完成的工作。处理上一批反馈期间,读取新收到的反馈。
开始修复前,以及 push 或 resolve threads 前,重新检查 PR 的 draft 状态。如果 PR 已变为 ready,则暂停待处理的 review 变更,并将这些变更提交给用户决定。如果 PR 回到 draft 状态,则恢复 draft workflow。PR 被 merge、close,或用户要求停止时,结束循环。
报告 CI failures。修复由 draft 变更引起的 failures,并重新检查最终 commit。PR 变为 ready 后,应先解释 failures 并建议修复方案,再继续处理,除非用户已提前授权这些工作。
在声明无法自动监听之前,检查可用的 tools 和 subscription status。如果既无法使用 event delivery,也无法继续 polling,请说明具体限制以及如何恢复。只有在确认 listener 处于 active 状态后,才能将其报告为 active。遇到 access failure 时,应保留当前进度并报告阻塞原因,不要悄然放弃循环。
将 PR 标记为 ready 并不代表授权 merge。只有在用户明确授权且满足 repository 的要求时,才能执行 merge。