Version control and review Required
Protect the main branch
Nobody pushes straight to the main branch. Every change arrives through a pull request with passing checks and an approved review.
How to do it
Turn on branch protection in the code host, such as GitHub, GitLab or Bitbucket. Require the full check to pass and at least one approval. Review with the code review chapter of the architecture playbook.
How to check
A direct push to the main branch is refused. A pull request with a failing check cannot be merged.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers engineering playbook: https://agentwranglers.se/playbook/engineering/version-control-and-review/protect-the-main-branch.