Service 06

Merge Queue Admission Policy

ALLGREEN. Bot review threads resolved. Zero human approvals. AI-authored code shouldn't wait for humans to click merge — your queue should know that.


The problem

Queues built for humans bottleneck AI-authored code.

The default GitHub queue assumes humans click "Approve" before merge. For a codebase where most commits are AI-authored, that's a queue full of bot-approved bot work waiting for a human nod that signals nothing. The bottleneck isn't review quality — it's the approval ritual.

Remove the human-approval requirement and the queue still needs guarantees. ALLGREEN must mean ALL checks. Thread resolution must mean ALL threads. Plan PRs and code PRs need different policies. The spec must be in git, not in a settings UI.


How it works

Declarative admission policy in spec.yaml; plan-vs-code routing.

The Admission Policy ships as spec.yaml declarations that compile to the GitHub Ruleset API. ALLGREEN means every status check listed as required in spec.yaml must pass. Thread resolution is required by ruleset — bot review threads count. Human approvals are not required.

Plan PRs and code PRs route to different rulesets: plan PRs gate only on plan-level review (a CHIEF ENGINEER reviewer pass on the cycle doc), while code PRs gate on the full CI matrix. The drift detector reconciles spec.yaml against the live ruleset on every PR — and fails closed on drift.

  • ALLGREEN: every required check must pass before queue admission
  • required_review_thread_resolution: true — bots' findings must be resolved
  • required_approving_review_count: 0 — humans don't gate; gates gate
  • Plan-PR vs code-PR routing — plan PRs need only plan-level review, no CI
  • All settings are version-controlled in spec.yaml; drift detector enforces match
spec.yaml — merge admission yaml
rulesets:
  - name: main1
    target_branch: main
    enforcement: enforced
    rules:
      pull_request:
        required_approving_review_count: 0
        required_review_thread_resolution: true
        require_last_push_approval: false
        require_code_owner_review: false
        dismiss_stale_reviews_on_push: false
      required_status_checks:
        required_checks:
          - Agent Critic
          - Cycle Doc Validation
          - Branch Protection Audit
          - Quality Gate
          - Build & Test
        strict_required_status_checks_policy: true  # ALLGREEN

  - name: main-plan-prs
    target_branch: main
    target_pr_label: plan-pr
    rules:
      pull_request:
        required_approving_review_count: 0
        required_review_thread_resolution: true
      required_status_checks:
        required_checks:
          - Cycle Doc Validation       # only plan-level checks

Pricing relevance

Merge Queue Admission Policy ships in every tier. Multi-repo policy templates and fleet-level admission overrides are Business+. Per-org admission analytics are Enterprise.

Open-source posture

spec.yaml format is OSS; the compiler that emits the GitHub Ruleset PATCH is hosted-only (algorithm IP).

Get Started

The merge queue should be code, not a UI checkbox.

Make merge admission a declarative, drift-detected spec. AI-Native Manifesto §9 — Two-Phase Development — as enforcement, not aspiration.