Agent-design-language pr-finish
Perform truthful closeout for an executed issue by validating the output record, staging the intended paths, creating or updating the draft PR, and stopping before silent merge. Use when bounded issue execution is complete and the next step is reviewable PR publication or update.
git clone https://github.com/danielbaustin/agent-design-language
T=$(mktemp -d) && git clone --depth=1 https://github.com/danielbaustin/agent-design-language "$T" && mkdir -p ~/.claude/skills && cp -r "$T/adl/tools/skills/pr-finish" ~/.claude/skills/danielbaustin-agent-design-language-pr-finish && rm -rf "$T"
adl/tools/skills/pr-finish/SKILL.mdPR Finish
This skill owns the closeout and publication phase of the PR workflow.
Its job is to:
- confirm the issue has completed its bounded execution work
- validate and, when needed, normalize the output record before PR publication
- stage only the intended tracked paths
- ensure the finalized SOR is normalized on the canonical local-only
task-bundle surface without treating it as tracked publication payload.adl - create or update the reviewable PR surface
- emit a structured finish result
- stop before silent merge or issue closure unless explicitly directed
When finish is blocked by output-card truth drift, this skill may invoke
sor-editor for bounded SOR normalization before retrying finish.
This is a procedural execution skill with write side effects.
Current Compatibility Model
Current repo truth:
bootstraps the issuepr-init
determines structural readinesspr-ready
performs the bounded implementation workpr-run
performs truthful closeout and PR publication/updatepr-finish
is auto-attached after publication through the repo hook and monitors the in-flight PRpr-janitor
finalizes the local issue state after merge or intentional closurepr-closeout
Required Inputs
At minimum, gather:
- repository root
- one concrete finish target:
- issue number
- branch
- worktree path
- finish title
- staged path policy or explicit paths
- output card path
Useful additional inputs:
- input card path
- PR mode (
,draft
,update_only
)ready - validation mode
- open/merge policy
Quick Start
- Resolve the concrete issue/branch target.
- Confirm the execution output record is present and truthful.
- Prefer repo-native finish commands:
adl/tools/pr.sh finishadl pr finish
- Validate the declared staged paths and PR metadata.
- Publish or update the draft PR surface.
- Emit a structured finish result and stop.
Workflow
1. Resolve Finish Target
Identify the target using the most concrete available input.
Prefer this order:
- explicit issue number
- explicit worktree path
- explicit branch
If multiple surfaces disagree materially, report
blocked.
2. Validate Finish Preconditions
Before closeout:
- confirm the issue work actually exists on the branch/worktree
- confirm finish is running from the bound issue worktree when the issue branch is checked out in a worktree
- confirm the output record exists and is not still a bootstrap stub
- confirm the output record is finalized before any PR create/update action
- confirm the intended staged paths are explicit or deterministically derived
- confirm validation claims in the output record are truthful
3. Run Finish Through The Repo Control Plane
Prefer repo-native finish commands rather than manual git/PR surgery.
This skill may:
- stage the intended tracked paths
- validate finish/body linkage
- create or update the reviewable draft PR
This skill must not:
- publish from the primary checkout or another checkout when the issue branch is bound elsewhere
- silently widen scope
- silently merge
- silently close the issue
If the repo control plane reports
mismatched_publication_surface, stop and
rerun finish from the bound issue worktree. If it reports
rebind_to_issue_worktree_required, re-establish the issue worktree through the
repo-native lifecycle before attempting publication.
4. Stop Boundary
The normal handoff is to:
pr-janitor
after merge or intentional closure is knownpr-closeout- human review
- explicit merge/closeout direction
Output
Return a concise structured result including:
- target issue
- branch/worktree used
- output-record status
- staged paths
- validation performed
- PR publication/update result
- recommended next step