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 change summary plus a PR-ready title and draft description for openai-agents-js.
在完成实质性代码工作后,生成此仓库所需的可提交PR的摘要:包括简洁的变更摘要,以及适用于openai-agents-js的可提交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-standard;git status -sbomits them).--stat - Changed files: (unstaged) and
git diff --name-only(staged); sizes viagit diff --name-only --cachedandgit diff --stat.git diff --stat --cached - 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 (,
packages/,examples/,helpers/), tests (scripts/,packages/**/test), docs (integration-tests/,docs/,README.md,AGENTS.md), build/test config (.github/,package.json,pnpm-lock.yaml,pnpm-workspace.yaml,tsconfig*.json,tsc-multi.json,eslint.config.*).vitest*.ts
- 当前分支:。
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 - 基准参考(使用分支的上游分支,回退到):
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")
- 基准分叉点之后的提交:。
git log --oneline --no-merges ${BASE_COMMIT}..HEAD - 此仓库的分类标识:运行时(,
packages/,examples/,helpers/)、测试(scripts/,packages/**/test)、文档(integration-tests/,docs/,README.md,AGENTS.md)、构建/测试配置(.github/,package.json,pnpm-lock.yaml,pnpm-workspace.yaml,tsconfig*.json,tsc-multi.json,eslint.config.*)。vitest*.ts
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 when runtime code changed.
- 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 , keep it; otherwise propose
main,feat/<slug>, orfix/<slug>based on the primary area (for exampledocs/<slug>).docs/pr-draft-summary-guidance - If the current branch matches (digits only), keep that branch suggestion. When an issue number is present, reference
issue-<number>and include an auto-closing line such ashttps://github.com/openai/openai-agents-js/issues/<number>Do not block if the issue cannot be fetched.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} - 根据“分类标识”中列出的涉及路径推断变更类型;分类为功能新增、修复、重构或有影响的文档变更,当运行时代码变更时标记向后兼容风险。
- 使用关键路径(前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-<number>并添加自动关闭行,例如https://github.com/openai/openai-agents-js/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: or feat: etc., having them is preferred>
<single-line imperative title, which can be a commit message; if a common prefix like chore: or 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 any 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 any tests you ran.>
保持内容紧凑——块周围不要有冗余文字,避免在“变更”和描述之间重复细节。除非特别要求,否则无需列出测试内容。