ship

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ship

交付变更

Finalize a validated change: commit → push → PR → close out the ticket.
Preconditions: the operator has manually verified the change works. This skill does not run the test suite. It does not hard-require GitHub CLI — the PR host is resolved per
references/vcs-host-detection.md
.
完成已验证的变更:提交 → 推送 → 创建PR → 关闭工单。
前置条件: 操作人员已手动验证变更可用。本skill不运行测试套件。不强制要求GitHub CLI——PR托管平台将根据
references/vcs-host-detection.md
进行解析。

Steps

步骤

  1. Confirm branch is not the base branch. Resolve base via
    references/build-tool-detection.md#base_branch
    . If
    git rev-parse --abbrev-ref HEAD
    equals the base, abort with a clear message — never commit on
    main
    /the base branch.
  2. Confirm a worktree or feature branch exists. If on a detached HEAD or a suspicious state, abort.
  3. Stage and commit changes.
    • Write a commit subject in the configured language per
      references/output-preferences.md
      and the project's convention if detectable (Conventional Commits if prior commits follow it — check
      git log --oneline -20
      ).
    • Include a 1–3 sentence body only if the diff needs motivation; otherwise subject-only.
    • Never add
      Co-Authored-By
      or AI credit.
    • Run commit via HEREDOC to preserve formatting.
  4. Push.
    git push -u origin HEAD
    .
  5. Create the PR. Resolve the create command via
    references/vcs-host-detection.md
    (
    .turkit.yaml → vcs.pr_create
    , else
    gh
    , else
    glab
    , else the manual fallback).
    • Title: short, under 70 chars (
      $TITLE
      ).
    • Body: delegate to
      /pr-description
      (or re-use its output if already generated this session). Write it to a temp file and pass it as
      $BODY_FILE
      so multi-line markdown never has to be shell-quoted.
    • Detect CLIs with
      command -v gh
      /
      command -v glab
      before choosing a fallback. Do not treat "CLI missing" as an error when the manual fallback is available.
    • If a configured custom
      vcs.pr_create
      command is blocked by the host/tool sandbox, do not bypass approval. Print the exact manual command plus title/body/branch and use the manual fallback output.
    • No PR host available (no config, no
      gh
      , no
      glab
      ): do not fail. Print the title + body and the pushed branch name, and tell the operator to open the PR in their host UI or CLI. Report with
      PR : opened manually — <branch>
      and the
      #<PR_NUMBER>
      line carrying the number the operator assigns (or
      #-
      if unknown).
  6. Mark the ticket Done. Via
    references/issue-tracker-detection.md
    . If no tracker, skip silently.
  7. Report. Emit the Output format block exactly — no prose before it, no prose after it. The bare
    #<PR_NUMBER>
    MUST be the very last line of the entire response so the operator (and other tools) can extract it without parsing.
  1. 确认当前分支不是基础分支。通过
    references/build-tool-detection.md#base_branch
    确定基础分支。如果
    git rev-parse --abbrev-ref HEAD
    的结果等于基础分支,则终止操作并给出明确提示——绝对不要在
    main
    或其他基础分支上提交。
  2. 确认工作树或功能分支存在。如果处于分离HEAD状态或异常状态,则终止操作。
  3. 暂存并提交变更
    • 根据
      references/output-preferences.md
      中配置的语言以及可检测到的项目约定(如果过往提交遵循Conventional Commits规范,则检查
      git log --oneline -20
      )编写提交主题。
    • 仅当差异需要说明动机时,才添加1-3句话的提交正文;否则仅保留提交主题。
    • 绝对不要添加
      Co-Authored-By
      或AI署名。
    • 通过HEREDOC执行提交以保留格式。
  4. 推送。执行
    git push -u origin HEAD
  5. 创建PR。根据
    references/vcs-host-detection.md
    确定创建命令(优先使用
    .turkit.yaml → vcs.pr_create
    ,其次是
    gh
    ,再是
    glab
    ,最后是手动回退方案)。
    • 标题:简短,不超过70字符(
      $TITLE
      )。
    • 正文:委托给
      /pr-description
      处理(如果本次会话已生成过结果则直接复用)。将正文写入临时文件并作为
      $BODY_FILE
      传入,这样多行Markdown无需进行Shell转义。
    • 在选择回退方案前,先通过
      command -v gh
      /
      command -v glab
      检测CLI工具是否存在。当手动回退方案可用时,不要将“CLI缺失”视为错误。
    • 如果配置的自定义
      vcs.pr_create
      命令因托管平台/工具沙箱被阻止,不要绕过审批。打印精确的手动命令以及标题/正文/分支信息,并使用手动回退方案输出。
    • 无PR托管平台可用(无配置、无
      gh
      、无
      glab
      ):不要失败。打印标题+正文以及已推送的分支名称,并告知操作人员在托管平台UI或CLI中创建PR。上报格式为
      PR : opened manually — <branch>
      #<PR_NUMBER>
      行携带操作人员指定的编号(若未知则使用
      #-
      )。
  6. 标记工单为完成状态。通过
    references/issue-tracker-detection.md
    处理。若无工单跟踪系统,则静默跳过。
  7. 上报结果。严格按照输出格式块输出——前后不得添加任何描述性文字。
    #<PR_NUMBER>
    必须是整个响应的最后一行,以便操作人员(及其他工具)无需解析即可提取该内容。

