Agent team

Merge policy

The orchestrator may merge a PR, never its author, when all of these hold (merge in botgumi.config.ts):

  1. The PR's tier is in merge.auto (default ["low"]; add "mid" once you trust it). An unlabelled PR never auto-merges.
  2. Every required status check is success, including each chosen platform's CI: ios-ci, which the local ios/scripts/ci.sh posts through gh api, and android-ci, which the Android GitHub workflow reports.
  3. The reviewer's botgumi/review status is success, with zero blocking findings. A status is used, not a GitHub approval, because one identity cannot approve its own PR.
  4. No path in merge.protectedPaths is touched. Defaults: the API contract (docs/api/**), DB migrations, auth and payments code, CI config (.github/**, ios/scripts/ci.sh, android/scripts/ci.sh), AGENTS.md, CLAUDE.md, .claude/**, botgumi.config.ts, and secrets and env files.
  5. The diff (lines added plus removed) is under merge.maxLines (default 400).
  6. The PR is not a gate.

Every other PR waits for a human.

After a bot merge

  • Watch for merge.watchMinutes (default 60). If the deploy smoke check fails, or Sentry shows a new spike, open a revert PR and tell the human.
  • List every bot merge in the daily digest.

The policy is decideMerge and watchAfterMerge in @botgumi/runner (stubs for now).