docs/book/src/maintainers/pr-workflow.md
The maintainer-side governance contract for PRs targeting master. Branch-protection settings, the DoR/DoD readiness contracts, and the failure-recovery protocol live here. Day-to-day reviewing lives in the Reviewer Playbook. The contributor-facing flow lives in How to contribute.
The workflow exists to keep five things true under high PR volume:
The control loop that delivers this is layered on purpose:
Automation handles intake labels and CI gating. Final merge accountability stays with human maintainers and PR authors.
Branch protection on master:
CI Required Gate..github/workflows/**, require owner approval via CI Required Gate (WORKFLOW_OWNER_LOGINS); keep branch / ruleset bypass limited to org owners.WORKFLOW_OWNER_LOGINS repository variable (see CODEOWNERS for the current list).master directly.Before requesting review, the PR has all of these:
Before merge:
CI Required Gate is green.Every merge:
Squash-merge with full commit history preserved in the body. The squash-merge skill produces both the purple Merged badge and the conventional-commits formatted body — see Skills for invocation.
AI-assisted PRs are welcome. Review can also be agent-assisted.
Required:
Recommended:
We do not require contributors to quantify AI-vs-human line ownership. The diff and the validation evidence carry the load.
For AI-heavy PRs, reviewers focus on:
no-stale reserved for accepted-but-blocked work.For stacked work, require explicit Depends on #... so review order is deterministic.
For replacements, require explicit Supersedes #.... See Superseding PRs for attribution and template rules.
The reviewer-side queue management — backlog pruning order, stale handling, label hygiene — is in Reviewer Playbook.
These paths require stricter review and stronger test evidence:
crates/zeroclaw-runtime/src/security/crates/zeroclaw-runtime/crates/zeroclaw-gateway/ (ingress, authentication, pairing)crates/zeroclaw-tools/ (anything with execution capability).github/workflows/ and the release pipeline.Minimum for risky PRs: threat / risk statement, mitigation notes, rollback steps.
Recommended for high-risk PRs: a focused test proving boundary behavior, plus one explicit failure-mode scenario with expected degradation.
For agent-assisted contributions on these paths, reviewers also verify the author can talk through runtime behavior and blast radius — not just paste validation output.
If a merged PR causes regressions:
master immediately.Prefer fast restoration of service quality over a delayed perfect fix.