---
title: "Version control and review · Agent Wranglers"
url: https://agentwranglers.se/playbook/engineering/version-control-and-review
updated: 2026-10-20
licence: "All rights reserved"
---

# Version control and review

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Every change goes through version control in small steps. Automated checks and a second pair of eyes approve it before it reaches the main branch.

**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`.

## Required

- [Keep every change in version control](https://agentwranglers.se/playbook/engineering/version-control-and-review/everything-in-version-control): Keep code, settings, build scripts, infrastructure and database changes in version control. Only secrets stay out.
- [Make small changes on short-lived branches](https://agentwranglers.se/playbook/engineering/version-control-and-review/small-changes): Merge small changes often. A branch lives for at most 5 working days, and a change does one thing.
- [Protect the main branch](https://agentwranglers.se/playbook/engineering/version-control-and-review/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.
- [Run the checks on every change](https://agentwranglers.se/playbook/engineering/version-control-and-review/continuous-integration): Run the full check on a clean machine for every push and pull request, not only on a developer's computer.
- [Fix a broken main branch first](https://agentwranglers.se/playbook/engineering/version-control-and-review/keep-main-green): When the check fails on the main branch, fixing it comes before any other work. Revert the change that broke it if a fix takes longer than an hour.

## Recommended

- [Update dependencies in small automatic steps](https://agentwranglers.se/playbook/engineering/version-control-and-review/automated-dependency-updates): Let a bot open a pull request for each dependency update, and merge it when the checks pass.

- Previous: [Build, test and deploy](https://agentwranglers.se/playbook/engineering/build-test-and-deploy)
- Next: [Running in production](https://agentwranglers.se/playbook/engineering/running-in-production)
- [All chapters](https://agentwranglers.se/playbook/engineering)
