Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
watch-pr【部署与运维】Watch an Elixir/Phoenix PR with an Amp Orb keep-alive lease until required non-deployment CI is green and review threads are resolved. Use after opening or updating a PR.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use the elixir_phoenix_watch_pr plugin tool. Do not launch gh pr checks --watch, gh run watch, a foreground sleep loop, or the copied Claude watcher
script: none of those owns an Amp Orb keep-alive lease.
excludedChecks; they are
never counted as passing or failing required CI.--fix authorize neither action.--fix uses the same worker thread — the plugin serializes one concise
event turn at a time and directs that turn to the installed phx-pr-review
workflow for actionable review feedback or failed required CI. Validate the
cause before editing.Parse the PR number/URL and flags, then call:
elixir_phoenix_watch_pr {
"action": "start",
"pr": "<number-or-url>",
"checksOnly": false,
"fix": false
}
Map --checks-only and --fix to booleans. Map --max-hours,
--quiet-minutes, and --poll-seconds to maxDurationHours,
quietPeriodMinutes, and pollIntervalSeconds. Defaults are 2 hours maximum,
15 minutes quiet, and 60 seconds polling. Report the tool's initial snapshot
and then stop taking turns; the plugin wakes this thread only for actionable
failures or feedback and terminal outcomes.
--fix, unresolved feedback explicitly loads phx-pr-review; required
CI failures include check names and links. Re-fetch threads or inspect logs,
fix only valid branch-owned causes, verify, push the authorized PR branch
update, reply, and resolve where appropriate. Do not blindly rerun shared CI.Use the same tool with "action": "status" or "action": "stop". Stop is
idempotent and releases the lease; it does not delete durable history.
The plugin registers an optional durable Amp webhook and stores its bearer URL in the owner-only credential file reported by the tool. If a repository administrator configures GitHub to send PR review/check events to that URL, a later event can wake the paused Orb and probe the authoritative PR state. Webhook events must identify the exact watched PR number or current watched head SHA; empty or unrelated repository events are ignored.
The plugin never changes GitHub webhook settings. Without that external setup, polling ends after the quiet period and a later human comment cannot wake a paused Orb. Say this explicitly; do not imply polling continues after lease release.
references/watcher-mechanics.md — lease, durability, filtering, webhook,
and billing behavior