ワンクリックで
relay-merge
Merge a reviewed PR, clean up worktree/branch, and close GitHub issues. Use after relay-review returns LGTM.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Merge a reviewed PR, clean up worktree/branch, and close GitHub issues. Use after relay-review returns LGTM.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | relay-merge |
| argument-hint | [run-id or PR-number] |
| description | Merge a reviewed PR, clean up worktree/branch, and close GitHub issues. Use after relay-review returns LGTM. |
| compatibility | Requires gh CLI and git. |
| metadata | {"related-skills":"relay, relay-ready, relay-plan, relay-dispatch, relay-review, dev-backlog","keywords":"머지, 병합, merge, finalize, cleanup"} |
RELAY_SKILL_ROOT defaults to skills.${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/gate-check.js, ${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/finalize-run.js, ${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/append-learnings.js.relay-review returns LGTM/passrelay-reviewrelay-dispatchrelay-planrelay-readyExplicitly merge a ready-to-merge PR and close the loop. Requires relay-review PR comment.
node "${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/gate-check.js" $PR_NUM
Intentional skip (hotfix, manual PR, trivial change):
node "${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/gate-check.js" $PR_NUM --skip "reason here"
This writes a <!-- relay-review-skip --> comment to the PR — maintaining audit trail even when review is bypassed. The skip reason is recorded on the PR for future reference.
gate-check.js --skip does not invoke any executor or reviewer, so it does not consume manifest model_hints.
Do NOT merge without running gate-check. This is the audit trail that review actually happened (or was intentionally skipped with documented reason).
RUN_ID=<run-id-from-dispatch>
node "${RELAY_SKILL_ROOT:-skills}/relay-merge/scripts/finalize-run.js" --repo . --run-id "$RUN_ID" --merge-method squash --json
This script:
review.last_reviewed_sha is stale for the current HEADMERGEDmergedgit worktree prunecleanup.status in the manifestIf the retained worktree is dirty, merge still succeeds but cleanup is recorded as failed and the manifest moves to next_action=manual_cleanup_required.
After the merge is confirmed, finalize-run.js invokes append-learnings.js to record a one-line learning in the target repo's spec/capabilities.md. Learning failures are recorded under result.learnings and never block cleanup. No-op/fail-loud conditions and durability semantics: references/append-learnings.md.
Emergency, force-finalize, and bootstrap reconciliation paths: see references/operator-emergencies.md.
Sprint-close repeated-quality reporting: see references/sprint-close-report.md.
If backlog/sprints/ has an active sprint file, update it. If no sprint file exists, skip this step.
Plan section — mark completed (was [~] during review):
- [x] #38 OAuth2 flow → PR #87 (merged)
Progress section — structured log entry with review round count:
- 2026-03-25 10:50: #38 dispatched → PR #87 → reviewed (LGTM, round 1) → merged
Running Context section — capture learnings for remaining tasks:
- OAuth2: PKCE flow using jose library. Tokens in httpOnly cookies.
gh issue create --title "Follow-up: ..." --body "..."
Task file cleanup (move to backlog/completed/) happens at sprint end, not per-issue. Sprint checkbox states are [ ] not started → [~] reviewing → [x] merged, exactly as shown in the section 2 examples; sprint-file semantics belong to dev-backlog.
Dispatch implementation tasks via worktree isolation. Use when delegating work to an executor, running background dispatches, or parallelizing independent tasks.
Use when completed relay executor work needs independent review against frozen Done Criteria — internal pre-publication rounds or post-publication PR rounds.
Drive already-planned relay leaves through fan-out, review, serial merge, crash recovery, and fleet status.
Interactive setup for relay routes. Use when the user asks to set up relay, configure company/personal relay routing, enable OpenCode or Pi, resolve model names, add provider/model routes, check advisory-review routing, or run relay-config doctor/check.
Use when a GitHub issue, sprint item, task description, or natural-language handoff should be implemented through autonomous executor dispatch; stops at ready_to_merge — merge only on explicit request.
Use when a relay run needs its review anchor, scored rubric, or dispatch prompt — always before relay-dispatch, whether AC are explicit, vague, or missing.