autopilot
Autopilot
Drive the pull request associated with the current branch to a merge-ready state. Invocation authorizes scoped edits, commits, ordinary pushes to the pull-request branch, review replies, and thread resolution. It does not authorize merging the pull request or changing unrelated code.
If the target pull request cannot be identified unambiguously, ask for its URL or number before changing anything.
Completion contract
Finish only after a new status read proves all three conditions:
- GitHub reports the pull request as mergeable.
- Every required check has passed.
- Every active review thread has been handled and no thread is waiting for a user decision.
Never merge the pull request, enable auto-merge, or convert a draft to ready-for-review. Report readiness and leave those actions to the user.
Control loop
Begin every cycle by querying current pull-request state. Use the available GitHub integration or gh; include mergeability, head and base revisions, required checks, and unresolved review threads. Do not reuse state collected before a push, remote update, or wait.