← ~/pillars / deterministic-policy / team-rollout-governance

Rolling out coding agents to a twenty-engineer team

The governance playbook: permission baselines, hooks as policy, the outer gate, funding and identity, and measurement from day one, sequenced over four weeks with the artifacts to copy.

updated 2026-07-05 ~6 min read pattern 06/06 Deterministic Guardrails

on this page

Context. One enthusiast with a tuned CLAUDE.md is an experiment. Twenty engineers with agents holding write access to your repositories is an operating model, and most teams arrive there by accretion, one personal setup at a time, with no decision ever actually taken. The rollout problem is not “which tool”; it is governance: what must always hold, who enforces it, and how you will know whether any of it is working.

Forces. Engineers want the freedom of their own configuration; the organisation now has a config-shaped attack surface, because agent behaviour is defined by files in the repo, and 2026 demonstrated exactly what that means. Check Point’s disclosures showed that a malicious repository’s .claude/settings.json could execute shell commands on every collaborator’s machine via hooks, auto-approve MCP servers, and exfiltrate API keys before the trust dialog ever appeared (CVE-2025-59536 / CVE-2026-21852, The Hacker News). A separate finding showed deny rules being silently skipped on commands with enough subcommands (Adversa). Meanwhile the delivery force pulls the other way: DORA 2025 found AI amplifies the engineering system you already have: throughput up, and instability up with it wherever the control systems were weak (DORA 2025). Speed you cannot govern is rework on a delay.

Resolution. Treat the rollout as four layers deployed in order (permission baseline, hooks as policy, the outer gate, funded identity), with measurement wired in from the first week, not retrofitted. Enforce centrally only what must always hold; leave everything else personal. The worked example at the end sequences all of it over four weeks.

The permission baseline

Settings merge across scopes, and the load-bearing rule is that a deny at any scope beats an allow at every scope (permissions). For a team, that means the organisation states its denies once, centrally (managed settings deployed by MDM or checked into a bootstrap the laptops actually run), and engineers keep full freedom above that floor (settings).

What belongs in the floor is shorter than most security reviews expect:

  • Credential paths. The sandbox restricts writes, but its default read policy is the whole filesystem: ~/.aws/credentials and ~/.ssh/ included. Explicit denyRead entries are the fix, not the default (sandboxing).
  • Environment hygiene. Subprocesses inherit cloud credentials unless CLAUDE_CODE_SUBPROCESS_ENV_SCRUB strips them.
  • The defaultMode trap. The 2026 advisories included a repo-controlled permissions.defaultMode: bypassPermissions silently skipping the trust dialog. Patched, which is the real lesson: pin and update the CLI like the security dependency it is, and treat any diff to .claude/ or .mcp.json in a pull request with the suspicion you would give a CI workflow change.
  • Version floor. An org that cannot say which Claude Code versions its engineers run cannot say which advisories apply to it.

Do not put argument-pattern Bash denies in the floor and call it enforcement: flag reordering and wrapper commands dodge them, as the security docs warn and the subcommand-flooding finding confirmed. Pattern denies are friction; the floor is a narrow allow list, the sandbox, and credential denyRead.

Start from the cautious permission profile and the day-one team settings.

Hooks as policy, not preference

The committed .claude/ directory is part of your architecture, and the boundary question decides its contents: rules a tool could verify belong in hooks; judgment belongs in CLAUDE.md. At team scale this stops being a productivity preference and becomes the policy mechanism: a formatting hook is a decision nobody re-litigates twenty times, and a production-config block is an incident that never happens (hooks).

Be honest with the team about what enforcement buys, because the honest version is more persuasive. Our own benchmark measured a frontier model at 100% compliance with written rules on short, low-pressure tasks, no hooks required. Rule drift is a pressure phenomenon: long sessions, crowded context, rules that fight the shortest path to done. Hooks are insurance priced for the fiftieth turn, which is precisely where a twenty-engineer estate lives by lunchtime.

One hook deserves a special word at team scale: ConfigChange fires when settings or hook configuration change mid-session and can block the change: the audit point that turns the 2026 attack class into a reviewable event rather than a silent one (hooks).

The outer gate

Everything inside the session can be bypassed by the one thing no session controls: a human merging carelessly. The outer gate is repository rulesets: required status checks and CODEOWNERS applied to every pull request regardless of author (rulesets). Two decisions matter:

  1. One gate, both authors. The CI gate (build, tests, coverage, lint) must be identical for agent PRs and human PRs, with no bypass actors. The required checks configuration and the Java quality gate pair for exactly this.
  2. CODEOWNERS where mistakes are cheap to make and dear to ship. Dependency manifests, Terraform, CI workflows, production configuration, and, after 2026, .claude/ and .mcp.json themselves.

Funding and identity

Twenty engineers on one shared API key is an attribution void and a rotation nightmare. The pattern that scales on AWS is Bedrock behind your identity provider: engineers federate through IAM, usage attributes per developer, and no long-lived Anthropic keys exist anywhere in the estate (Bedrock deployment patterns). The Bedrock settings artifact carries the environment pins; the wider decision (Bedrock versus direct API versus subscription seats) is worked through in subscription arbitrage.

However funded, treat cost observability as an engineering discipline from week one, the same as performance monitoring or error tracking: per-developer attribution, per-team rollups, and a number someone actually reviews. Teams that discover their agent spend in the finance report discover it too late to steer.

Measurement from day one

DORA’s amplifier finding cuts both ways: if you cannot see stability, AI will quietly spend it. The 2025 report’s fifth metric, deployment rework rate, is the one built for this failure mode: changes that ship, demo well, and come back next sprint (DORA 2025). Baseline it before the rollout, watch it during, and treat a rise as a verification-discipline signal, not an argument against agents.

Then measure your own scaffold, because published numbers are someone else’s model on someone else’s setup. The design of this site’s retired compliance harness is small enough to reproduce: point code graders at your team’s real rules, run a matrix against a fixture of your own, and you have first-party evidence for the enforcement decisions above, renewable every time your harness or model changes.

The four-week worked example

A sequence that has the estate governed by week four without a big-bang mandate:

Week one: floor and gate. Deploy managed settings (credential denyRead, env scrub, version floor) from the cautious profile. Apply rulesets with required checks and CODEOWNERS on manifests, IaC, workflows, and .claude/. Baseline DORA metrics. Nothing yet changes for engineers’ daily work.

Week two: the committed toolchain. Land .claude/ in the two or three most active repos: team settings, the formatting hook, the production-config block, a CLAUDE.md that carries judgment and no mechanics, and a convention skill. Review these PRs with the whole team: the argument about what goes in the hook layer is the governance conversation.

Week three: identity and cost. Move funding to federated Bedrock (or your equivalent) with per-developer attribution; rotate away any shared keys; stand up the cost dashboard and put it on a weekly review.

Week four: measure and adjust. Re-read the DORA baseline. Run a compliance matrix against your own rules. Publish both numbers internally with the same honesty this site publishes its own. The first time a team sees its own measured data is the moment governance stops being a mandate and starts being engineering.

What you have at the end is not a policy document. It is a floor nobody can fall through, a toolchain in version control, an identity model with names on spend, and two numbers trending on a dashboard, which is all governance ever usefully is.

// sources