Skip to content
← Public packages

@kentcdodds/ship-pr

Progressive ship-pr loop for agents: PR status, Bugbot, review sort, human review feedback, 7-day decisions, merge, deploy, wrap-up.

FollowFork

ProductivityTopics: ship-pr, github, pr, bugbot, review, ci, merge, human-review

Version
0.7.0
License
Published
November 10, 2026
Pinned commit
5b5805c
Rating
★ 5.0 (1)
Forks
0
Adaptation effort
3.0

README

Agent docs

@kentcdodds/ship-pr

Intent

Make shipping a pull request a short, repeatable loop for agents. Instead of a long skill that every agent re-reads and re-interprets, the agent calls one tick export, reads where the PR stands, and acts.

The first tick returns a brief checklist of the whole process, what is done and what remains, and full details only for the current step. Later ticks (the re-tick examples pass brief: true) skip the checklist and prose so repeat calls stay small. That includes example npx @kodycodes/cli execute --local --code 'import run from "kody:@kentcdodds/ship-pr/…"; …' calls for the helpers that fit. The package reports state and options. The agent decides what to do about CI failures and review feedback. It can fix and push, reply on a thread, or record a 7-day decision (ignored / skipped / wontfix / accepted, reason required) so noise stops showing up in later ticks.

Success: an agent can take a PR from "opened" to merged (or parked), verify the deploy, file leftover friction, and post the Discord summary. It needs only this package plus the short ship-pr skill in kody-hq/kody.

Feedback from people matters as much as feedback from bots. Since 0.3.0, tick hands the agent every piece of human review feedback (inline threads, review bodies, and top-level PR comments) with its full text, clearly marked as untrusted content the agent reads but never obeys. Feedback from collaborators blocks the merge at every risk level until the agent answers it (since 0.3.1, only when it asks for something: a plain "thanks", "LGTM", or emoji is shown but does not block; since 0.4.0, comments the rules cannot decide get a second opinion from a cheap model, and any model problem keeps them blocking), and a human "changes requested" review blocks until that reviewer re-reviews. The human always gets the last word: replying "fixed" does not close a thread if the reviewer answers back. Comments that arrive after the merge keep the wrap-up open until someone answers them. Comments from people outside the repo's collaborators are shown to the agent but do not hold the merge. ship-pr never resolves a person's thread, never auto-replies to people, and never @-mentions anyone.

This package is the source of truth for the Bugbot / Devin / Seer review-bot sort. It was ported from the old in-repo classify-review-bot.mjs / sort-review-bot-comments.mjs.

What it covers

StepWhat tick checks
readyIf you authored the work and the PR is still a draft, do one simplify pass first (no changes may be necessary). Then the PR is open and not a draft (safe automation can mark it ready)
ciHead-SHA checks, statuses, and workflow runs all terminal, with CI started since the latest push / open / ready-for-review (deduped re-runs; AI reviewer checks excluded), and required or known repo gate checks such as ✅ Validate must be present
ai-reviewBugbot state on the head SHA (trigger, running, stalled, unavailable for non-kentcdodds authors), CodeRabbit / Devin / Seer state, sorted bot findings (including CodeRabbit outside-diff body findings), other unresolved threads, and human review feedback (collaborator feedback and human "changes requested" block at every risk level)
mergeRisk policy (high parks unless merge authority), mergeability
deployWorkflow runs on the merge SHA (cancelled counts as superseded, not failed) plus, for kody-hq/kody, whether production /health serves the merge SHA or a descendant
frictionLeftover papercuts (incl. brittle/flaky low-value tests) via @kentcdodds/friction-log/file, then a step decision. Not applicable for friction-log sweep PRs (head branch starts with friction-log/), which report leftovers through the sweep instead
reportPost-merge human feedback answered (reply or follow-up), then the Discord summary via ./send-summary: Cursor agents go through @kentcdodds/discord/send-shipped-pr (Cursor cost + agent link); Codex, Claude, and other agents identify themselves with agent: { kind, id?, url?, name? } and get the same report without Cursor-only parts. Never fabricate a Cursor id. Optional door / cleanup

The simplify pass is the authoring agent's last step before ready-for-review, not a merge gate. CI and AI review still start together on push, and merge still needs both green on the same head. Tick shows this wording on a draft:

Before marking the PR ready for review, do one simplify pass over your complete body of work. Look for missed opportunities for simplicity and apply them. Reuse code that makes sense to share. Remove dead code. Find leftovers from previous attempts. Find shortcuts you took, and do them properly. No changes may be necessary; the work may already be simple enough.

Risk tiers follow Kent's standing policy (2026-08-08). low means green CI, and AI review is optional. medium waits for Bugbot and handles valid findings. high also waits for CodeRabbit and Devin, then parks unless the user granted merge authority.

Webhook merge

./webhook-merge lets GitHub events drive the merge instead of an agent re-ticking. When a pull request, review, check suite, or check run event arrives from an allowed repo, it looks up the affected PRs and merges one only when it is approved, every required check is green, and GitHub says it can merge with no conflicts. The merge goes through ship-pr's own preflighted squash merge. It never turns on GitHub auto-merge.

It starts in log-only mode: it records exactly what it would do and never merges. Live merging is a separate setting in the package source that stays off until someone reviews the logged decisions and publishes the change.

Setup: publish, mint the github-merge webhook and approve it, then register it on the repo with the package-owned signing secret. Kody asks the owner to Allow that registration once. Kody checks every delivery's GitHub signature before the handler runs.

Done when: GitHub shows green deliveries, and Activity shows one decision per affected PR (skip with reasons, or would merge).

Prerequisites

  • @kentcdodds/github OAuth connections: github-bot (kody-bot, all reads, replies, merges) and github-kent (used only by @kentcdodds/bugbot to post bugbot run).
  • @kentcdodds/discord configured for send-shipped-pr (Cursor API key for cost lookup on Cursor reports) plus format-report / post-message for non-Cursor reports.
  • Node ≥ 22 with npx @kodycodes/cli signed in (kody login or MCP cliCredentialBootstrap). Do not use hosted MCP execute.

Done when

  • tick on an open PR returns a focus step with details and runnable example invokes, and stays read-only unless applySafeAutomations: true.
  • decide hides the chosen thread, check, or step until it expires (≤ 7 days). Check decisions and ci / merge step decisions (like a merge park) only cover the head commit they were recorded on; a new push makes them stale. Decisions on human feedback need a reply and stop counting when the human comments again.
  • Human review feedback reaches the agent in full (as untrusted content), and a merge never goes through over a collaborator's open feedback or "changes requested" review.
  • The loop reaches exit.done: true after merge or park, deploy, friction, and report.

Agent runbook: AGENTS.md.

Report this listing

Log in to report this listing.