> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Lifecycle and checks

> From a local commit to develop: what happens in each PR state, which checks each branch requires and what consumes runner minutes.

![Local and free: branch, commits with commitlint, pre-push hook. GitHub with minutes: draft without CI, pr-check and initiatives:review, ready for review with CI and AI reviews, human review with one-push rounds, Danibot approval, merge queue and develop.](https://mintcdn.com/bbrands/HbBhTZK1FiD1UtlY/images/bbrands-lab/pr-lifecycle.svg?fit=max\&auto=format\&n=HbBhTZK1FiD1UtlY\&q=85\&s=29cd5bffa7f099aff467a381dda277e7)

Lifecycle of a PR to develop

## States

| State | What runs | Consumes minutes |
| - | - | - |
| **Local** | `commit-msg` hook (commitlint) and `pre-push` hook: Biome, types and tests with coverage for the affected projects, `docs:check`, initiative policy, `ci:guards` | No |
| **Draft** | CI runs no jobs (**CI OK** shows green because it is skipped). Initiative Check, labeling and title validation run. The AI reviews are skipped | A little |
| **Ready for review** | Full CI for the affected projects, `Code review (AI)`, `Initiative review (AI)`, Review gate, title validation and Danibot | Yes: around 40 jobs per push |
| **Merge queue** | CI runs again on the exact merge result. The other checks pass on their own | Yes |
| **Merged** | Squash into `develop`; the branch is deleted automatically | — |

> [!TIP]
>
> A draft PR does not get Danibot's approval and cannot be merged, even though **CI OK** shows
> green: the merge queue runs CI again before merging.

## Required checks per branch

| Target branch | Required checks | Review | Merge |
| - | - | - | - |
| `develop` | **CI OK**, **Initiative declared**, **Merge gate**, **Review gate**, **Validate PR Title** | 1 approval, code owner, approval dismissed on every new push, last push approved, threads resolved | Merge queue with **squash** (1 to 5 entries) |
| `release` | **CI OK**, **Review gate**, **Validate PR Title** | The same rules | Queue with **merge commit**, one entry at a time |
| `master` | **CI OK**, **Review gate**, **Validate PR Title**, **Wave-0 QA sign-off** | The same rules | Queue with **merge commit**, one entry at a time |

### What each check verifies

> [accordion] CI OK
>
> Summarizes every CI lane: static (types and lint), build, tests, manifest checks and E2E. On
> `develop`, only the lanes of the projects your change affects run. On `release` and `master`,
> everything runs.

> [accordion] Initiative declared
>
> Checks that the PR declares its initiative and tasks, that the PR number is in `prs`, that
> `pnpm docs:check` passes, and the PR size. If it fails, it moves the PR to draft with
> `do-not-merge`. When a later run passes, it removes the label and marks the PR ready again.

> [accordion] Merge gate
>
> Fails while the `do-not-merge` label is present, or if someone without permission removed it.

> [accordion] Review gate
>
> Waits for the required AI reviews on the latest commit: `Initiative review (AI)` on PRs to
> `develop` and `Release review (AI)` on `develop → release`. `Code review (AI)` is required when
> the repository enables it; until then it runs in shadow mode. See
> [review](https://docs.bbrands.io/bbrands-lab/pull-requests/review.md).

> [accordion] Validate PR Title
>
> Runs the title through commitlint. See
> [commits and titles](https://docs.bbrands.io/bbrands-lab/pull-requests/commits-and-titles.md).

> [accordion] Wave-0 QA sign-off
>
> Only on `master`: requires the QA sign-off for the candidate coming from `release`. See
> [releases and hotfix](https://docs.bbrands.io/bbrands-lab/pull-requests/releases-and-hotfix.md).

## Review rounds

**1. The reviewer leaves every comment in a single review**

Use "Start a review" and submit it complete, not one comment at a time.

**2. The author groups the fixes**

Address everything in local commits and make **a single push**. Every push dismisses the
approvals and runs CI and the AI reviews again.

**3. Do not update the branch without a reason**

Do not use "Update branch" or rebase onto `develop` unless there is a conflict: the merge queue
already tests your change against the latest `develop`.

[Arrives in Wave 1](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
The required policy checks (title, initiative, merge gate, Review gate and QA sign-off) start no runner in the merge queue, and the PR label is set inside the title check.

[Arrives in Wave 2](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
The PR runs the tests related to your change; the full suite runs in the merge queue.

[Arrives in Wave 3](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
Danibot, outside Actions, publishes the policy checks and completes the Review gate when the reviews finish, without polling.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.