delegate-frontier
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDelegate the frontier to Copilot
将前沿工单委派给 Copilot
Turn the frontier — the tickets whose blockers are all closed — into draft PRs with correct titles and bodies, then hand each to GitHub Copilot. Copilot writes wrong PR titles and bodies when it opens the PR itself; here you own the PR and Copilot only writes the code.
Frontier tickets are mutually unblocked, so they are parallelisable: open one PR per frontier ticket in the same run.
将 frontier(即所有阻塞项均已关闭的工单)转换为标题和正文正确的草稿 PR,然后分别交给 GitHub Copilot。Copilot 自行创建 PR 时会写错 PR 标题和正文;这里 由你负责 PR,Copilot 只负责编写代码。
frontier 工单彼此不阻塞,因此可以并行处理:在同一次运行中为每个 frontier 工单创建一个 PR。
Steps
步骤
1. Resolve the tracker and the spec
1. 确定 tracker 和 spec
The tracker is the remote that hosts the issues and PRs — read it from (the upstream org repo, not a personal fork). The spec is the parent issue whose tickets you are delegating; take it from the user's argument, or ask for the issue number.
git remote -vDone when: you have the tracker and the spec issue number.
owner/repotracker 是托管 issues 和 PR 的远程仓库——通过 读取(应使用上游组织仓库,而不是个人 fork)。spec 是本次要委派工单的父 issue;从用户参数中获取,如果未提供则询问 issue 编号。
git remote -v完成条件: 已获得 tracker 的 和 spec issue 编号。
owner/repo2. Compute the frontier
2. 计算 frontier
List the spec's open tickets — the issues whose body references the spec. For each, read its section: a ticket is on the frontier when every issue it names there is closed (a ticket that names none is on the frontier). Drop any ticket that already has an open PR that it — it is already delegated.
ready-for-agent## Parent## Blocked byClosesDone when: you have the list of frontier tickets, each with every blocker closed and no open PR, and you can name why every non-frontier ticket was excluded.
列出该 spec 的未关闭工单——即正文中的 引用了该 spec 的 issues。对于每个工单,读取其 部分:当其中列出的每个 issue 都已关闭时,该工单属于 frontier(未列出任何阻塞项的工单也属于 frontier)。如果某个工单已存在通过 关联它的未关闭 PR,则将其排除,因为它已被委派。
## Parentready-for-agent## Blocked byCloses完成条件: 已获得 frontier 工单列表,其中每个工单的所有阻塞项均已关闭且不存在未关闭的 PR,并且能够说明每个非 frontier 工单被排除的原因。
3. Open a draft PR per frontier ticket
3. 为每个 frontier 工单创建草稿 PR
First learn the tracker's PR conventions so the PRs pass its checks, not just read as the ticket: read any PR-title rule (Conventional Commits type prefix, allowed scopes) and if present — commonly documented in or . A raw ticket title and a bare body will fail a repo's title/body CI checks.
.github/PULL_REQUEST_TEMPLATE.md.github/instructions/git-workflow.instructions.mdCONTRIBUTING.mdClosesFor each frontier ticket, off the tracker's default branch:
- Create a branch named for the ticket (when the repo uses typed branches, else
<type>/<number>-<slug>).<number>-<slug> - Make an empty scaffold commit so a PR can open.
- Push the branch to the tracker remote and open a draft PR whose title follows the repo's title convention (e.g. — infer the Conventional Commits type from the ticket, no ticket-less parenthesised scope) and whose body is the repo's PR template populated from the ticket:
<type>: <ticket purpose>in the Metadata section, a Summary of its purpose, and its acceptance criteria — filling every section the template marks required for that title type, so the PR reads as the ticket and passes the repo's title/body checks. If the repo has no template, fall back to purpose +Closes #<ticket>+ acceptance criteria.Closes #<ticket> - Set the PR's labels (mirror the ticket's /domain labels, drop issue-only ones like
layer:*, and add the classification/severity the repo requires) — the path-based labeler will not fire on a scaffold branch with no file diff.ready-for-agent
Done when: every frontier ticket has exactly one labelled draft PR whose title passes the repo's title convention and whose body links , carries its acceptance criteria, and fills every template section the repo requires for that title type.
Closes #<ticket>先了解 tracker 的 PR 规范,确保 PR 既能准确反映工单内容,也能通过仓库检查:读取所有 PR 标题规则(Conventional Commits 类型前缀、允许使用的 scopes),以及存在时的 ——这些规范通常记录在 或 中。直接使用工单标题和仅有 的正文会导致仓库的标题/正文 CI 检查失败。
.github/PULL_REQUEST_TEMPLATE.md.github/instructions/git-workflow.instructions.mdCONTRIBUTING.mdCloses对于每个 frontier 工单,从 tracker 的默认分支创建:
- 创建一个以工单命名的分支(仓库采用类型化分支时使用 ,否则使用
<type>/<number>-<slug>)。<number>-<slug> - 创建一个空的脚手架提交,以便能够开启 PR。
- 将分支推送到 tracker 远程,并创建一个草稿 PR。其标题应遵循仓库的标题约定(例如 ——根据工单推断 Conventional Commits 类型,不要使用缺少工单编号的括号式 scope),其正文应使用根据工单填充的仓库 PR 模板:在 Metadata 部分填写
<type>: <ticket purpose>,在 Summary 中概述工单目的,并附上 acceptance criteria;模板针对该标题类型标记为必填的每个部分都必须填写,使 PR 既能准确反映工单,也能通过仓库的标题/正文检查。如果仓库没有模板,则回退为:工单目的 +Closes #<ticket>+ acceptance criteria。Closes #<ticket> - 设置 PR 的 labels(同步工单的 /领域 labels,移除
layer:*等仅供 issue 使用的 labels,并添加仓库要求的分类/严重程度标签)——由于脚手架分支没有文件差异,基于路径的 labeler 不会触发。ready-for-agent
完成条件: 每个 frontier 工单都恰好对应一个带有正确 labels 的草稿 PR;其标题通过仓库的标题规范检查,正文包含 和 acceptance criteria,并填写了模板针对该标题类型要求的所有部分。
Closes #<ticket>4. Hand each PR to Copilot
4. 将每个 PR 交给 Copilot
On each PR from step 3, post one comment: followed by the body of the skill (, everything below the frontmatter), read live so an edit to that skill flows straight into the handoff.
@copilot implement.agents/skills/implement/SKILL.mdThe Copilot coding agent has cloned the tracker repo, so it can open any skill markdown committed there. Make the nested skills followable: in the pasted body, replace every reference with the repo-relative path to its committed markdown — becomes . Replace rather than annotate, because is a pi slash-command the Copilot agent cannot run; leaving it in the text is noise. Pointing at the file rather than restating its content keeps the instruction valid across edits. Replace only references whose is committed to the tracker; a reference with no committed markdown cannot be followed, so leave it as-is and tell the user which skill is missing.
/<skill>/code-review.agents/skills/code-review/SKILL.md/<skill>.agents/skills/<skill>/SKILL.mdDone when: every frontier PR carries exactly one comment in which every reference that resolves to a committed markdown has been replaced by that markdown's repo-relative path, and no runnable slash token remains.
@copilot/<skill>/<skill>在步骤 3 生成的每个 PR 上发布一条评论:内容为 后接 implement skill 的正文( 中 frontmatter 之后的全部内容)。实时读取该文件,以便对 skill 的修改能直接反映到交接内容中。
@copilot .agents/skills/implement/SKILL.mdCopilot coding agent 已 clone tracker 仓库,因此可以打开仓库中已提交的任何 skill Markdown。确保嵌套 skill 可被正确访问:在粘贴的正文中,将每个 引用替换为已提交 Markdown 的仓库相对路径——例如,将 替换为 。必须直接替换,而不能只添加说明,因为 是 Copilot agent 无法运行的 pi slash-command;将其留在文本中只会成为噪声。指向文件而非重复其内容,可使指令在后续编辑后保持有效。
/<skill>/code-review.agents/skills/code-review/SKILL.md/<skill>只替换其 已提交到 tracker 的引用;如果某个引用没有对应的已提交 Markdown,则无法跟随,应保持原样,并告知用户缺少哪个 skill。
.agents/skills/<skill>/SKILL.md完成条件: 每个 frontier PR 都恰好包含一条 评论,其中所有能够解析到已提交 Markdown 的 引用均已替换为相应 Markdown 的仓库相对路径,且不留下任何可运行的 slash token。
@copilot/<skill>/<skill>Reference
参考
Frontier rule. Blocked by means another issue must close first. Resolve each reference to its issue state; all closed ⇒ frontier, any open ⇒ hold the ticket for a later run.
## Blocked byPR body shape. The repo's PR template () populated from the ticket: in Metadata, a Summary of the ticket's purpose, its acceptance-criteria checklist copied verbatim, and every other section the template marks required for the title's Conventional Commits type. No template ⇒ + one purpose line + the acceptance-criteria checklist. Keep it aligned to the ticket so the PR is reviewable against it.
.github/PULL_REQUEST_TEMPLATE.mdCloses #<ticket>Closes #<ticket>Handoff message. , with each committed reference replaced by its path so the Copilot agent opens the live markdown from its clone instead of hitting an unrunnable slash-command. The mention triggers Copilot on the PR's branch; the PR's gives it the ticket as context.
@copilot <implement-skill body>/<skill>.agents/skills/<skill>/SKILL.mdCloses #<ticket>Frontier 规则。 Blocked by 表示另一个 issue 必须先关闭。将每个 引用解析为对应的 issue 状态;全部关闭 ⇒ frontier,任意一个仍开放 ⇒ 暂缓该工单,留待后续运行处理。
## Blocked byPR 正文结构。 使用根据工单填充的仓库 PR 模板():在 Metadata 中填写 ,在 Summary 中概述工单目的,逐字复制 acceptance-criteria 清单,并填写模板针对该标题的 Conventional Commits 类型标记为必填的所有其他部分。没有模板 ⇒ + 一行工单目的 + acceptance-criteria 清单。保持其与工单一致,以便能够对照工单审查 PR。
.github/PULL_REQUEST_TEMPLATE.mdCloses #<ticket>Closes #<ticket>交接消息。 ,其中每个已提交的 引用都替换为路径 ,这样 Copilot agent 会从其 clone 中打开实时 Markdown,而不是触发无法运行的 slash-command。该 mention 会在 PR 的分支上触发 Copilot;PR 中的 则为它提供工单上下文。
@copilot <implement-skill body>/<skill>.agents/skills/<skill>/SKILL.mdCloses #<ticket>