ship
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShip
Ship:交付上线
This skill takes finished work from the working tree to production. It commits in small pieces, pushes, merges, watches checks and confirms the result is live.
此 skill 将已完成的工作从 working tree 推进至生产环境。它会按小批次执行 commit、push 和 merge,监控各项 checks,并确认结果已上线。
Push means push
Push 的真正含义是执行 push
When the user says push, ship or merge, do every step to the end. Handing a command back to the user is a finding unless it needs their credentials or their approval. A secret in a commit is always .
HIGHChecking the change itself runs in before this skill starts.
verify当用户说 push、ship 或 merge 时,必须将每一步执行到底。除非确实需要用户的 credentials 或 approval,否则把命令交回给用户就属于一个问题项。commit 中出现 secret 始终属于 。
HIGH对变更本身的检查会在此 skill 开始前通过 运行。
verify1. Check the tree
1. 检查 working tree
Run and read every changed file. Name any file you did not change in this task and ask before committing it. Committing a stray file is . Scan the diff for keys, tokens, passwords and files. A committed secret is .
git statusship-flag-stray-files.envship-no-secrets运行 并读取每个变更文件。指出本任务中未由你改动的任何文件,并在 commit 前询问。提交无关文件属于 。扫描 diff 中的 keys、tokens、passwords 以及 文件。commit 中提交了 secret 属于 。
git statusship-flag-stray-files.envship-no-secrets2. Commit per change
2. 按变更分别 commit
Make one commit per logical change. One commit for a feature, a fix and a rename is . Write every message as a Conventional Commit: in the imperative, lowercase and with no full stop. Use , , , , or another standard type, and mark a breaking change with after the type. A message like "Remove the archive." is . In a package that publishes releases, add the changeset with the change. A release-bound change with no changeset is .
ship-commit-per-changetype(scope): summaryfeatfixdocsrefactorchore!ship-conventional-commitsship-changeset-for-packages每个逻辑变更创建一个 commit。一个 commit 同时包含 feature、fix 和 rename,属于 。将每条 message 写为 Conventional Commit:,采用祈使语气、小写形式,且末尾不加句号。可使用 、、、、 或其他标准 type;breaking change 应在 type 后加 。类似 "Remove the archive." 的 message 属于 。对于会发布版本的 package,应随变更一并添加 changeset。与发布相关的变更若未包含 changeset,则属于 。
ship-commit-per-changetype(scope): summaryfeatfixdocsrefactorchore!ship-conventional-commitsship-changeset-for-packages3. Push, merge and tidy
3. Push、merge 并整理
Push the branch. When asked to merge, merge it, delete the branch and switch back to the default branch. A merged branch left behind is . Open one pull request per bug or feature. A pull request bundling three fixes is . A pull request that changes UI carries a screenshot. That is .
ship-merge-and-tidyship-one-pr-per-bugship-screenshot-ui-prsPush 该 branch。当用户要求 merge 时,执行 merge、删除该 branch,并切回 default branch。merge 后遗留 branch 属于 。每个 bug 或 feature 打开一个 pull request。将三个 fix 打包到一个 pull request 中,属于 。更改 UI 的 pull request 必须带有 screenshot。缺少 screenshot 属于 。
ship-merge-and-tidyship-one-pr-per-bugship-screenshot-ui-prs4. Watch the checks
4. 监控 checks
Wait for CI and fix what fails. Reporting "pushed" while checks are red or still running is .
ship-watch-checks等待 CI 完成,并修复失败项。在 checks 仍为红色或仍在运行时报告“已 push”,属于 。
ship-watch-checks5. Close the loop
5. 完成闭环
When the change fixes an issue, link it, close it and reply where it was raised. A fixed bug with its issue left open is . When the change deploys, open the live URL or the published version and check it. "Deployed" with no look at production is .
ship-close-the-loopship-confirm-live当变更修复某个 issue 时,关联它、关闭它,并在其发起处回复。bug 已修复但 issue 仍保持打开,属于 。当变更完成 deploy 时,打开 live URL 或 published version 并进行检查。仅报告“已部署”而未检查 production,属于 。
ship-close-the-loopship-confirm-live6. Hand back only what needs the user
6. 仅交回必须由用户处理的内容
Do every step you can run yourself. Ask only for a login, a two-factor code or an approval. Say exactly which. A list of commands for the user to run is .
ship-do-the-steps完成所有你能够自行执行的步骤。只在需要 login、two-factor code 或 approval 时询问,并明确说明需要哪一项。列出命令让用户运行,属于 。
ship-do-the-stepsThe pair
成对原则
Every check is a pair. The broken line sits beside the line that replaces it.
| Rule | Broken | Replacement |
|---|---|---|
| | The file named, then a question |
| | |
| One commit for a feature, a fix and a rename | Three commits, one per change |
| | |
| A package fix with no changeset | The changeset in the same commit |
| Merged, the branch still checked out | Merged, deleted, back on |
| One pull request for three bugs | Three pull requests |
| A UI pull request with no image | A screenshot in the description |
| "Pushed" while CI runs | "Pushed, all checks pass" |
| The fix merged, the issue open | The issue linked, closed and answered |
| "Deployed" | "Live at the production URL, checked" |
| "Run | Published, or "needs your two-factor code" |
每项检查都是成对出现的。错误示例与替代方案并列显示。
| 规则 | 错误做法 | 替换做法 |
|---|---|---|
| | 先指出该文件,然后询问 |
| 提交了 | 忽略 |
| 一个 commit 同时包含 feature、fix 和 rename | 三个 commit,每个变更一个 |
| | |
| 修复 package,但没有 changeset | 在同一个 commit 中加入 changeset |
| 已 merge,但 branch 仍处于 checkout 状态 | 已 merge、已删除,并回到 |
| 三个 bug 使用一个 pull request | 三个 pull request |
| UI pull request 没有图片 | 在描述中加入 screenshot |
| CI 仍在运行时报告“已 push” | 已 push,且所有 checks 均通过 |
| fix 已 merge,但 issue 仍打开 | 已关联并关闭 issue,同时作出回复 |
| “已部署” | 已在 production URL 上线,并已检查 |
| “准备好后运行 | 已发布,或“需要你的 two-factor code” |
Reporting
报告
Severity. is a committed secret, a stray file committed or a release with failing checks. is a bundled commit or pull request, an open issue after the fix or steps handed back that could have run. is a message that is not a Conventional Commit, a missing screenshot or a branch left after merge.
HIGHMEDIUMLOWFormat. One finding per root cause, citing the step when no file applies:
file:line - [rule-id] what is wrong
step 3 - [rule-id] what is wrongThen a summary. when any remains, otherwise. Mark every check you could not watch to the end as .
Rule | Count | SeverityBlockHIGHApproveNot verified严重程度。 表示提交了 secret、提交了无关文件,或发布时 checks 失败。 表示将多个变更捆绑在一个 commit 或 pull request 中、修复后 issue 仍打开,或将本可自行运行的步骤交回给用户。 表示 message 不符合 Conventional Commit、缺少 screenshot,或 merge 后遗留 branch。
HIGHMEDIUMLOW格式。 每个 root cause 只报告一个问题项;若不涉及文件,则引用相应步骤:
file:line - [rule-id] what is wrong
step 3 - [rule-id] what is wrong然后提供 汇总。只要仍有任何 未解决,就标记为 ;否则标记为 。将每一项未能监控至结束的检查标记为 。
Rule | Count | SeverityHIGHBlockApproveNot verified