Ship It With AI Mihai Cvasnievschi

Rolling it out

8 min read

By the end you can run agents safely in a real repository and start a rollout the way most successful ones start: with one engineer.

TL;DR


Guardrails for a real repo

The agent is one more author with write access, so give it the boundaries every author gets.

These repo-level habits sit on top of Chapter 2's five layers and matter most on yellow codebases (Chapter 8). The human review floor that no review bot replaces is Chapter 5's.


Worktrees

Every agent session gets its own git worktree.

A worktree is a separate checked-out copy of the repository on its own branch. The agent can experiment, fail and retry there without touching anyone's working copy. Good work goes through normal PR review; bad work is a deleted directory. Without one, the agent contends with your unfinished local work and you spend an hour finding out what changed.


Two kinds of hooks

Hook the agent, hook the repository, and run the same checks in CI.

Local hooks are still fast feedback, not enforcement: skippable, configured in a file the agent can edit, and not guaranteed on every machine. The same checks in CI cannot be skipped from a laptop; with the hook config and the CI workflow behind a deny rule, that is the gate the agent cannot edit.


Keeping it alive

Rules rot, so someone owns pruning them.

The mistake journal and its champion are Chapter 6. For process mistakes, keep a failure watchlist: recurring failures, what triggers them and the team's standard response. Review it every month or so and retire what is fixed.


The outer loop

Run the agent unattended only under a written contract.

The outer loop re-invokes the agent until a condition holds. It adds attempts, not judgment, so it multiplies whatever your inner loop permits (Chapter 4). Use it on GREEN codebases only (Chapter 8), on many similar, verifiable, reversible units, and read the pull requests in the morning.

Before the first unattended run, write five lines: a stop condition a machine can evaluate; a budget; a gate the agent cannot edit; fresh context each iteration with state in the repository; isolation sized for absence (own worktree, sandbox on, no production credentials, network constrained). Appendix B.6 is the form, with the four signs that mean stop before you relaunch.


How do you roll out AI coding agents on a team?

Start with one engineer who refuses to give up, not with a program.

The first time I taught the three-role rubric, an engineer in the back row said: "My manager has not heard of agentic AI. My lead does not have time. I am the only person on my team who cares. What do I do?"

The three-role arc would stall for him in month two, when the procurement conversation never happens. The grassroots arc would not, and it is how most successful adoptions in 2025 and 2026 started: one person plays champion, then de facto lead, then manager-advocate, in sequence. I have watched it succeed twice.

By month six it looks like the ideal arc at month three, in twice the time. The trade-off: the grassroots arc is fast to start and fragile, because if the one engineer leaves before peers and management are recruited, the practice dies with them. The three-role arc starts slower and survives a departure. With a manager who knows agents, an engaged lead and budget, run three roles; with only your own hours, run the grassroots arc.


The 90-day arc

The curve is asymmetric: the first thirty days produce almost no measurable productivity.

Days 31-60 show visible gains on the green project; days 61-90 compound across the team. Companies that measure at thirty days will be disappointed, so tell stakeholders up front. The full calendar is Appendix B.5.

The 90-day adoption arc across three roles DAYS 1 - 30FoundationChampion Champion installs AGENTS.md drafted First green-light project Architecture review workflow proven DAYS 31 - 60ExpansionLead Lead onboards 2 - 3 more engineers AGENTS.md hardened Hooks configured Skills written Kill signals applied to portfolio DAYS 61 - 90ProductionizationManager Manager folds metrics into normal velocity tracking Vendor governance signed Plugin marketplace policy in place
Figure: The 90-day adoption arc. Each phase has a primary role and a primary artifact set.

Role commitments

Each commitment is small enough to fit alongside normal work.

The champion learns the workflow first. They need to be the most willing to invest the first sixty hours, not the most senior.

The lead decides which projects get the agent and keeps the traffic light.

The manager owns budget, procurement and governance sign-off, and shields the team from premature metrics. Their page is Appendix A, with the 20-engineer engagement where agent-touched PRs (41% of the total) ran 28% below the pre-agent cycle-time baseline, defects within noise.


Two archetypes that kill rollouts

Treat each as a structural problem with a structural fix, not a character flaw.

The principled skeptic is the senior who has seen AI hype cycles before, will not use the agent and reviews agent-led PRs with extra hostility. Either the team works around them and the codebase splits into agent-friendly and agent-hostile territory, or they win the argument and the rollout stalls. Do not try to convert them; give them a boundary: "your modules, your rules, the agent will not touch them; everywhere else the team standard applies." And do not let every agent-led PR queue behind them, or you have granted a veto nobody intended.

The uncalibrated delegator skips the careful read because "the agent always does it right". Defects compound, the team blames the agent instead of the missing review step, and eventually the engineer cannot debug what the agent helped build. Every agent-led PR gets the same human review as a human-led one. For the first month, pair them with a senior who reads the output line by line.


The vendor will have a bad week

Plan for the agent being unavailable.

I watched a team's velocity halve for a week when their primary model was rate-limited. In June 2026 the largest vendor's newest flagship tier was pulled worldwide days after launch and stayed unavailable for nearly three weeks; teams with fallbacks ran them for real; teams without rediscovered their old setup under deadline. Keep a non-agentic fallback for time-sensitive work, a senior who can still ship a hotfix at three in the morning, and a runbook for "the agent is throttled and the customer is waiting".


When it breaks

It breaks when What happens Fix
A champion, no lead The champion does all the agent work alone; the agent is labeled "interesting but limited" The lead's checklist, above
A champion and lead, no manager Procurement stalls, yellow projects stay yellow; the classification has no buyer The manager's page, Appendix A
A lead and manager, no champion Committed in theory, stuck in practice The champion's checklist, above
Local hooks treated as enforcement Skipped, edited or never installed Run the same checks in CI

Do this Monday


Go deeper