direct-send

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Direct Send

Direct Send

Do the same unattended work as
full-send
, but push the change straight to origin's default branch instead of filing a PR. The user is not watching this thread, so your updates and final message go unread until long after you stop.
Read full-send and follow its Testing permission, Proof, and Asking the user sections. Its PR steps (file, babysit, merge gate, merge) do not apply. The rules below take precedence.
The user grants you permission to:
  • Push this task's commits to origin's default branch as a fast-forward.
  • Use the test methods that Proof needs, without asking first.
执行与
full-send
相同的无人值守工作,但将变更直接推送到 origin 的默认分支,而不是创建 PR。用户不会关注此线程,因此你的更新和最终消息会长时间无人查看,甚至在你停止之后才会被读取。
阅读 full-send,并遵循其中的 Testing permission、Proof 和 Asking the user 章节。其 PR 步骤(file、babysit、merge gate、merge)不适用。以下规则优先。
用户授予你以下权限:
  • 将本任务的 commits 以 fast-forward 方式 Push 到 origin 的默认分支。
  • 无需事先询问,即可使用 Proof 所需的测试方法。

Steps

Steps

  1. Find the default branch. Fetch origin and read its default branch (
    git symbolic-ref refs/remotes/origin/HEAD
    , or
    gh repo view --json defaultBranchRef
    ). It may be
    main
    ,
    master
    , or something else.
  2. Finish the change. Complete the goal from the user's request with the smallest change that works. Work on the local default branch, or on a branch when the checkout holds unrelated work, you are in a worktree, or a branch keeps things cleaner.
  3. Prove it. Get proof for every change you made.
  4. Get feedback. Use the
    review-loop
    skill to verify changes. Re-prove any behavior a fix touches.
  5. Commit with the
    committing-with-guidelines
    skill. Commit only this task's changes; leave unrelated uncommitted work where you found it.
  6. Rebase onto the latest
    origin/<default>
    . If upstream moved, re-run the repo's CI checks on the rebased commit, and re-prove behavior a conflict fix touched.
  7. Push when the push gate passes:
    git push origin HEAD:<default>
    . If the push is rejected as non-fast-forward, return to step 6 and push again.
  8. Check CI. If the repo runs CI on pushes to the default branch, wait for the run on your commit (
    gh run watch <id> --exit-status
    ). When your change breaks it, fix forward with a new commit through steps 3 to 7.
  9. Report in your final message: the default branch, each pushed commit SHA, your proof, the CI result, and each decision you made for the user.
Stay active from step 1 to step 9. Ending your turn while CI is pending stops the work, because nobody will prompt you again.
  1. 确定默认分支。 Fetch origin 并读取其默认分支(
    git symbolic-ref refs/remotes/origin/HEAD
    ,或
    gh repo view --json defaultBranchRef
    )。它可能是
    main
    、
    master
    或其他名称。
  2. 完成变更。 根据用户请求,以能够正常工作的最小改动完成目标。在本地默认分支上工作;如果当前 checkout 包含无关工作、你处于 worktree 中,或使用分支能让工作更清晰,则在分支上工作。
  3. 进行 Proof。 为所做的每项变更获取 Proof。
  4. 获取反馈。 使用
    review-loop
    skill 验证变更。对修复所触及的任何行为重新进行 Proof。
  5. Commit。 使用
    committing-with-guidelines
    skill 进行 Commit。仅提交本任务的变更;保持发现时已有的无关未提交工作不变。
  6. Rebase。 Rebase 到最新的
    origin/<default>
    。如果上游已有变动,请在 rebase 后的 commit 上重新运行仓库的 CI checks,并重新对冲突修复所触及的行为进行 Proof。
  7. Push。 通过 push gate 后执行:
    git push origin HEAD:<default>
    。如果 Push 因 non-fast-forward 被拒绝,则返回步骤 6 并再次 Push。
  8. 检查 CI。 如果仓库会在推送到默认分支时运行 CI,请等待该 commit 对应的任务完成(
    gh run watch <id> --exit-status
    )。如果变更导致 CI 失败,则通过步骤 3 至 7 使用新的 commit 向前修复。
  9. 汇报。 在最终消息中说明:默认分支、每个已 Push 的 commit SHA、你的 Proof、CI 结果,以及你替用户做出的每项决定。
从步骤 1 到步骤 9 保持工作。如果 CI 仍在等待时结束 turn,整个工作就会中止,因为不会有人再次提示你。

Push gate

Push gate

Push only when all of these are true on the rebased commit:
  • Your proof covers every change in
    git diff origin/<default>..HEAD
    .
  • review-loop
    ended in agreement.
  • The repo's CI checks pass locally.
  • The commits hold only this task's changes.
  • The push is a fast-forward of
    origin/<default>
    .
Pushed history is shared: fix it forward with new commits. Never force-push the default branch, rewrite commits already on origin, or bypass branch protection. If origin rejects direct pushes (protected branch, required PR), ask the user, and offer
full-send
as the recommended option.
仅当 rebase 后的 commit 满足以下所有条件时才能 Push:
  • 你的 Proof 覆盖了
    git diff origin/<default>..HEAD
    中的每项变更。
  • review-loop
    最终达成一致。
  • 仓库的 CI checks 在本地通过。
  • commits 仅包含本任务的变更。
  • Push 是对
    origin/<default>
    的 fast-forward。
已 Push 的历史是共享的:应使用新的 commits 向前修复。绝不能 force-push 默认分支、重写 origin 上已有的 commits,或绕过 branch protection。如果 origin 拒绝直接 Push(受保护分支、必须提供 PR),则询问用户,并推荐使用
full-send
。

Asking the user

Asking the user

Follow full-send's rules with these swaps: give the default branch and your local commits in place of a PR link, treat "the push gate cannot pass" as the merge gate case, and when no answer comes, leave the commits unpushed and start your final message with the question.
遵循 full-send 的规则,但进行以下替换:用默认分支和本地 commits 代替 PR link;将“push gate 无法通过”视为 merge gate 的情况;如果没有收到回应,则不 Push commits,并以问题作为最终消息的开头。