deliver-pr
Deliver one change end to end as a single pull request — clarify → plan → implement → simplify → review → validate → open-pr — resuming from wherever it left off. Use to take a task from intent to an open, mergeable PR with each phase run as a focused sub-agent. This is the default workflow the binary launches when you create a new project (`relay "<task>"`).
ronaknnathani · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add ronaknnathani/relay --skill deliver-pr技能说明
name: deliver-pr
description: Deliver one change end to end as a single pull request — clarify → plan → implement → simplify → review → validate → open-pr — resuming from wherever it left off. Use to take a task from intent to an open, mergeable PR with each phase run as a focused sub-agent. This is the default workflow the binary launches when you create a new project (relay "<task>").
Deliver PR
Drive one change from a task to an open PR by orchestrating the foundation skills, one phase at a time, with durable resumable state. You are a router, not a worker: you read state, dispatch the next phase as a sub-agent, record the result, and move on. You do not do the phase work yourself, and you stay context-light — you read digests and state, never file dumps.
Session goal
In every agent harness, set /goal to the user's requested outcome. The deliver-pr workflow is the
execution method, not the goal. Keep task.md, requirements, and relay state as the durable
definition and progress record across resumes.
Managed assignment — before state routing
Bind the invocation argument to $SLUG, then check
$HOME/.relay/projects/active/$SLUG/assignment.md. If it exists, read it completely before asking
relay state for the next phase. This is a managed program worker: the assignment's contracts and
escalation commands are binding, while the worker still owns independent clarify and plan work.
Bind the exact Program: and Work item: values from the assignment to $PROGRAM and $ITEM, then
run and read:
relay program message inbox <program> <item> --json
Use the exact program and item from the assignment in place of the placeholders. Act on every unread decision, feedback, or instruction before state routing. Acknowledge each message only after its requested action or resulting state/artifact update is durable:
relay program message ack <program> <item> <inbox-id>
An open-PR grant instruction is the exception: keep it unread until open-pr succeeds and the PR is
recorded. If open-pr fails, do not acknowledge the grant.
A feedback message about a change the CEO asked for on your open pull request is work, not review
chatter: make the change on the branch and pull request you already have. Never open a second pull
request for this item and never start unrelated work from it. Acknowledge it once the change is
pushed.
After your pull request merges, the tech lead retires this session: it stops the pull request watcher
and sends /exit. Exiting on /exit is the expected end of a managed run, so leave nothing
uncommitted you still need — the child worktree is force-removed once the session is gone.
Herdr notification is only a payload-free doorbell and may be lost, so this inbox check is mandatory
even when no prompt arrived. Managed child sessions always run under Herdr: if relay resume reports
a Herdr readiness failure, report its exact setup or start instructions and stop instead of working
outside Herdr. If assignment.md does not exist, this is a standalone project: follow the standalone
path below exactly as before, with no Herdr requirement.
Resume-first — always start here
<slug> is the argument this skill was invoked with — bind it to $SLUG before anything else. Every
invocation (first run or resume) then begins by asking the binary where this run is. State is owned by
relay state; never hand-edit it.
PHASE=$(relay state next "$SLUG" 2>/dev/null)
if [ $? -ne 0 ]; then # no state yet → first run: initialize, then ask again
relay state init "$SLUG" --workflow deliver-pr \
--phases "clarify,plan,implement,simplify,review,validate,open-pr"
PHASE=$(relay state next "$SLUG")
fi
Never assume a fresh start: an interrupted run returns its in-progress phase and continues it. When
relay state next prints empty, every phase is done — go to Done.
The phase pipeline
Each phase is a foundation skill. Run the one relay state next reports, in this order:
| Phase | Skill | Consumes | Produces |
|---|---|---|---|
| clarify | clarify | the task | requirements + acceptance criteria |
| plan | plan | requirements | a blueprint + phased build sequence |
| implement | implement | the plan | code + tests, green (commits as it goes) |
| simplify | simplify | the diff | a cleaner diff, behavior unchanged |
| review | review (report mode) | the diff + criteria | a severity-ranked findings report |
| validate | validate | the diff + criteria | a pass verdict on the repo's gates |
| open-pr | open-pr | the committed branch | an open PR |
Per-phase loop (the router contract)
For the phase relay state next reported:
- For a managed assignment, run and process
relay program message inbox <program> <item> --jsonagain at the top of every loop. Use the exact program and item fromassignment.md, and acknowledge each message only after its action is durable. - If
PHASEisopen-prand this is a managed assignment:- Inspect
relay program message outbox <program> <item> --json. If an unreadpr-openrequest exists and no grant-approved inbox instruction exists, stop without sending another request. - If neither a request nor grant-approved instruction exists, send exactly one
pr-openmessage using the assignment's command and stop. - Only after reading the tech lead's grant-approved inbox instruction, leave that message unread and
run
the exact
relay program can-open-pr <program> <item>command fromassignment.md. If it fails, keepopen-prpending and stop. If it passes, continue to theopen-prphase. - If a previously recorded pull request was closed without merging, Relay clears the stale reference
during
program tick. Request a freshpr-opengrant and open a replacement pull request through the same gate; never reopen or reuse the closed reference yourself.
- Inspect
- `relay state set