PR_MAINTAINER_GUIDELINES.md
This is the source of truth for agents triaging, reviewing, landing, closing, or otherwise maintaining pull requests for beads.
Help contributors get to the finish line. Optimize for community throughput.
For every PR, look for the value in it and choose the action that moves useful work into the codebase with the least contributor starvation. If a PR contains something worth keeping, absorb that value directly when practical: accept it as-is, fix bugs, improve the architecture, rename things, turn it into a plugin, cherry-pick parts, or reject the parts that do not fit.
The goal is not to block contributors unnecessarily. The goal is to identify useful work, preserve it, and keep the project moving.
Read engdocs/PROJECT_CHARTER.md when a PR changes Beads' product surface area. Scope boundaries should guide where value lands: core, metadata, integration, plugin, orchestration layer, or external tool.
External contributor PRs have priority. Before implementing related work, opening a competing PR, reviewing or merging any PR, or closing a PR, check whether an existing contributor PR already addresses the same area.
Co-authored-by: and PR references.Every review of a PR — before any verdict, and always before handing it to anything that merges on green — includes a prior-art pass over older open PRs and issues:
scripts/pr-preflight.sh --search "<topic keywords>"
gh search prs --repo gastownhall/beads --state open "<bug keywords>"
The rule at the top of this section always covered implementing, competing, and closing; the missing case was merging: a newer PR under review can itself be the duplicate of an older open contributor PR. Merge automation and per-PR preflight run no duplicate scan — the review is the only gate where prior art can be caught, so the reviewer owns this check.
When an older open PR covers the same change:
Motivating incident (2026-07-26, #4376 vs #4939): a 44-day-old PR whose author had complied with a requested rebase in under 24 hours sat merge-ready for 20 days while a 5-day-old duplicate was reviewed and auto-merged with zero comments ever posted on it. The original author learned their work was dead from the retire notice. Both the review of the newer PR and the queue follow-through on the older one had the information to prevent this; neither used it.
Classify each PR into one of these groups:
Easy wins can be handled automatically during a PR review run and by recurring patrols. Fix-merge candidates can also be handled automatically when the maintainer determines the repair is simple enough to make locally.
Needs-review PRs require a deeper agent review and a concrete report. The maintainer can summarize those reports or inspect the agent sessions directly.
Use these recommendations after review:
main. Use when the remaining issues are safe to repair afterward.Co-authored-by: trailers and PR references, and explain the reason replacement was necessary.Other outcomes are possible, including rerouting a PR to the right project or banning a contributor, but the list above covers the normal cases.
These rules apply to everyone who can merge — human maintainers and agents alike. They exist because a two-month audit of 440 merged PRs (epic bd-6dnrw) found the project's worst defects entered through merges that skipped review, hid their real contents, or overrode an outstanding objection. A merge is an irreversible act of trust; treat it as one.
CHANGES_REQUESTED review. The requested changes must be addressed and the reviewer's objection withdrawn (or explicitly overridden by the project owner, recorded in the thread) before merge. A new approval does not erase a standing change request from someone else.migrations/, the schema, destructive data paths, or the Dolt sync/clone/merge paths requires a filled-out PR template and a real human review before merge — no exceptions, no self-merge, no bot-only approval.main.AGENTS.md.\n sequences. Run scripts/gh-body-lint <body-file> before posting body files; after posting or editing, verify the rendered body with gh pr view --comments --json comments --jq ... before moving on.Do not ask a contributor to rebase when that is the only thing left. If the review verdict is "correct once rebased," the verdict is fix-merge: check out the PR branch, rebase and resolve conflicts ourselves, push back to the contributor's branch (maintainer edits), and take it to merge — in the same session.
Why: a requested rebase multiplies across everything a contributor has open — each of their branches must then be rebased independently against different lines of our work, so the cost lands heaviest on the most prolific contributors. And a rebase we request but then sit on is pure contributor cost: on #4376 the author rebased within 24 hours of the request and then waited 20 days for a maintainer action that never came.