tk-github-image-upload-to-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitHub PR Image Upload

GitHub PR Image Upload

Start only when the user selects
/tk-github-image-upload-to-pr
or
$tk-github-image-upload-to-pr
, explicitly requests local image evidence for an existing GitHub PR, or an active
tk-pr-open
sends an exact handoff with
evidence_required: true
. Only the parent handoff is an automatic trigger. Do not activate for screenshot capture, generic GitHub help, PR creation, PR review, or issue triage. route 선택이나 설치 전 확인이 필요하면 host별 native structured question surface를 우선 사용합니다 (Claude Code: AskUserQuestion; Codex: request_user_input; Hermes: clarify). unavailable하면 같은 선택을 plain chat으로 fallback하고 선택 전 mutation을 하지 않습니다.
仅当用户选择
/tk-github-image-upload-to-pr
$tk-github-image-upload-to-pr
、明确请求为现有GitHub PR上传本地图片证据,或活跃的
tk-pr-open
发送带有
evidence_required: true
的精准交接时,才启动流程。仅父级交接为自动触发条件。请勿针对截图捕获、通用GitHub帮助、PR创建、PR评审或问题分类激活流程。 若需要选择路由或安装前确认,请优先使用各宿主对应的原生结构化提问界面(Claude Code:AskUserQuestion;Codex:request_user_input;Hermes:clarify)。若该界面不可用,则降级为普通聊天进行同样选择,且在选择前不进行变更操作。

Scope

Scope

Handle one bounded upload: validate and stage local images, upload repository-scoped GitHub attachments, minimally update the PR body or selected comment, and verify source/render output. The default target is the PR body.
For
tk-pr-open
, accept only producer evidence handoffs from
tk-browser-verify
or
tk-prototype
with
evidence_required: true
. If required evidence is missing or invalid, mark the evidence handoff
Blocked
; do not revert an already-created
tk-pr-open
PR.
Use references/gh-attach.md to classify and run the extension route. Read references/cdp-fallback.md only after CDP is selected or the extension route cannot use target write capability. Use
tk-browser-verify
for browser-controlled runtime verification.
处理单次限定上传:验证并暂存本地图片,上传仓库级GitHub附件,最小化更新PR正文或选定评论,并验证源内容/渲染输出。默认目标为PR正文。
对于
tk-pr-open
,仅接受来自
tk-browser-verify
tk-prototype
且带有
evidence_required: true
的生产者证据交接。若所需证据缺失或无效,标记证据交接为
Blocked
;请勿撤销已创建的
tk-pr-open
PR。
使用references/gh-attach.md分类并运行扩展路由。仅在选择CDP或扩展路由无法使用目标写入能力时,才阅读references/cdp-fallback.md。使用
tk-browser-verify
进行浏览器控制的运行时验证。

🔴 CHECKPOINT · 🛑 STOP · Upload mutation boundary

🔴 CHECKPOINT · 🛑 STOP · Upload mutation boundary

Before any upload or PR body/comment update, reverify the explicitly selected target, valid local evidence or producer handoff, authenticated route, and requested write scope; stop as
Blocked
or
Unverifiable
when those preconditions cannot be established.
在进行任何上传或PR正文/评论更新前,重新验证明确选定的目标、有效的本地证据或生产者交接、已认证的路由及请求的写入范围;当这些前置条件无法满足时,终止流程并标记为
Blocked
Unverifiable

Workflow

Workflow

  1. Confirm
    origin
    , the current PR, and the executing repository from regular local image file(s) or a valid producer evidence handoff. Read the existing PR body.
  2. Reuse the existing
    ## 스크린샷
    heading. If absent, insert it before the AI footer or append it at the end. Preserve unrelated body content.
  3. Select and execute an eligible route using gh-attach, or read CDP fallback only after CDP is selected. Repository visibility is not a routing signal, and a route that may have created remote state cannot silently fall back to the other route.
  4. Update only the requested body or comment through the GitHub API or equivalent. Before
    Pass
    , verify the source Markdown, rendered HTML/page evidence, every asset link, and the upload ref.
  5. Remove only owned staging files on every exit path.
  1. 从常规本地图片文件或有效的生产者证据交接中确认
    origin
    、当前PR及执行仓库。读取现有PR正文。
  2. 复用现有的
    ## 스크린샷
    (截图)标题。若不存在,则在AI页脚前插入或追加至末尾。保留无关的正文内容。
  3. 使用gh-attach选择并执行符合条件的路由,或仅在选择CDP后阅读CDP fallback。仓库可见性不是路由选择信号,且可能已创建远程状态的路由不得静默降级为其他路由。
  4. 通过GitHub API或等效工具仅更新请求的正文或评论。在标记为
    Pass
    前,验证源Markdown、渲染的HTML/页面证据、每个资产链接及上传引用。
  5. 在所有退出路径中仅移除归属于本流程的暂存文件。

실행 receipt · 단일 근거 record

执行回执·单一依据记录

