process: Agents merge their own PRs once checks are green and the review is done
Back to our planType
process
Problem
AGENTS.md and the skills say only the owner merges, and that merging is his approval. On 2026-10-20 the owner said he doesn't want to be involved in merging. Agents should merge once everything is green and the independent review is done. The site has almost no visitors, so a broken deploy is acceptable and gets fixed through a PR. Stack #154 was merged that way, one layer at a time.
The repo still says the opposite, so the next reviewer would flag every agent merge.
Proposed fix
AGENTS.md: the agent that owns a PR merges it (squash) once:- all five required checks pass on its current head
- the independent review's verdict is "Ready to merge"
- every conversation is resolved
Never bypass a rule (
--admin,bypass_rules: true, or anything else).Changes the owner didn't ask for: a policy change he didn't ask for, and anything labeled
needs owner, waits for him.Stacks: merge one layer at a time from the bottom, through GitHub's asynchronous merge API (the only API that merges stacked PRs). Before the next layer, wait for its checks on its rebased head and for the deploy to succeed.
Skills: update
change-workflow(step 6, with the API calls),stacked-prs(hand-off),pr-review(verdict wording) andwrapped(after any merge), plus their Claude Code pointers.Other docs: update
CLAUDE.md,CONTRIBUTING.md,HANDOFF.md, the ops-lead role guide, and the PR Policy log line.
Acceptance criteria
- Not done: No file in the repo (outside historical notes) says only the owner merges or that agents never merge.
- Not done:
change-workflowdocuments the merge call withbypass_rules=falseand the one-layer-at-a-time rule for stacks. - Not done: Policy changes the owner didn't ask for, and
needs owneritems, still wait for him.
Area
ci, tooling
Priority
priority: high
Owner's direction
Summary of the owner's direction (2026-10-20, in the Claude Code session that built stack #177, https://claude.ai/code/session_018QxBC9iJJ7WMFXdBwyhcVY, opens in a new tab): agents should merge as many PRs as they can without involving him, fixing one at a time and merging it rather than waiting for him. He accepted the risk, because the site is in production but has no real traffic yet, and anything that breaks can be fixed.
The "waits for the owner" exceptions (needs owner, and policy changes he didn't ask for) and the rule that a request must be quoted were added by agents as safeguards. They narrow when an agent may merge; they don't widen it.
Generated by Claude Code, opens in a new tab