The one-paragraph version
Give the agent a short operating manual (CLAUDE.md), make it plan before it edits, give it commands it can run to check its own work, scope what it is allowed to touch, keep the context window on one task at a time, review its diffs the way you would review a new colleague's, and put one named person in charge of the setup. Everything below is one of those seven things in more detail.