complete-work
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseComplete Work
完成工作
Take the task supplied with this invocation from a new branch through a verified implementation and a completed PR review cycle.
将本次调用提供的任务从新建分支开始,经过验证的实现和完整的 PR 审查循环。
1. Establish scope and create a branch
1. 确定范围并创建分支
Recover the requested work and acceptance criteria from the accompanying instructions and conversation. Read applicable files and repository requirements. If no task was supplied, ask for it before creating a branch.
AGENTS.mdInspect the worktree, current branch, and remotes. Preserve pre-existing changes and exclude unrelated commits from the new branch and PR. Identify the remote for the intended base repository, fetch its branch, and create a new, descriptively named branch with directly from that freshly fetched commit before editing. The branch name must begin with , for example ; follow repository naming conventions for the suffix and use as the PR base. Verify that the new branch's initial HEAD matches the fetched commit; do not branch from a stale local or the current feature branch. If the remote is ambiguous, is missing, or fetching fails, stop and report the blocker. Use an isolated worktree when needed to preserve existing work.
main--no-trackagent/agent/add-login-validationmainmainmainmainConfirm that the skill is available and GitHub CLI authentication supports the target repository. If a prerequisite is missing, report it explicitly rather than silently dropping the final phase.
finish-prBefore editing, identify the push remote for the intended head repository (which may differ from the base repository for a fork), then create the same-named remote branch with . Verify that resolves to and compare the SHA returned by with to verify the remote branch matches local HEAD. Branch setup is complete only when both branches exist with the same name and the local branch tracks that remote branch. If publishing or verification fails, stop and report the blocker.
git push --set-upstream <head-remote> HEAD:refs/heads/<branch-name>git rev-parse --abbrev-ref "@{upstream}"<head-remote>/<branch-name>git ls-remote --exit-code --heads <head-remote> refs/heads/<branch-name>git rev-parse HEAD从随附的说明和对话中恢复所请求的工作和验收标准。阅读适用的 文件和仓库要求。如果未提供任务,请在创建分支前询问。
AGENTS.md检查工作树、当前分支和远程仓库。保留先前存在的更改,并从新分支和 PR 中排除不相关的提交。确定目标基础仓库的远程,获取其 分支,并在编辑之前直接从该新获取的提交创建一个描述性命名的新分支,使用 。分支名称必须以 开头,例如 ;后缀遵循仓库命名约定,并使用 作为 PR 基础。验证新分支的初始 HEAD 与获取的 提交匹配;不要从过期的本地 或当前功能分支创建分支。如果远程不明确、 缺失或获取失败,请停止并报告阻塞问题。在需要保留现有工作时使用隔离的工作树。
main--no-trackagent/agent/add-login-validationmainmainmainmain确认 skill 可用,且 GitHub CLI 认证支持目标仓库。如果缺少先决条件,请明确报告,而不是静默丢弃最后阶段。
finish-pr在编辑之前,确定目标 head 仓库的推送远程(对于 fork,可能不同于基础仓库),然后使用 创建同名的远程分支。验证 解析为 ,并将 返回的 SHA 与 比较,以验证远程分支与本地 HEAD 匹配。仅当两个分支存在且名称相同,并且本地分支跟踪该远程分支时,分支设置才算完成。如果发布或验证失败,请停止并报告阻塞问题。
git push --set-upstream <head-remote> HEAD:refs/heads/<branch-name>git rev-parse --abbrev-ref "@{upstream}"<head-remote>/<branch-name>git ls-remote --exit-code --heads <head-remote> refs/heads/<branch-name>git rev-parse HEAD2. Implement and commit incrementally
2. 增量实现和提交
Implement the supplied task, keeping changes within its scope. Commit at meaningful checkpoints as coherent pieces are completed and verified; do not defer all commits until the end of a multi-step task. A small task may need only one commit. Stage only the changes belonging to this task, inspect each staged diff, and use descriptive commit messages.
Before publishing implementation commits, review the complete diff against the intended base and verify every acceptance criterion. Run the relevant tests and repository-required checks, fix failures caused by the work, and inspect for accidental changes or omissions. Proceed when the implementation is complete, relevant verification passes, and all task changes are committed. Report any blocker or unavailable verification accurately.
实现所请求的任务,将更改保持在其范围内。在完成并验证连贯的部分时,在有意义的检查点进行提交;不要将多次提交推迟到多步骤任务的最后。小任务可能只需要一次提交。仅暂存属于此任务的更改,检查每个暂存的 diff,并使用描述性的提交消息。
在发布实现提交之前,对照预期基础审查完整的 diff,并验证每个验收标准。运行相关测试和仓库要求的检查,修复由工作引起的失败,并检查意外更改或遗漏。当实现完成、相关验证通过且所有任务更改已提交时继续。准确报告任何阻塞问题或不可用的验证。
3. Push and open the PR
3. 推送并打开 PR
Push the completed commits without force using the explicit destination , and create a PR against the intended base. Write a title and description covering the final problem, resulting behaviour, and verification. Check whether a PR already exists for this branch before creating one, so a resumed run reuses it.
git push <head-remote> HEAD:refs/heads/<branch-name>An invocation requesting this workflow authorizes its commits, push, PR creation, and review replies; carry those steps through without redundant confirmation.
使用显式目标 推送已完成的提交(不带 force),并针对预期基础创建 PR。编写标题和描述,涵盖最终问题、结果行为和验证。在创建 PR 之前检查该分支是否已存在 PR,以便恢复运行可复用。
git push <head-remote> HEAD:refs/heads/<branch-name>请求此工作流的调用授权其提交、推送、PR 创建和审查回复;无需重复确认即可执行这些步骤。
4. Complete the PR with finish-pr
4. 使用 finish-pr 完成 PR
Load and follow for the newly created PR in the same run. Carry forward the task intent, decisions, verification, and known limitations. Continue through its conflict, CI, feedback, and review-convergence workflow until its definition of done is met or one of its stopping conditions applies. Creating the PR alone does not complete this workflow.
$finish-prLeave the PR open for the user to merge unless merging was separately requested. Report the PR URL, a concise change and verification summary, and any remaining blocker or pending required check, using 's final audit as the source of truth.
finish-pr在同一运行中加载并遵循 来处理新创建的 PR。保留任务意图、决策、验证和已知限制。继续执行其冲突、CI、反馈和审查收敛工作流,直到满足其完成定义或适用其停止条件之一。仅创建 PR 并不完成此工作流。
$finish-pr除非单独请求合并,否则保持 PR 开放以供用户合并。使用 的最终审计作为真相来源,报告 PR URL、简明的更改和验证摘要,以及任何剩余阻塞问题或待处理的必需检查。
finish-pr