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
sends an exact handoff with
. 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을 하지 않습니다.
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
, accept only producer evidence handoffs from
or
with
. If required evidence is missing
or invalid, mark the evidence handoff
; do not revert an already-created
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
for browser-controlled runtime verification.
🔴 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
or
when those preconditions cannot be established.
Workflow
- Confirm , the current PR, and the executing repository from regular
local image file(s) or a valid producer evidence handoff. Read the existing PR
body.
- Reuse the existing heading. If absent, insert it before the AI
footer or append it at the end. Preserve unrelated body content.
- 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.
- Update only the requested body or comment through the GitHub API or equivalent.
Before , verify the source Markdown, rendered HTML/page evidence, every
asset link, and the upload ref.
- Remove only owned staging files on every exit path.
실행 receipt · 단일 근거 record
모든 업로드 시도는 아래 하나의 receipt로 남깁니다. 이는 별도 생명주기
출력이 아니라
결과와 승인/검증 판단에
쓰는 단일 근거 기록입니다. 값이 없으면
또는
로
명시하고 추측하지 않습니다.
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
생산자 근거 인계(생산자 증거 인계)
- 는 또는 중 하나여야 합니다.
- 각 산출물은 비어 있지 않은 이미지, 절대 경로, 실행 소유 근거 디렉터리를
포함해야 합니다.
- 각 image를 inspected 상태로 두고 criterion 또는 caption을 보존합니다.
- 산출물은 결과에서 나와야 합니다.
- 산출물은 테스트된 스크린샷 경로와 실제 이미지 검사을
포함해야 하며 공식 런타임 판정를 주장하지 않습니다.
임의 screenshot, 누락된 경로,
결과 및 현재 실행에 연결되지
않은 산출물은 거부합니다. 필수 근거가 없거나 유효하지 않으면
업로드 전에
를 반환합니다.
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 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.
Failure Handling
Return
while waiting for an absent-extension or unreviewed-upstream
choice. Return
for
provenance, a draft, or a rejected
installation without a selected CDP route. Return
if neither route
has authentication or render evidence, and
for upload, remote ref
verification, or cleanup errors. State whether the selected body/comment changed
and whether an upload ref may remain.
For
, preserve the separate PR operation result and return the
evidence state as
or
. While required evidence remains
blocked, the parent cannot claim full completion.
결과
terminal 응답은
로 시작합니다. 해당하는 경우
,
및
을 포함합니다. 결과를 소유하는 section의 끝에는 정확히 하나의
Status: Pass|Fail|Pending|Blocked|Unverifiable
줄을 둡니다. 안전할 때만 asset URL을
노출하고 서명된 매개변수는 redact합니다.