arbiterforge/finishing-a-development-branch
The terminal step of /feature and /sprint. Routed to once commit-gate has cleared, to decide the branch's fate — merge via PR, open a PR, or discard. Direct merge to the default branch is forbidden; every change lands through a PR. Under /sprint the skill auto-selects "open PR" and surfaces the merge decision to the user.
npx skills add https://github.com/arbiterForge/codeArbiter --skill finishing-a-development-branch
The work is committed and green. Now decide where it goes. Routed to by /feature and /sprint
after commit-gate clears — never before.
Read these, or STOP and surface the gap — never guess the branch name or the default branch:
{{PROJECT_DIR}}/.codearbiter/CONTEXT.md — the default-branch name and project context.{{PROJECT_DIR}}/.codearbiter/plans/<slug>.md — the plan this branch executed, when /feature or /sprint produced one. The yardstick for "is the work complete."{{PROJECT_DIR}}/.codearbiter/last-checkpoint — the most recent gate results; confirms commit-gate cleared on this branch.commit-gate MUST have cleared on the current HEAD. If it has not, this skill does not run — return to it.
Assemble the facts the decision needs. Nothing is presented until all are in hand:
commit-gate outcome and the last-checkpoint record. Surface any open [NEEDS-TRIAGE] markers left in the diff as out-of-scope findings.Gate: branch confirmed non-default, diff summary read, gate results and plan delta in hand.
Present exactly three terminal options with the Phase 1 state attached, then STOP for the choice:
Under /feature: STOP and let the user pick.
Under /sprint: auto-select option 1 (open PR) and surface the merge decision to the user — /sprint
autonomy ends at the PR boundary. It MUST NOT merge (option 2) and MUST NOT discard.
Gate: a single terminal option is chosen — by the user under /feature, or auto-selected as "open PR" under /sprint.
Carry out the chosen option, and only that one:
{{CMD:pr}} command flow ({{PLUGIN_ROOT}}/commands/pr.md) — execute those steps here; do not re-invoke {{CMD:pr}} (under /sprint this skill is reached via commit-gate, without the /pr command ever running, so a route back would loop). Leave the PR open; the merge is not yours to take.Gate: the chosen option completed — for open-PR a PR exists against the default branch; for merge the work landed through that PR; for discard the user confirmed against a stated loss summary.
The loop has been a chain of gates the user watched clear. End it on its most rewarding beat, not in
silence. Emit a tight Receipt — a win summary that reflects the prevention back, drawn ONLY from
the state Phase 1 already assembled plus {{PROJECT_DIR}}/.codearbiter/last-checkpoint. This is
not a fresh audit-trail crawl — no new log scan, no git archaeology. If a field has no data in
hand, omit the line rather than go digging.
Report only what the assembled state supports:
tdd obligations that reached COVERED on this branch.specific thing caught (an untested seam, a scope-creep file set aside), not a bare gate name.
stopped before they shipped.
Close with exactly one warm, synthesizing sentence (per the orchestrator register) that reflects
the run back — synthesized for this branch, not the register's canned example. One sentence, earned,
never on a no-op close.
Gate: the Receipt is emitted from in-hand state (no fresh crawl), and the close carries at most one
warm sentence.
/sprint; auto-select "open PR" and surface the merge decision to the user.commit-gate has cleared on the current HEAD.CONTEXT.md or STOP.last-checkpoint — never a fresh audit-trail crawl — and never build a rolling cross-branch "saves" tally.Take arbiterforge/finishing-a-development-branch from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.