모든 업로드 시도는 아래 하나의 receipt로 남깁니다. 이는 별도 생명주기 출력이 아니라
## GitHub image upload
결과와 승인/검증 판단에 쓰는 단일 근거 기록입니다. 값이 없으면
none
또는
unavailable
로 명시하고 추측하지 않습니다.
text
Repository: <owner>/<repo>
PR / Target: <pr-number> / body | existing comment <comment-id>
Source images: <absolute path list>
Route: gh-attach | CDP
Entry: <exact reviewed command | browser route>
Generated Markdown: <asset refs | none>
Remote ref: <refs/uploads/issues/<pr-number> | none | unknown>
Verification: <source body/comment | rendered HTML/page | unavailable>
Changed: <body/comment changed | unchanged | unknown>
Cleanup: <owned staging path removed | failed | not applicable>
Status: Pass | Fail | Pending | Blocked | Unverifiable
所有上传尝试都将留下以下一份回执。这并非独立的生命周期输出,而是用于
## GitHub image upload
结果及审批/验证判断的单一依据记录。若无对应值,请明确标记为
none
unavailable
,不得猜测。
text
Repository: <owner>/<repo>
PR / Target: <pr-number> / body | existing comment <comment-id>
Source images: <absolute path list>
Route: gh-attach | CDP
Entry: <exact reviewed command | browser route>
Generated Markdown: <asset refs | none>
Remote ref: <refs/uploads/issues/<pr-number> | none | unknown>
Verification: <source body/comment | rendered HTML/page | unavailable>
Changed: <body/comment changed | unchanged | unknown>
Cleanup: <owned staging path removed | failed | not applicable>
Status: Pass | Fail | Pending | Blocked | Unverifiable

생산자 근거 인계(생산자 증거 인계)

生产者证据交接

evidence_required: true
이면 다음을 요구합니다.
  • producer
    tk-browser-verify
    또는
    tk-prototype
    중 하나여야 합니다.
  • 각 산출물은 비어 있지 않은 이미지, 절대 경로, 실행 소유 근거 디렉터리를 포함해야 합니다.
  • 각 image를 inspected 상태로 두고 criterion 또는 caption을 보존합니다.
  • tk-browser-verify
    산출물은
    Pass
    결과에서 나와야 합니다.
  • tk-prototype
    산출물은 테스트된 스크린샷 경로와 실제 이미지 검사을 포함해야 하며 공식 런타임 판정를 주장하지 않습니다.
임의 screenshot, 누락된 경로,
Unverifiable
결과 및 현재 실행에 연결되지 않은 산출물은 거부합니다. 필수 근거가 없거나 유효하지 않으면 업로드 전에
Blocked
를 반환합니다.
evidence_required: true
,则需满足以下要求:
  • producer
    必须为
    tk-browser-verify
    tk-prototype
    之一。
  • 每个产出物必须包含非空图片、绝对路径及执行归属依据目录。
  • 将每个image保持为inspected状态,并保留判定标准或说明文字。
  • tk-browser-verify
    产出物必须来自
    Pass
    结果。
  • tk-prototype
    产出物必须包含测试过的截图路径及实际图片检查,不得主张正式运行时判定。
拒绝任意截图、缺失路径、
Unverifiable
结果及与当前执行无关的产出物。若缺少必要证据或证据无效,在上传前返回
Blocked

Prohibitions

Prohibitions

  • Do not create or merge a PR, change reviewers, publish a release, or insert a comment unless the user explicitly selected that comment target.
  • Do not bypass
    tk-browser-verify
    or use Orca or screen control as an automatic browser fallback.
  • Do not overwrite a pre-existing draft or click comment, close-with-comment, or any other submit button.
  • Do not choose a route based on public/private visibility or claim success from only a placeholder, Markdown presence, fixed delay, or unrendered API response.
  • Do not log or return a signed URL JWT or query string.
  • 除非用户明确选定评论目标,否则不得创建或合并PR、更改评审人、发布版本或插入评论。
  • 不得绕过
    tk-browser-verify
    ,或自动将Orca或屏幕控制作为浏览器降级方案。
  • 不得覆盖预先存在的草稿或点击评论、附带评论关闭或任何其他提交按钮。
  • 不得基于公开/私有可见性选择路由,或仅通过占位符、Markdown存在、固定延迟或未渲染的API响应宣称成功。
  • 不得记录或返回签名URL JWT或查询字符串。

Failure Handling

Failure Handling

Return
Pending
while waiting for an absent-extension or unreviewed-upstream choice. Return
Blocked
for
unknown
provenance, a draft, or a rejected installation without a selected CDP route. Return
Unverifiable
if neither route has authentication or render evidence, and
Fail
for upload, remote ref verification, or cleanup errors. State whether the selected body/comment changed and whether an upload ref may remain.
For
tk-pr-open
, preserve the separate PR operation result and return the evidence state as
uploaded
or
blocked
. While required evidence remains blocked, the parent cannot claim full completion.
在等待缺失的扩展或未审核的上游选择时返回
Pending
。对于
unknown
来源、草稿或未选择CDP路由的被拒安装,返回
Blocked
。若两个路由均无认证或渲染证据,返回
Unverifiable
;若出现上传、远程引用验证或清理错误,返回
Fail
。说明选定的正文/评论是否已更改,以及上传引用是否可能残留。
对于
tk-pr-open
,保留独立的PR操作结果,并将证据状态返回为
uploaded
blocked
。当所需证据仍处于
blocked
状态时,父级流程不得宣称完全完成。

결과

结果

terminal 응답은
## GitHub image upload
로 시작합니다. 해당하는 경우
## Uploaded
,
## Verification
## Cleanup
을 포함합니다. 결과를 소유하는 section의 끝에는 정확히 하나의
Status: Pass|Fail|Pending|Blocked|Unverifiable
줄을 둡니다. 안전할 때만 asset URL을 노출하고 서명된 매개변수는 redact합니다.
终端响应以
## GitHub image upload
开头。如有必要,可包含
## Uploaded
## Verification
## Cleanup
部分。在结果所属章节的末尾,必须准确添加一行
Status: Pass|Fail|Pending|Blocked|Unverifiable
。仅在安全情况下暴露资产URL,对签名参数进行脱敏处理。