tk-pr-rebase

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Rebase One PR

单个PR的Rebase操作

Start only through
/tk-pr-rebase
,
$tk-pr-rebase
, the host skill picker, or an exact
PR handoff
from an active
tk-pr-sweep
. Do not auto-apply to a generic branch
rebase
, simple
conflict marker edit
, or review response.
Own the exact
base/head rebase
,
conflict resolution
,
verification
, and bounded
force-with-lease
for one PR. Do not perform
merge
,
close
,
tag
,
release
, or unrelated feedback implementation. standalone rebase/publication approval이 필요하면 host별 native structured question surface를 우선 사용합니다 (Claude Code: AskUserQuestion; Codex: request_user_input; Hermes: clarify). unavailable하면 같은 approval packet을 plain chat으로 fallback하고 parent-approved exact route는 다시 묻지 않습니다.
仅可通过
/tk-pr-rebase
$tk-pr-rebase
、宿主技能选择器,或来自活跃
tk-pr-sweep
的精准
PR交接
启动。 请勿自动应用于通用分支
rebase
、简单冲突标记编辑或评审回复。
负责单个PR的精准
base/head rebase
、冲突解决、验证,以及受限的
force-with-lease
操作。 请勿执行合并、关闭、打标签、发布或无关反馈的实现。 若需要独立rebase/推送审批,优先使用各宿主原生的结构化提问界面(Claude Code: AskUserQuestion; Codex: request_user_input; Hermes: clarify)。若该界面不可用,则降级为纯聊天形式发送相同的审批请求,且对于已获上级批准的精准流程不再重复询问。

Fresh identity

全新工作环境

Local rebase must start in a newly created dedicated worktree. If it cannot be created or proven fresh, return
Blocked
before mutation.
Fresh-read the following at the start.
  • repository and authenticated identity
  • open PR number
  • head repository/ref/SHA
  • base repository/ref/SHA
  • local branch/HEAD/worktree
  • active Git operation
  • review/thread/check state
If identity/ownership is ambiguous or the fork publication boundary cannot be proven safe, return
Blocked
before mutation.
Fetch the exact remote head and latest base, then freeze the following.
text
old_head
base_sha
full head ref
remote
expected force-with-lease
Require local
HEAD == old_head
, remote PR head
== old_head
, and a clean worktree.
本地rebase必须在新建的专属工作树中启动。若无法创建或无法证明环境全新,在执行变更前返回
Blocked
启动时需重新读取以下信息:
  • 仓库及已认证身份
  • 已打开的PR编号
  • 源仓库/引用/SHA
  • 目标仓库/引用/SHA
  • 本地分支/HEAD/工作树
  • 正在进行的Git操作
  • 评审/线程/检查状态
若身份/所有权不明确,或无法证明复刻仓库的推送边界安全,在执行变更前返回
Blocked
拉取精准的远程源分支和最新目标分支,然后冻结以下信息:
text
old_head
base_sha
full head ref
remote
expected force-with-lease
要求本地
HEAD == old_head
、远程PR源分支
== old_head
,且工作树干净。

Rebase and conflict

Rebase与冲突处理

Rebase onto the exact
base_sha
. If a conflict occurs, apply the intent/index/marker/verification contract from
tk-merge-conflict
. Do not choose arbitrarily when semantic ambiguity exists.
After the rebase, verify the following.
  • Git operation completed
  • worktree/index clean
  • base_sha
    is an ancestor of the new HEAD
  • intended commit/diff preserved
  • relevant tests/checks pass
Do not force-push if no rewrite is needed.
基于精准的
base_sha
执行rebase。 若发生冲突,应用
tk-merge-conflict
中的意图/索引/标记/验证规则。 当存在语义歧义时,请勿随意选择解决方案。
完成rebase后,验证以下内容:
  • Git操作已完成
  • 工作树/索引干净
  • base_sha
    是新HEAD的祖先
  • 预期的提交/差异已保留
  • 相关测试/检查已通过
若无需重写提交记录,请勿执行强制推送。

Standalone publication

独立推送

An explicit standalone invocation automatically authorizes only the local rebase. Before remote publication, record the exact PR/base/head, old/new SHA, verification, exact lease/refspec, reply/thread action, and exclusions in
.tigerkit/pr-rebase.md
, then reread it.
显式的独立调用仅自动授权本地rebase操作。 在远程推送前,需将精准的PR/base/head、新旧SHA、验证信息、精准的lease/refspec、回复/线程操作及排除项记录在
.tigerkit/pr-rebase.md
中,然后重新读取该文件。

