merge-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemerge-pr
merge-pr
Sequence the jackin' pre-merge gates fail-closed, retire the roadmap item into docs, then squash-merge. Reuses the agent rules (auto-loaded) and — sequences them, never restates them.
.github/PULL_REQUESTS.md执行jackin的预合并检查(失败即终止),将路线图项归档到文档中,然后进行压缩合并。复用下的Agent规则(自动加载)和——按流程执行,不重复说明内容。
.github/PULL_REQUESTS.mdWhen to use
使用场景
- Operator runs to merge a jackin' PR (defaults to the current branch's PR).
/jackin-dev:merge-pr [<PR>]
- 操作员运行以合并jackin相关PR(默认使用当前分支对应的PR)。
/jackin-dev:merge-pr [<PR>]
When NOT to use
不适用场景
- Opening or iterating a PR → /
/jackin-dev:create-pr./jackin-dev:propose
- 创建或迭代PR → 使用/
/jackin-dev:create-pr。/jackin-dev:propose
Arguments
参数
- — do not wait on pending CI; stop and report instead.
--no-poll - — authorize bypassing one named failing check (still needs the high-blast-radius confirm).
--admin <check>
- — 不等待待处理的CI任务;直接停止并报告状态。
--no-poll - — 授权绕过指定的一项失败检查(仍需高影响范围确认)。
--admin <check>
Red flags — STOP
危险信号——立即停止
- No clear authorization for this PR and it is high-blast-radius → STOP, confirm first.
- Any required CI check failing → STOP (no bypass without
--admin+ confirm).--admin <check> - Roadmap item not retired / not status-moved when the PR ships or advances it → STOP, fix first.
- 针对此PR无明确授权且属于高影响范围 → 停止,先确认。
- 任何必需的CI检查失败 → 停止(若无+确认,不可使用
--admin <check>绕过)。--admin - PR交付或推进路线图项时,路线图项未归档/未更新状态 → 停止,先修复。
Process
流程
- Resolve PR. Current branch's PR or the arg. Read and
gh pr view.gh pr diff - Blast-radius classify. High if the diff touches a versioned schema, auth/security surface, , or needs a force-push /
.github/workflows/**. High → pause for one explicit confirm. Normal → proceed (invoking the skill is the go).--admin - CI gate. : if pending, poll until green (unless
gh pr checks <PR>); if any check fails, STOP. Trust CI — which runs--no-pollplus the test/clippy/fmt jobs — no local re-run.cargo xtask schema-check - Roadmap retirement. Does this PR ship the last piece of its roadmap item?
- Yes →
[bin]prints the worklist: the page content, every inbound link (cargo xtask roadmap retire <slug> --plan), and thegrep <slug>entry.meta.jsonDo the judgment moves — operator detail →[agent]/guides/, design detail →commands/, write thereference/bullet in## Completed, repoint inbound links; commitroadmap/index.mdx.docs:[bin]removes thecargo xtask roadmap retire <slug> --applyentry, deletes themeta.json, runs the audit, and fails if any inbound link still points at the dead slug. Run the.mdxdocs gate; push.bun - Partial → sets
cargo xtask roadmap retire <slug> --partialand keeps the page; name the remaining phases; commit; push.**Status**: Partially implemented
- Yes →
- Metadata reconcile. Title/body match the final diff? Squash writes the title verbatim into history. Fix via if stale; surface the change in your reply.
gh pr edit - Squash-merge. Build a body file (prose summary, no checklists), append trailers via , then
cargo run -p jackin-pr-trailers -- --body-file. Confirm the title carriesgh pr merge <PR> --squash --body-file.(#N) - Report. Merged SHA and what retirement did.
- 确定PR:当前分支对应的PR或指定参数中的PR。读取和
gh pr view的结果。gh pr diff - 影响范围分类:若代码变更涉及版本化 schema、认证/安全层面、,或需要强制推送/使用
.github/workflows/**,则属于高影响范围。高影响范围→暂停并等待明确确认。普通影响范围→继续执行(调用此技能即表示同意)。--admin - CI检查:执行:若任务待处理,轮询直到状态为绿色(除非使用
gh pr checks <PR>);若任何检查失败,立即停止。信任CI结果——CI会运行--no-poll以及测试/clippy/fmt任务——无需本地重新运行。cargo xtask schema-check - 路线图归档:此PR是否完成了路线图项的最后一部分?
- 是 → 执行
[bin]生成工作清单:页面内容、所有入站链接(cargo xtask roadmap retire <slug> --plan)和grep <slug>条目。meta.json执行判断性操作——操作员相关细节迁移至[agent]/guides/,设计细节迁移至commands/,在reference/中添加roadmap/index.mdx项目符号,重定向入站链接;提交## 已完成类型的提交。docs:执行[bin]移除cargo xtask roadmap retire <slug> --apply条目、删除meta.json文件、执行审计,若仍有入站链接指向已删除的slug则失败。运行.mdx文档检查;推送提交。bun - 部分完成 → 执行将状态设置为
cargo xtask roadmap retire <slug> --partial并保留页面;命名剩余阶段;提交;推送。**状态**: 部分已实现
- 是 →
- 元数据协调:标题/正文是否与最终代码变更匹配?压缩合并会将标题直接写入历史记录。若内容过时,通过修复;在回复中说明变更内容。
gh pr edit - 压缩合并:生成正文文件( prose 摘要,无检查清单),通过添加尾部信息,然后执行
cargo run -p jackin-pr-trailers -- --body-file。确认标题包含gh pr merge <PR> --squash --body-file。(#N) - 报告:输出合并后的SHA值以及归档操作的内容。
Common mistakes
常见错误
- Carrying a prior session's "just merge everything" as authorization — it does not carry forward.
- Merging on pending/failing CI, or -bypassing without explicit per-check opt-in.
--admin - Leaving a roadmap page instead of retiring it into docs.
Status: Resolved - Squash title missing the suffix or the DCO / Co-authored-by trailers.
(#N)
- 将之前会话中的“全部合并”授权沿用至当前PR——此授权不具有延续性。
- 在CI任务待处理/失败时合并,或未针对具体检查项明确选择就使用绕过。
--admin - 保留的路线图页面,未将其归档到文档中。
状态: 已解决 - 压缩合并的标题缺少后缀或DCO / Co-authored-by尾部信息。
(#N)
Tooling
工具集
Bundles . gives the agent the retirement worklist; does the mechanical removal + audit and fails on a dangling link; sets the Status. The content moves themselves are the agent's judgment. CI runs (the 5-artifact gate); this skill only reads its result.
jackin-pr-trailerscargo xtask roadmap retire <slug> --plan--apply--partialcargo xtask schema-check包含。为Agent提供归档工作清单;执行机械移除+审计,若存在悬空链接则失败;设置状态。内容迁移操作由Agent自行判断。CI运行(5项产物检查);此技能仅读取其结果。
jackin-pr-trailerscargo xtask roadmap retire <slug> --plan--apply--partialcargo xtask schema-check