T08-L04 · Write code · Level 4 Integrator · 26-minute read, plus 3 hours of doing

Three people, three OpenCodes

The plate-reader script from T08-L03 · Write the Spec First, So an AI Assistant Can Change Code Your Team Depends On now has three people working on it: Mia maintains it, Jonas is her deputy, and Lena, a student, reports what breaks. Each of them runs OpenCode on the group's repository, and each OpenCode does whatever its owner's computer allows. Lena's uses a model nobody approved. Jonas's once pushed straight to main at the end of a session. Mia's could read the test login for the LIMS, the lab's sample-tracking system, that IT handed out last week. Nothing bad has happened yet.

In a company it's the quality team's returns report: three analysts, three sets of settings, and one of them pasted a customer export into a free model "so it understands the columns".

You are at Level 4 Integrator. The code is shared, it reaches real systems, and every colleague's assistant works with that colleague's rights. This book shows you how to give the whole group one set of rules for OpenCode, committed with the code: which model, what it may read, run and push; a read-only connection to your Gitea through MCP; and a reviewer agent. Then you take one real issue through the new setup, from Lena's report to a merged pull request.

After this you can

  • Find out what OpenCode may do in a repository today, and close the gaps.
  • Write a team opencode.json: the approved model provider only, secrets unreadable, pushes to main refused, everything else asked first.
  • Connect OpenCode to your Gitea through MCP in read-only mode, with a personal token that never enters the repository.
  • Add a reviewer agent that checks every change against the spec and can't change files.
  • Take an issue from Gitea to a merged pull request with these rules in force, and bring a colleague onto the same setup.

Before you start