ds-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpen one real PR whose title and description a busy reviewer can read in ten seconds.
创建一个真实的 PR,让忙碌的审阅者能在十秒内读完其标题和描述。
Steps
步骤
- Check if a PR already exists for this branch (). If it does, update it.
gh pr list --head <branch> - Diff the branch against its base, usually . Confirm the diff matches the goal and holds nothing unrelated.
origin/main - Read the titles of a few recently merged PRs and copy their format.
- Write a title that says what changed for the user and why it matters, not which function moved. Example: "Cut websocket frames by 70% with compression" beats "Negotiate permessage-deflate".
- Write the description in this order:
- The problem, in one or two plain sentences taken from the user's request.
- The fix, in one or two sentences.
- One line on how it was proven, if you have proof.
- A closing line: Use the model name the harness reports. If it reports none, name only the harness.
Created with <model> in <harness>.
- Scan the title, body and any attachments for secrets, tokens, private paths and personal data. Remove them.
- Create the PR as ready for review, not a draft, so review bots run.
- Print the PR URL that GitHub returned.
- 检查当前分支是否已有 PR()。如果已有,则更新它。
gh pr list --head <branch> - 将分支与其目标分支进行 diff 比较,通常目标分支为 。确认 diff 符合本次目标,且不包含任何无关改动。
origin/main - 阅读近期已合并 PR 的标题,并仿照其格式。
- 标题应说明用户端发生了什么变化以及为什么重要,而不是说明哪个函数被移动。例如,“通过压缩将 WebSocket 帧减少 70%”优于“协商 permessage-deflate”。
- 按以下顺序编写描述:
- 用一两句通俗的话说明问题,内容取自用户请求。
- 用一两句话说明修复方案。
- 如果有证据,用一行说明验证方式。
- 最后一行写为:使用 harness 报告的 model 名称;如果没有报告 model,则仅写 harness 名称。
Created with <model> in <harness>.
- 扫描标题、正文和所有附件,检查是否包含 secrets、tokens、私有路径或个人数据,并将其移除。
- 将 PR 创建为可供审查(ready for review)状态,而不是草稿状态,以便审查 bots 正常运行。
- 输出 GitHub 返回的 PR URL。
Stop when
停止条件
- GitHub returned a PR URL. Hand off to if the user asked for watching.
ds-watch-pr - fails twice. If the error is a GraphQL rate limit, retry once through REST:
gh pr create. If that fails too, report the error.gh api repos/<owner>/<repo>/pulls -f title=... -f head=... -f base=... -F body=@body.md
- GitHub 已返回 PR URL。如果用户要求持续关注,则移交给 。
ds-watch-pr - 连续两次失败。如果错误是 GraphQL 速率限制,则通过 REST 重试一次:
gh pr create。如果仍然失败,则报告错误。gh api repos/<owner>/<repo>/pulls -f title=... -f head=... -f base=... -F body=@body.md
Rules
规则
- No file-by-file change lists in the description.
- Do not post follow-up comments unless the request needs one. Use when it does.
ds-pr-comments - Never guess a model name.
- 描述中不要逐文件列出改动。
- 除非请求确实需要,否则不要发布后续评论;需要时使用 。
ds-pr-comments - 绝不要猜测 model 名称。