prs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill: GitHub PR & Git Management
Skill: GitHub PR & Git Management
Goal
目标
Standardize how the Gemini CLI Bot stages its changes, generates Pull Request
descriptions, and manages the lifecycle of both new and existing PRs.
规范Gemini CLI Bot的变更暂存方式、Pull Request(PR)描述生成流程,以及新PR和已有PR的生命周期管理。
Staging & Patch Preparation (MANDATORY)
暂存与补丁准备(强制要求)
If you are proposing fixes and PR creation is enabled (per the System Directive):
- Surgical Changes: Only propose a single improvement or fix per PR.
- No Bundling: You are STRICTLY FORBIDDEN from bundling unrelated changes. Changes are unrelated if they address different root causes.
- Examples: Do not combine a script fix with a documentation update, an unrelated refactor, or a metrics script update. Metrics and fixes MUST be in separate PRs.
- Generate PR Description: Use the tool to create
write_file.pr-description.md- Title: The very first line MUST be a concise, conventional title.
- Body: The rest should be the markdown body explaining the change, why it is recommended, and the expected impact.
- Stage Fixes: You MUST explicitly stage your fixes using the
command.
git add <files> - Internal File Protection (CRITICAL): You are STRICTLY FORBIDDEN from
staging internal bot management files. If they are accidentally staged, you
MUST unstage them using .
git reset <file>- NEVER STAGE: ,
pr-description.md,lessons-learned.md,branch-name.txt,pr-comment.md,pr-number.txt, or anything inissue-comment.md.history/
- NEVER STAGE:
如果您计划提交修复且PR创建功能已启用(遵循系统指令):
- 精准变更:每个PR仅提交一项改进或修复。
- 禁止捆绑:严格禁止将无关变更捆绑在一起。若变更针对不同根本原因,则视为无关。
- 示例:请勿将脚本修复与文档更新、无关重构或指标脚本更新合并。指标调整与修复必须分属不同PR。
- 生成PR描述:使用工具创建
write_file文件。pr-description.md- 标题:第一行必须是简洁的符合规范的标题。
- 正文:其余部分为Markdown格式的正文,说明变更内容、推荐原因以及预期影响。
- 暂存修复内容:必须使用命令明确暂存您的修复内容。
git add <files> - 内部文件保护(关键要求):严格禁止暂存机器人内部管理文件。若意外暂存,必须使用命令取消暂存。
git reset <file>- 绝对禁止暂存:、
pr-description.md、lessons-learned.md、branch-name.txt、pr-comment.md、pr-number.txt,以及issue-comment.md目录下的所有文件。history/
- 绝对禁止暂存:
Unblocking & PR Updates (Recovery)
解除阻塞与PR更新(恢复操作)
If you are continuing work on an existing Task or responding to a comment on an
existing bot PR:
- Target Existing Branch: Use to generate
write_filecontaining the current branch name (e.g.,branch-name.txt).bot/task-BT-01 - Track PR ID: Use to generate
write_filecontaining the numeric PR ID.pr-number.txt - Respond to Maintainers:
- For general responses, write your markdown comment to .
issue-comment.md - For specific PR feedback, write your markdown response to .
pr-comment.md
- For general responses, write your markdown comment to
- Handle CI Failures: Diagnose failing checks using . Your priority must be generating a new patch and staging it with
gh run viewto fix the failure.git add
如果您正在继续处理现有任务或回复已有机器人PR的评论:
- 定位现有分支:使用工具生成包含当前分支名称的
write_file文件(例如:branch-name.txt)。bot/task-BT-01 - 跟踪PR编号:使用工具生成包含PR数字编号的
write_file文件。pr-number.txt - 回复维护者:
- 对于一般性回复,将Markdown格式的评论写入。
issue-comment.md - 针对特定PR反馈,将Markdown格式的回复写入。
pr-comment.md
- 对于一般性回复,将Markdown格式的评论写入
- 处理CI失败:使用诊断失败的检查任务。您的首要任务是生成新补丁并使用
gh run view暂存以修复失败问题。git add