Autorun
How `roark auto` selects issues and opens pull requests.
Last updated
roark auto --repo owner/repo --limit 1#Flow
- List open GitHub issues.
- Select issues with the ready label and no skip labels.
- Claim one issue by assigning the actor, applying the in-progress label, and posting a claim comment.
- Prepare the managed workspace and issue branch.
- Fetch issue context and dependency metadata.
- Run triage, planning, implementation, review, fix passes, and readiness.
- Apply the readiness gate.
- Run the verification gate.
- If verification fails and fix attempts remain, run another fix, refinement, Review A/B, and readiness pass, then rerun verification.
- On success, commit code changes and push the branch.
- Draft the PR from the run artifacts, changed-file list, and verification result. Save it as
pr-draft.jsonandpr-draft.md, then open the PR withgh. - Publish any follow-up issues and add their links to the PR body.
- Run
review-pragainst the opened PR and post the correctness and maintainability reviews. - If the run cannot be repaired within the fix budget, leave the work uncommitted and post recovery information.
The automatic review happens after publication. If it fails or the PR changes while it is running, the PR stays open and the review artifacts remain local. Retry with roark review-pr <number>.
#Running safely
Start with --limit 1. Each invocation runs once; use cron, launchd, GitHub Actions, or another scheduler for repeated runs.
#Selection labels
The default ready label is ready-for-agent. The default skip set includes intake, paused, terminal, and lifecycle states such as needs-triage, needs-human, agent-in-progress, agent-failed, and agent-pr-opened.
See Label semantics for the full label reference.
#What autorun does not do
Autorun does not merge PRs or close issues.
#Commands
Preview selection:
roark auto --repo owner/repo --limit 1 --dry-runTarget one issue through the autorun path:
roark auto 123 --repo owner/repoInspect status after a background run:
roark status 123 --repo owner/repo