Output format

输出格式

The final response of this skill MUST end with this exact block. Fill placeholders, keep field labels and order intact, keep the blank line before
#<PR_NUMBER>
, and emit nothing after the number:
✅ Shipped
- Commit : <short-hash> — <subject>
- Branch : <branch>
- Ticket : <ID> → Done       (or: no tracker detected)
- PR     : <url>                (or: opened manually — <branch>)

#<PR_NUMBER>
Rules:
  • No trailing prose. The
    #<PR_NUMBER>
    line is the last line of the response. Do not add a recap, next steps, or commentary after it.
  • No prefix prose. Optionally one short status line before the block if a step needs explanation (e.g. pre-commit hook fix). Otherwise: jump straight to the block.
  • Always include all four fields (Commit, Branch, Ticket, PR), even if redundant. If the ticket field is "no tracker detected", keep the line. If the PR was opened manually (no host CLI), use
    opened manually — <branch>
    .
  • #<PR_NUMBER>
    is the bare PR number
    prefixed by
    #
    (e.g.
    #42
    ), on its own line. Not the URL, not a hash — the number. If the host could not assign one (manual fallback), use
    #-
    .
本skill的最终响应必须以如下精确格式结尾。填充占位符,保留字段标签和顺序,保留
#<PR_NUMBER>
前的空白行,且该行之后不得添加任何内容:
✅ 已交付
- 提交 : <短哈希值> — <提交主题>
- 分支 : <分支名称>
- 工单 : <ID> → 已完成       (或:未检测到工单跟踪系统)
- PR     : <链接>                (或:手动创建 — <分支名称>)

#<PR_NUMBER>
规则:
  • 无尾部文字
    #<PR_NUMBER>
    行是响应的最后一行。不得在其后添加总结、下一步操作或评论。
  • 无前缀文字。若某步骤需要说明(例如预提交钩子修复),可在该块前添加一行简短状态说明。否则直接输出该块。
  • 始终包含全部四个字段(提交、分支、工单、PR),即使内容重复。若工单字段为“未检测到工单跟踪系统”,仍需保留该行。若PR为手动创建(无托管平台CLI),则使用
    手动创建 — <分支名称>
  • #<PR_NUMBER>
    是仅带有
    #
    前缀的PR编号
    (例如
    #42
    ),单独占一行。不是链接,不是哈希值——仅为编号。若托管平台无法分配编号(手动回退方案),则使用
    #-

Guardrails

约束规则

  • Never
    --force
    , never
    --no-verify
    , never skip hooks.
  • Never amend an already-pushed commit.
  • If a pre-commit hook fails: fix the underlying issue, re-stage, create a new commit. Do not amend.
  • Do not assume GitHub. Resolve PR creation per
    references/vcs-host-detection.md
    ; a missing host CLI degrades to the manual fallback, never a hard failure.
  • Custom
    vcs.pr_create
    commands may require operator approval depending on the host/tool sandbox. If approval is unavailable, use the manual fallback.
  • Apply
    references/output-preferences.md
    for operator-facing language/style.
  • 绝对不要使用
    --force
    --no-verify
    参数,不要跳过钩子。
  • 绝对不要修改已推送的提交。
  • 若预提交钩子失败:修复底层问题,重新暂存,创建一个的提交。不要修改原有提交。
  • 不要默认假设使用GitHub。根据
    references/vcs-host-detection.md
    解析PR创建方式;若缺少托管平台CLI,则降级为手动回退方案,绝对不要直接失败。
  • 自定义
    vcs.pr_create
    命令可能需要操作人员审批,具体取决于托管平台/工具沙箱。若无法获得审批,则使用手动回退方案。
  • 操作人员可见的语言/样式需遵循
    references/output-preferences.md