jackin-merge-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejackin-merge-pr
jackin-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-merge-pr [<PR>]
- 运维人员运行来合并jackin❯的拉取请求(默认使用当前分支对应的PR)。
jackin-merge-pr [<PR>]
When NOT to use
不适用场景
- Opening or iterating a PR → /
jackin-create-pr.jackin-propose
- 创建或迭代PR → 使用/
jackin-create-pr。jackin-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项目符号,重定向入站链接;提交## Completed类型的提交。docs:执行[bin]删除cargo xtask roadmap retire <slug> --apply条目、删除meta.json文件、执行审计,若仍有入站链接指向已删除的slug则失败。运行.mdx文档检查;推送提交。bun - 部分完成 → 执行将状态设置为
cargo xtask roadmap retire <slug> --partial并保留页面;命名剩余阶段;提交;推送。**Status**: Partially implemented
- 是 →
- 元数据协调:标题/正文与最终差异是否匹配?压缩合并会将标题原封不动写入历史。若内容过时,通过修改;在回复中说明变更。
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)
- 将之前会话的“全部合并”授权沿用至当前——此授权不会延续。
- 在CI任务待处理/失败时合并,或未明确指定检查项就通过绕过。
--admin - 保留的路线图页面而非归档至文档。
Status: Resolved - 压缩合并的标题缺少后缀或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