> ## 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 2 · Scoped development

> A complete feature in a single PR to develop: reference size, step-by-step recipe and checklist.

A scoped development ships a complete feature that can be reviewed in one go: **one intent**,
about **800 lines** and **40 files** as a reference. It is the most common case.

## Recipe

**1. Find the initiative and the task**

Look for the area's initiative in `docs/initiatives/` (or with `pnpm initiatives:backlog`). If
the feature has no task, add it to `tracker.yml` in the same PR. If no initiative exists, create
one with `pnpm initiatives:new <category>/<slug>`.

**2. Create the branch from develop**

```bash theme={null}
git switch develop && git pull
git switch -c feature/portal-customer/club-coupon-history
```

**3. Work with local commits**

Make as many commits as you need, but **do not push until you have something reviewable**.
Every commit goes through the commitlint hook.

**4. First push and a draft PR**

```bash theme={null}
git push -u origin HEAD
gh pr create --draft --base develop --fill
```

The pre-push hook runs Biome, types and tests for the affected projects, `docs:check`, the
initiative policy and `ci:guards`. Fill in the template: summary, initiative, tasks
(`T-xx (done)` or `(in-progress)`) and screenshots if there is UI.

**5. Add the PR number to the tracker**

The **Initiative declared** check requires the PR number to appear in `prs` for every declared
task. Add it and push it while the PR is still a draft, where the push does not trigger CI.

**6. Review locally before marking it ready**

```bash theme={null}
pnpm initiatives:pr-check
pnpm initiatives:review   # once: fix everything it reports
```

**7. Mark it ready**

`gh pr ready`. From here on, every push runs the full CI, the AI reviews and the checks. Group
the fixes from each review round into **a single push**.

[In force since Wave 0](https://docs.bbrands.io/bbrands-lab/pull-requests/waves-roadmap.md)
Draft until `pr-check` and the local tests pass, and one push per review round.

## Feature flags at Level 2

A flag is optional at this level. Use one when the feature is ready but the business decides when
to turn it on. Follow the repository's feature flag definition
(`docs/definitions/feature-flags.md`).

## Checklist

* [ ] A single intent; the title does not need an "and".
* [ ] Branch `feature/<scope>/<description>` from `develop`.
* [ ] Initiative and tasks declared; PR number in `prs`.
* [ ] Unit tests for the new behavior; Storybook stories if there are components.
* [ ] Draft → `pr-check` → one `initiatives:review` → ready.
* [ ] One push per review round; no "Update branch" unless there is a conflict.
* [ ] `[skip e2e]` in the title if it does not touch the UI.


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