Development

/pr-loop

Full PR loop: branch, test, commit, push, PR, review, fix, merge — plus the agent-identity signature required on every GitHub write. Triggers: create PR, finish work, post PR comment, sign a comment, golem-id, Co-Authored-By trailer.

$ golems-cli skills install pr-loop
Golden
100% best pass rate
64 assertions
15 evals
fixtures

Updated 5 days ago

Fleet law: canon #2 owns branch→commit→push→PR→review→merge and PR URL validity. This skill keeps the procedural checklist, review handling, edge cases, and worker-vs-lead merge mechanics.

Loop Endpoint

A lead's endpoint is a merged PR plus cleanup. A worker's endpoint is a ready-for-review PR with review responses addressed and its URL handed to the lead; workers do not merge.

Mechanical enforcement (gen-18 Track 1): parking is now caught by the idle-dwell gate — a finished, approved branch left "awaiting PR approval" is IDLE_SEAT_OPEN_QUEUE. Run /idle-dwell-gate on the terminal turn before ending (bun skills/golem-powers/idle-dwell-gate/scripts/idle-dwell-gate-cli.mjs <transcript|->, exit 3 = FLAG). FLAG ⇒ finish the loop to the authority-appropriate endpoint: MERGED for a lead, or reviewed PR handoff for a worker. Surface the PR number, not a permission question.

Autonomous Agent Mode

If you are running autonomously (no human in the loop), these rules are mandatory:

  1. Never merge with 0 reviews. Wait or invoke bots. No exceptions.
  2. Review wait timer: After invoking reviewers, wait minimum 120s before first check. If no reviews after 5 min, re-invoke. Fifteen minutes with no response does not waive the review gate: a lead may merge only after at least one review and all required comment/review conditions pass; a worker hands off unmerged.
  3. Post to collab with PR number immediately after creation and after worker handoff or lead merge (with test counts).
  4. CRITICAL/HIGH comments require reply before handoff or merge — fix, or explicit "won't fix because X." Zero replies = cannot advance.
  5. Max 3 review rounds. If round 3 still has new non-critical issues, a lead with merge authority may merge and create a follow-up ticket; a worker hands off the reviewed PR with those issues documented. Infinite review loops are worse than shipping with known minor issues.

Hierarchical Worker Mode (gen-12 weave E09)

When a dispatch brief says LEAD owns merge (or "worker endpoint = PR + review responses"):

  • Worker's endpoint = PR opened + review responses addressed — do NOT re-derive MISSION = MERGED or merge locally.
  • Worker stops at: branch → implement → verify → commit → push → PR → invoke reviewers → fix review threads → post TASK_DONE with PR URL.
  • LEAD merges after a clean loop on the worker PR.
  • A worker must hand the reviewed PR to its lead unmerged.

Evidence: two independent re-derivations of the conflict (vlW7#5 "brief explicitly says no merge"; kg-harvest#2).