pr-draft-summary
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePR Draft Summary
PR草稿摘要
Purpose
用途
Produce the PR-ready summary required in this repository after substantive code work is complete: a concise summary plus a PR-ready title and draft description that begins with "This pull request <verb> ...". The block should be ready to paste into a PR for openai-agents-python.
在完成实质性代码工作后,生成此仓库所需的可直接用于PR的摘要:一份简洁的摘要,加上以"This pull request <动词> ..."开头的PR就绪标题和草稿描述。该摘要块可直接粘贴到openai-agents-python的PR中。
When to Trigger
触发时机
- The task for this repo is finished (or ready for review) and it touched runtime code, tests, examples, docs with behavior impact, or build/test configuration.
- You are about to send the "work complete" response and need the PR block included.
- Skip only for trivial or conversation-only tasks where no PR-style summary is expected.
- 本仓库的任务已完成(或准备好审核),且涉及运行时代码、测试、示例、影响行为的文档或构建/测试配置的修改。
- 您即将发送“工作完成”的回复,且需要包含PR摘要块。
- 仅在无PR风格摘要需求的琐碎任务或仅对话类任务中跳过此步骤。
Inputs to Collect Automatically (do not ask the user)
自动收集的输入(无需询问用户)
- Current branch: .
git rev-parse --abbrev-ref HEAD - Working tree: .
git status -sb - Untracked files: (use with
git ls-files --others --exclude-standardto ensure they are surfaced;git status -sbdoes not include them).--stat - Changed files: (unstaged) and
git diff --name-only(staged); sizes viagit diff --name-only --cachedandgit diff --stat.git diff --stat --cached - Latest release tag (prefer remote-aware lookup): .
LATEST_RELEASE_TAG=$(.agents/skills/final-release-review/scripts/find_latest_release_tag.sh origin 'v*' 2>/dev/null || git tag -l 'v*' --sort=-v:refname | head -n1) - Base reference (use the branch's upstream, fallback to ):
origin/main- .
BASE_REF=$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || echo origin/main) - .
BASE_COMMIT=$(git merge-base --fork-point "$BASE_REF" HEAD || git merge-base "$BASE_REF" HEAD || echo "$BASE_REF")
- Commits ahead of the base fork point: .
git log --oneline --no-merges ${BASE_COMMIT}..HEAD - Category signals for this repo: runtime (), tests (
src/agents/), examples (tests/), docs (examples/,docs/), build/test config (mkdocs.yml,pyproject.toml,uv.lock,Makefile)..github/
- 当前分支:
git rev-parse --abbrev-ref HEAD - 工作树状态:
git status -sb - 未跟踪文件:(结合
git ls-files --others --exclude-standard确保显示这些文件;git status -sb不包含此类文件)--stat - 已变更文件:(未暂存)和
git diff --name-only(已暂存);变更大小通过git diff --name-only --cached和git diff --stat获取git diff --stat --cached - 最新发布标签(优先使用远程查询):
LATEST_RELEASE_TAG=$(.agents/skills/final-release-review/scripts/find_latest_release_tag.sh origin 'v*' 2>/dev/null || git tag -l 'v*' --sort=-v:refname | head -n1) - 基准参考(使用分支的上游分支,回退为):
origin/mainBASE_REF=$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || echo origin/main)BASE_COMMIT=$(git merge-base --fork-point "$BASE_REF" HEAD || git merge-base "$BASE_REF" HEAD || echo "$BASE_REF")
- 基准分叉点之后的提交:
git log --oneline --no-merges ${BASE_COMMIT}..HEAD - 本仓库的分类标识:运行时()、测试(
src/agents/)、示例(tests/)、文档(examples/、docs/)、构建/测试配置(mkdocs.yml、pyproject.toml、uv.lock、Makefile).github/
Workflow
工作流程
- Run the commands above without asking the user; compute /
BASE_REFfirst so later commands reuse them.BASE_COMMIT - If there are no staged/unstaged/untracked changes and no commits ahead of , reply briefly that no code changes were detected and skip emitting the PR block.
${BASE_COMMIT} - Infer change type from the touched paths listed under "Category signals"; classify as feature, fix, refactor, or docs-with-impact, and flag backward-compatibility risk only when the diff changes released public APIs, external config, persisted data, serialized state, or wire protocols. Judge that risk against , not unreleased branch-only churn.
LATEST_RELEASE_TAG - Summarize changes in 1–3 short sentences using the key paths (top 5) and output; explicitly call out untracked files from
git diff --stat/git status -sbbecausegit ls-files --others --exclude-standarddoes not include them. If the working tree is clean but there are commits ahead of--stat, summarize using those commit messages.${BASE_COMMIT} - Choose the lead verb for the description: feature → , bug fix →
adds, refactor/perf →fixesorimproves, docs-only →updates.updates - Suggest a branch name. If already off main, keep it; otherwise propose ,
feat/<slug>, orfix/<slug>based on the primary area (e.g.,docs/<slug>).docs/pr-draft-summary-guidance - If the current branch matches (digits only), keep that branch suggestion. Optionally pull light issue context (for example via the GitHub API) when available, but do not block or retry if it is not. When an issue number is present, reference
issue-<number>and include an auto-closing line such ashttps://github.com/openai/openai-agents-python/issues/<number>.This pull request resolves #<number>. - Draft the PR title and description using the template below.
- Output only the block in "Output Format". Keep any surrounding status note minimal and in English.
- 无需询问用户,直接运行上述命令;先计算/
BASE_REF,以便后续命令复用。BASE_COMMIT - 如果没有暂存/未暂存/未跟踪的变更,且没有领先于的提交,则简要回复未检测到代码变更,跳过生成PR摘要块。
${BASE_COMMIT} - 根据“分类标识”中列出的涉及路径推断变更类型;分为功能新增、修复、重构或影响性文档变更,仅当diff修改了已发布的公开API、外部配置、持久化数据、序列化状态或通信协议时,才标记向后兼容性风险。需基于判断该风险,而非未发布的分支内部变更。
LATEST_RELEASE_TAG - 使用关键路径(前5个)和输出,用1-3个短句总结变更;明确列出
git diff --stat/git status -sb中的未跟踪文件,因为git ls-files --others --exclude-standard不包含这些文件。如果工作树干净但存在领先于--stat的提交,则使用这些提交信息进行总结。${BASE_COMMIT} - 为描述选择主导动词:功能新增→, bug修复→
adds,重构/性能优化→fixes或improves,仅文档变更→updates。updates - 建议分支名称。如果当前分支已基于main分支,则保留;否则根据主要变更领域提议、
feat/<slug>或fix/<slug>(例如docs/<slug>)。docs/pr-draft-summary-guidance - 如果当前分支符合格式(仅数字),则保留该分支建议。若可用,可选择性获取简单的issue上下文(例如通过GitHub API),但不可因获取失败而阻塞或重试。当存在issue编号时,引用
issue-<number>并添加自动关闭行,例如https://github.com/openai/openai-agents-python/issues/<number>。This pull request resolves #<number>. - 使用以下模板草拟PR标题和描述。
- 仅输出“输出格式”中的摘要块。保持周围的状态说明简洁且为英文。
Output Format
输出格式
When closing out a task and the summary block is desired, add this concise Markdown block (English only) after any brief status note. If the user says they do not want it, skip this section.
undefined当完成任务且需要摘要块时,在简短的状态说明后添加此简洁的Markdown块(仅英文)。如果用户表示不需要,则跳过此部分。
undefinedPull Request Draft
Pull Request Draft
Branch name suggestion
Branch name suggestion
git checkout -b <kebab-case suggestion, e.g., feat/pr-draft-summary-skill>
git checkout -b <kebab-case suggestion, e.g., feat/pr-draft-summary-skill>
Title
Title
<single-line imperative title, which can be a commit message; if a common prefix like chore: and feat: etc., having them is preferred>
<single-line imperative title, which can be a commit message; if a common prefix like chore: and feat: etc., having them is preferred>
Description
Description
<include what you changed plus a draft pull request title and description for your local changes; start the description with prose such as "This pull request resolves/updates/adds ..." using a verb that matches the change (you can use bullets later), explain the change background (for bugs, clearly describe the bug, symptoms, or repro; for features, what is needed and why), any behavior changes or considerations to be aware of, and you do not need to mention tests you ran.>
Keep it tight—no redundant prose around the block, and avoid repeating details between `Changes` and the description. Tests do not need to be listed unless specifically requested.<include what you changed plus a draft pull request title and description for your local changes; start the description with prose such as "This pull request resolves/updates/adds ..." using a verb that matches the change (you can use bullets later), explain the change background (for bugs, clearly describe the bug, symptoms, or repro; for features, what is needed and why), any behavior changes or considerations to be aware of, and you do not need to mention tests you ran.>
保持内容紧凑——摘要块周围无冗余文字,避免在“变更”和描述之间重复细节。除非特别要求,否则无需列出运行的测试。