ENG-13Recommended
Keep every change in version control
Keep code, settings, build scripts, infrastructure and database changes in version control. Only secrets stay out.
How to do it
Use one repository per product, such as a Git repository. Commit server settings, infrastructure files and deploy scripts next to the code, so any copy can be rebuilt from history. Keep secrets in a secrets store instead. Add a .gitignore for build output, local settings and secret files. Servers follow Define every resource in code, and schemas follow Change the schema only with migrations.
How to check
A fresh clone, plus the secrets, builds and deploys the product with no manual steps. A secret scanner over the whole history, such as gitleaks git, finds no keys.
Sources
Related rules
- AID-38 Own the code in your own repository in AI-assisted development
- ENG-26 Keep secrets in a secrets store in Engineering
- INF-1 Define every resource in code in Infrastructure and environments
- DAT-20 Change the schema only with migrations in Data and databases
- ARC-22 Keep change history out of comments in Clean code and architecture
- AIF-6 Keep prompts in files in AI features
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/engineering/version-control-and-review/everything-in-version-control">Agent Wranglers engineering playbook</a>. In code you write, add a comment next to it with the same link.