---
name: factory-verify-and-merge
description: Verify a green pull request against its ticket and required checks, then leave the merge to a human; never merge drafts or bypass branch rules. Use when a factory pull request looks ready and someone needs to know whether a human can merge it.
license: MIT
---

# Factory verify and merge

Check that a pull request is ready, and record the result for the human who merges it. This skill never merges.

## Fail closed

Anything you cannot confirm counts as a failure: missing data, an unreadable log, a check still running, or a reviewer result for a different commit. Stop and report. Do not assume.

## Verify

Work through every step, in order. Stop at the first failure and report it.

1. **Not a draft.** A draft pull request is not ready, whatever its checks say.
2. **Scope matches the ticket.** Read the diff. Every changed file traces back to the ticket. Anything else is a failure.
3. **Required checks are success.** Every required CI check on the head commit has the result success. Pending, skipped, neutral, cancelled or failed is not success.
4. **Reviewer PASS on the exact head, for runtime changes.** If the change touches code that runs, not only docs or copy, a reviewer PASS must be logged for the exact head SHA. A PASS on an earlier commit does not count.
5. **A FAIL stays a FAIL.** A reviewer FAIL on the head never becomes a merge: not by re-running until green, not by an override, not by asking another reviewer until one passes it.
6. **Branch rules apply.** Do not bypass branch protection, required reviews or required checks, and do not use admin overrides.
7. **Human gates apply.** If the change moves money, publishes something or changes production, mark it in the record. That merge waits for the human who owns that gate.

## Record

When every step passes, record:

```text
Repository:   <owner/repo>
Pull request: <number>
Head SHA:     <full SHA>
Checks:       <required checks, all success>
Reviewer:     <PASS on the head SHA, or "not needed: docs or copy only">
Human gate:   <money, publish, production, or none>
Merge:        still to be done by a human
```

Then hand it to the human. They merge, or they do not.

## Never

- Merge from this skill, or set up an unattended or automatic merge.
- Merge a draft.
- Bypass branch protection.
