---
title: "Make small changes on short-lived branches · Agent Wranglers"
url: https://agentwranglers.se/playbook/engineering/version-control-and-review/small-changes
updated: 2026-10-20
licence: "All rights reserved"
---

# Make small changes on short-lived branches

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

- Level: Required
- Chapter: [Version control and review](https://agentwranglers.se/playbook/engineering/version-control-and-review)
- Rule: Merge small changes often. A branch lives for at most 5 working days, and a change does one thing.
- How: Split large work into steps that each leave the main branch working. Keep a pull request at or under 400 changed lines, not counting lock files and generated code, because reviewers miss more in longer ones. Hide unfinished features behind a [flag](https://agentwranglers.se/playbook/engineering/running-in-production/deploy-is-not-release) instead of a long branch. Write commit messages that say why, because the diff already shows what.
- Check: A pull request job counts the changed lines and fails above the limit unless the change carries a label that explains why. A report of open branches fails when one is older than 5 working days.

Example:

```text
Good commit message:
Round prices per line, not per order

Customers saw totals 1 cent off on orders with several discounted lines.
```

```sh
# Pull request size gate: changed lines, without lock files
changed=$(git diff --numstat origin/main...HEAD -- . ':!*.lock' ':!package-lock.json' | awk '{s+=$1+$2} END {print s+0}')
[ "$changed" -le 400 ] || { echo "FAIL: $changed changed lines, limit 400"; exit 1; }
```

**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/small-changes`.

- Previous: [Keep every change in version control](https://agentwranglers.se/playbook/engineering/version-control-and-review/everything-in-version-control)
- Next: [Protect the main branch](https://agentwranglers.se/playbook/engineering/version-control-and-review/protect-the-main-branch)
- [Version control and review](https://agentwranglers.se/playbook/engineering/version-control-and-review)
