# Repository Branch Workflow

This repository uses `develop` as the approved integration baseline. Confirm
the branch and repository state before beginning every milestone.

## Branch roles

### `main`

`main` is the stable or release-ready branch. Do not perform feature work
directly on `main`.

### `develop`

`develop` contains reviewed and approved integrated work. After establishment
of this baseline, every feature and ordinary hotfix branch must start from the
current `develop` commit.

### `Feature/*`

Create a `Feature/*` branch from current `develop`. Each branch implements one
approved milestone only.

### `Fix/*`

Create an ordinary `Fix/*` branch from current `develop`. A production-release
fix may use a separately documented release-hotfix workflow when one has been
approved.

## Integration requirements

- Integrate reviewed commits only.
- Run the full test suite before integration.
- Begin and finish with a clean worktree.
- Do not force-push shared baseline branches.
- Do not create new work from an outdated feature or hotfix branch.
- Verify the merge base before beginning implementation.

## Starting a milestone

Unless a milestone explicitly approves a remote workflow, use:

```bash
git switch develop
git status --short
git branch --show-current
git merge-base --is-ancestor develop HEAD
git switch -c Feature/<milestone-name>
```

For a hotfix, replace `Feature/<milestone-name>` with
`Fix/<hotfix-name>`. Pull from a remote only when that workflow has been
explicitly approved.
