> ## 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.

# Level 4 · Module initiative

> Weeks of work or a new module: a full initiative, a feature flag, phases merged every few weeks and expand/contract migrations.

A module initiative is weeks of work: a new module, schema migrations or a behavior change that
must be turned on in a controlled way. It ships **in phases**, each one merged into `develop`
behind a **feature flag**.

![Discovery with PRD, tracker and decision log; phase 1 expand with the flag off; build phases behind the flag, each one as a Level 3 branch; rollout turning the flag on per environment; contract removing the old code and the flag.](https://mintcdn.com/bbrands/HbBhTZK1FiD1UtlY/images/bbrands-lab/level-4-phased-initiative.svg?fit=max\&auto=format\&n=HbBhTZK1FiD1UtlY\&q=85\&s=e2804647523a8c15976d6676f7a587c4)

Phased initiative behind a flag

## Rules

| Rule | Why |
| - | - |
| The initiative has a README, PRD, `tracker.yml` and decision log from day one | The plan, the progress and the decisions live where reviewers and AI read them |
| Anything user-visible goes behind a feature flag | The release train can ship each phase to production with the flag off |
| Each phase is a Level 3 branch that reaches `develop` within **\~2 weeks** at most | Avoids big-bang merges and huge conflicts at the end |
| Migrations follow **expand/contract** | Each phase is compatible with the previous code and can be rolled back |
| The order of the phases lives in the tracker milestones | Anyone can see what comes next and what is left |

## Recipe

**1. Create the initiative**

```bash theme={null}
pnpm initiatives:new <category>/<slug> --title "Readable title"
```

Write the PRD with the requirements (`REQ-xx`), the per-phase milestones in `tracker.yml` and
the first decisions in the decision log. The first PR can be documentation only.

**2. Create the feature flag turned off**

In the first phase, together with the schema expansion (new, additive tables or columns).
Nothing that already exists changes behavior.

**3. Build in phases**

Each phase follows the [Level 3](https://docs.bbrands.io/bbrands-lab/pull-requests/level-3-multi-pr.md) recipe:
integration branch, sub-PRs and a final PR to `develop`. The new code stays behind the flag.

**4. Roll out per environment**

Turn the flag on in development, then in certification and finally in production. Record each
step in the initiative's rollout plan.

**5. Contract**

Once the flag is on and stable in production, remove the old code paths, the columns that are no
longer used and the flag itself. It is one more phase, with its own PR.

> [!WARNING]
>
> If a PR cannot be split and goes over **1,500 lines or 60 files**, use the `large-change` label
> and record the reason in the decision log. The **Initiative declared** check only accepts the
> label if the decision names it.

[In force since Wave 0](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
Phases behind a flag, merged within \~2 weeks at most.

## Checklist

* [ ] Initiative with a README, PRD, `tracker.yml` and decision log.
* [ ] Feature flag created turned off in the first phase.
* [ ] Each phase is a Level 3 that reaches `develop` within \~2 weeks at most.
* [ ] Expand/contract migrations; nothing breaks the previous code.
* [ ] Flag rollout recorded per environment.
* [ ] A contract phase that removes the flag.


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