🔴 CHECKPOINT · 🛑 STOP · Standalone publication boundary

🔴 检查点 · 🛑 停止 · 独立推送边界

Do not tell the user merely to read the entire ledger. Naturally summarize what changed, what was verified, and which exact publication will be performed, then obtain one current-turn approval. STOP immediately before the remote write if repository/identity/open state/base/head/refspec/lease cannot be rechecked or if any material drift invalidates the approval.
Only exact
--force-with-lease=<full-head-ref>:<old_head>
is allowed for publication. Plain
--force
is prohibited.
请勿仅告知用户阅读完整记录。需自然总结变更内容、已验证项及即将执行的精准推送操作,然后获取当前轮次的审批。 若无法重新检查仓库/身份/开放状态/base/head/refspec/lease,或任何实质性变化导致审批失效,在远程写入前立即停止。
仅允许使用精准的
--force-with-lease=<full-head-ref>:<old_head>
进行推送。 禁止使用普通的
--force

Execution under Sweep

在Sweep下执行

If an active
tk-pr-sweep
has already approved the exact repository/PR/base/head and rebase route, do not repeat the publication question.
The Sweep handoff must include a newly created dedicated worktree path. If it is missing or not fresh, return
Blocked
before mutation. Run the child from that worktree; never switch the parent
main
or
develop
checkout to the PR branch.
A Sweep child must not create
.tigerkit/pr-sweep.md
or
.tigerkit/pr-rebase.md
. Return only the following compact evidence to the parent.
  • repository/PR
  • consumed
    base_sha
    /
    old_head
  • verified
    new_head
  • tests/checks
  • exact lease/refspec
  • remaining conflict/finding
  • status
Recheck the exact PR/base/head immediately before child execution. If the head/base changed materially after parent approval, return only that PR to the parent as
Blocked
.
若活跃的
tk-pr-sweep
已批准精准的仓库/PR/base/head及rebase流程,无需重复询问推送审批。
Sweep交接必须包含新建的专属工作树路径。若路径缺失或环境非全新,在执行变更前返回
Blocked
。需在该工作树中执行子任务;切勿将父级的
main
develop
checkout切换至PR分支。
Sweep子任务不得创建
.tigerkit/pr-sweep.md
.tigerkit/pr-rebase.md
。 仅需向父级返回以下简洁验证信息:
  • 仓库/PR
  • 使用的
    base_sha
    /
    old_head
  • 已验证的
    new_head
  • 测试/检查结果
  • 精准的lease/refspec
  • 剩余冲突/发现项
  • 状态
执行子任务前需立即重新检查精准的PR/base/head。 若在父级批准后源/目标分支发生实质性变化,仅需向父级返回该PR的
Blocked
状态。

After publication

推送后操作

Verify that the remote PR head is
new_head
. Reply to or resolve only review threads actually satisfied by the rebase. Fresh-read every thread/review/check and do not hide unresolved findings as complete.
If needed, re-request review from an existing human reviewer, excluding the author, authenticated user, bots, and still-valid approvers. End generated GitHub comments with
_🤖 본 코멘트는 AI가 작성했습니다._
.
验证远程PR源分支是否为
new_head
。 仅回复或解决rebase实际满足的评审线程。 重新读取所有线程/评审/检查结果,不得将未解决的问题标记为已完成。
若需要,向现有人类评审者重新请求评审,排除作者、已认证用户、机器人及仍有效的审批者。 生成的GitHub评论末尾需添加
_🤖 此评论由AI生成。_

Status

状态说明

상태의미
Pass
exact rebase와 필요한 publication이 fresh evidence로 확인됨
Pending
standalone publication 승인을 기다림
Blocked
identity, authority, semantic conflict, freshness가 안전하게 닫히지 않음
Unverifiable
필요한 Git/GitHub evidence를 읽을 수 없음
Fail
일부 local/remote operation이 실패했고 적용 상태를 정확히 보고해야 함
Do not claim success for any reply/resolve/review/check state that was not observed.
状态含义
Pass
已通过最新验证确认完成精准rebase及必要推送
Pending
等待独立推送审批
Blocked
身份、权限、语义冲突或环境新鲜度未满足安全要求
Unverifiable
无法读取所需的Git/GitHub验证信息
Fail
部分本地/远程操作失败,需准确报告应用状态
对于未观察到的回复/解决/评审/检查状态,请勿声称操作成功。