An AI adoption framework for a 60-person engineering org
The AI adoption framework I run for 60 engineers at a 200-person regulated fintech: a baseline first, outcome metrics, 1 gateway, and governance as config.
I run AI adoption for a 200-person org, 60 of them in engineering, at a regulated fintech classed as high-risk. We went live 3 weeks ago.
The numbers are still coming in, so this guide is qualitative for now. I'll publish the measured version once I have them.
An AI adoption framework is the plan for bringing AI tools into a team's daily work: what to measure before and after, who decides how the tools get used, and which guardrails sit around them.
We designed the rollout to avoid a specific failure. A company buys licenses for an AI coding tool and announces the rollout. 6 months later someone asks whether it helped, and nobody can answer, because nobody measured anything before the tools arrived.
So we run adoption as an experiment:
- Write down what you expect to change.
- Change 1 thing.
- Compare against how things were before.
- Keep, adjust or stop, based on what you find.
For us, "AI in engineering" covers 4 things, and the same program runs all of them:
- Coding agents for the 60 devs, across the platform codebase and its services, from customer-facing APIs to internal tools.
- An AI support agent on Zendesk answering customer tickets, which we tested black-box before turning it on and now monitor in prod.
- Slack agents that let business teams ask questions the code and the docs can answer, without pinging a dev.
- The shared tooling underneath: 1 gateway, 1 installer, 1 code graph.
The same rules apply to all 4. I'll start with how I think about the problem, then go through the loop in the order we run it.
What AI changes, from first principles
A delivery pipeline is a chain of steps: write the change, review it, run it through CI (continuous integration, the automated build and test run on every change), and deploy it. Work moves through the chain only as fast as its slowest step.
A coding agent speeds up 1 step, the writing. Review, CI and deploy keep the capacity they had, so the extra volume has to go somewhere:
- If review has spare capacity, the gain carries through to prod.
- If it doesn't, the volume queues at review as larger PRs. Reviewers either slow down or wave changes through.
Waving changes through is how escaped defects (bugs that reach customers) can rise while a speed number improves. It's like widening a stretch of a road. The jam moves to wherever the road narrows again.
That has 2 more consequences:
- You need a before to see a change. A gain is the difference between 2 measurements taken the same way. Without a baseline taken before the tools arrive, there's nothing to compare against.
- An agent produces whatever you reward. Count lines of code and you get more lines of code. So we measure outcomes at the end of the chain, never activity at the start.
Measuring the baseline before AI adoption
To know whether AI helped, you need to know how things were without it, so we measured these before the first tool went out:
- Lead time, from first commit to merged, and from merged to released.
- Escaped defects, by severity.
- Rework: how often a change gets reverted or reopened.
- Review turnaround.
- A short survey of where the day-to-day friction is.
None of this has to be precise to the decimal, as long as we measure it the same way before and after.
We took the baseline on expensive, repetitive work, where an improvement is big enough to see. I use the same test for choosing projects.
Devs choose how, the org checks what
Devs do their best work when they pick their tools and methods, but the org still needs to know the work is good. So we split it:
| Who decides | What it covers | |
|---|---|---|
| How the work is done | The dev | Which harness, how they prompt, when they use AI at all |
| What comes out | The org | A small, reviewable change, with tests, that moves a number the team is responsible for |
We don't track how much AI anyone uses, how many prompts they ran, or how many tokens they used. Those are inputs, which are the dev's business. The org looks at outcomes.
3 weeks in, this split is the main reason adoption feels voluntary here. We still check quality where the code merges.
Piloting on real work
A pilot is normal prod work, done with the new tool, by devs the rest of the org trusts. For a pilot to tell you anything, it needs 3 things:
- Real work. Results on a demo repo don't carry over. Point the tool at the actual codebase, with its flaky tests and its history.
- Representative teams and code. 1 team on a new service tells you about new services. Include a team working in the old, critical code, because that's where the org's day-to-day work happens.
- Trusted early adopters. Pick devs whose judgment the others trust. When a known skeptic says it works, people listen.
Keep the pilot small enough to watch closely, and run it long enough for the novelty to wear off, so you see normal use.
What we measure
Engineering metrics
DORA (DevOps Research and Assessment, a long-running research program on software delivery) defines 4 delivery metrics. We use those 4, plus 2 more:
- Lead time for a change, commit to prod.
- Deploy frequency.
- Change failure rate: how often a change breaks something.
- Recovery time after a failed change.
- Rework and escaped defects.
- Review quality and PR size: are diffs getting smaller and easier to review, or larger and harder?
2 of the DORA metrics measure speed and 2 measure stability, and we track both.
The graphs don't show how the work feels, so we also ask the devs directly, in a short recurring survey:
- How fast are their feedback loops?
- How heavy is the mental load?
- How often do they get uninterrupted stretches?
Delivery numbers can look fine while devs are getting worn down, and a survey tells you that before resignations do.
- Lead time, commit to prod
- Deploy frequency
- Change failure rate
- Recovery time after a failure
- Rework and escaped defects
- Review quality and PR size
- Developer experience, asked directly
- Lines of code
- PR count
- Suggestions accepted
- Tokens consumed
- Seats activated
Product metrics
Engineering metrics tell you whether the team delivers well. To know whether it delivers the right things, you need product metrics.
We tie delivery to the product number each team is measured on: did the shipped work move activation, retention, conversion, or whatever that team is responsible for?
If AI helps a team ship more features nobody uses, it hasn't helped. At the end of a quarter we ask 2 questions:
- Did what we shipped move our numbers?
- Did AI shorten the path to that?
Why token spend is the wrong number
The gateway makes token counts easy to see, which tempts people to manage by them. Tokens measure cost, and the same token count can come with different results:
| Dev A | Dev B | |
|---|---|---|
| Tokens used | The same | The same |
| What shipped | A useful feature, quickly | Nothing that survives review |
| What a token dashboard shows | No difference | No difference |
| What cost per result shows | A normal ratio | Spend with no result to divide by |
So we compare spend with results:
- The gateway attributes every request to a dev, a team and an initiative.
- We divide that spend by what it produced: cost per shipped change, per feature, per resolved ticket.
- We watch the trend of that ratio, and look into it when cost per result rises. A rise in raw spend alone doesn't trigger anything.
How the measurement runs
At 60 devs, the measurement has to be automatic or it won't happen:
| Signal | Where it comes from |
|---|---|
| Delivery metrics | The pipeline and version control |
| Product metrics | The product analytics each team already runs |
| Spend | The gateway ledger, attributed per team and initiative |
| Developer experience | The recurring survey |
We look at everything at team level, on a fixed cadence, to find friction. Nothing rolls up to a person, because once a number is attached to a person, people start working to the number.
AI speeds up the system it lands on
Watching AI land on teams, I've seen it speed up whatever's already there. On a team with readable version control, small changes, trusted tests and a solid platform, the gains build on each other, while a weak system ships its problems faster.
DORA found the same thing at industry scale. Individual devs got faster and happier, while team delivery stability got worse, at least at first. That matches the review queue in the first diagram.
So preparing for AI is ordinary engineering work:
- Readable version control. Small commits with messages that say why, short-lived branches, and a protected main that only merges when the checks pass. When an AI-assisted change misbehaves in prod, you find it by reading history, which only works if the history is readable.
- Small batches. Changes small enough to review in a single sitting and revert in a single step. With an agent generating code, this is the difference between a reviewable PR and a 2,000-line dump.
- Tests that mean something. A suite that fails when something is broken and passes when it isn't. If devs rerun a red build because it is "probably flaky", the agents inherit that habit, and flaky tests start hiding real failures.
- A paved platform. Self-service paths for the common work: create a service, get a database, ship a pipeline, without filing a ticket and waiting. For us this includes an engineering handbook repo with templates every project starts from (README, agent context files, design docs) plus a setup script, so a new service starts from a known-good layout.
Before scaling anything, we went repo by repo and asked 4 questions:
- Is the history readable?
- Are changes small?
- Do the tests mean something?
- Is the path paved?
We pointed AI at the repos where the answers were yes. The others get fixed first, then get AI.
Who is responsible for AI-written code, and how we coach
The devs who submit, review and approve a change are responsible for it. A large AI-generated PR into critical code gets the normal review bar, and if anything a stricter one:
- Small, reviewable diffs. A 2,000-line change nobody can honestly review isn't done.
- Test evidence in the PR, pinning the behavior the change touches.
- A risk read: what breaks if this is wrong, and how would we find out?
- A named author who can defend the change without mentioning the AI.
sequenceDiagram
participant D as Dev (author)
participant A as AI agent
participant R as Reviewer
D->>A: Task, repo context, acceptance criteria
A->>D: Proposed change plus tests
D->>D: Inspect assumptions, run targeted tests
D->>R: Small PR with evidence
R->>D: Normal review standards
D->>D: Merge and answer for it
The new problem is size. Before AI, a 2,000-line PR took long enough to write that few devs wrote one. With AI, a dev can generate a sweeping change across a large codebase in an afternoon.
It gets merged quickly and reviewed poorly, and the defects show up later.
We coach this instead of banning it:
- Split together. When we see oversized AI PRs, we sit with the dev and split the change together. We explain the tradeoff: an oversized PR merges fast and hides bugs no reviewer can catch.
- Make small the easy path, with templates and examples of good and bad AI use next to each other.
- Track PR size as a team signal. When it creeps up, someone goes and coaches.
The other problem is a dev accepting output that's confident but wrong. We coach that habit too:
- Check the assumptions.
- Write a targeted test.
- Compare against an alternative.
- Argue with the model the way you would with a colleague.
Guardrails for agents
Before an autonomous agent touches prod, we put it inside 4 guardrails:
flowchart LR
A[AI agent] --> P[Scoped permissions]
P --> S[Sandboxed execution]
S --> T[Automated tests]
T --> G[Human approval gate]
G --> Prod[(Production)]
Prod --> L[Audit log and rollback]
- the least access that does the job
- execution in a sandbox that cannot reach prod
- a human gate on anything irreversible
- a log, with a rollback path
The larger the possible damage, the more process a change gets. When an agent proposes a broad architecture change, we require a short written decision record first:
- the tradeoffs
- the constraints
- an incremental rollout plan
- a human architecture review
The record takes about an hour to write, and unwinding a bad refactor from a live codebase takes weeks.
Scoped access: the support agent
The support agent shows how we scope access. It needs customer data mid-conversation, and we never considered giving it database access. Instead it talks to a separate read-only API we built for it:
- The API serves only the whitelisted fields each conversation flow needs.
- It applies the compliance checks.
- It logs every access.
The agent can't ask for more than the API exposes. That moved the security review from "what might the agent do?" to "what does this API allow?", and we know how to review that.
The gateway, the models, and data residency
If every dev calls model providers with personal keys, you have no cost visibility, no policy, and no control over where data goes. In a regulated fintech that rules it out, and in any org it becomes hard to manage within a quarter.
So we run 1 gateway in front of everything. A gateway is a proxy that every model call passes through: 1 endpoint with every model behind it, and we run it ourselves.
We self-host Bifrost as the gateway. It gives us:
- Provider keys held centrally, with 1 virtual key per dev, so nobody handles a raw provider key. A virtual key is a gateway-issued key that maps to a person and a budget, while the provider key itself stays on the server.
- A budget hierarchy, company to team to dev, and a spend ledger that attributes every request. It's the spend attribution idea running live, instead of rebuilt in a spreadsheet.
- 1 place to set policy, swap models or add a provider, without touching 60 laptops.
A hosted router like OpenRouter gives you the same single endpoint with less to operate, and less control:
| Self-hosted gateway (Bifrost) | Hosted router (OpenRouter) | |
|---|---|---|
| Single endpoint for every model | Yes | Yes |
| Who operates it | We do | The router company |
| Control over policy and data path | Full | Less |
| Where it fits | A regulated org; our choice | A smaller team |
The gateway covers more than the devs. The support agent and the Slack agents go through the same endpoint, with the same keys, budgets and scanning, so 1 set of controls covers every AI surface in the company.
EU data residency
Our data has to stay in the EU. Open weights (models whose weights you can download and run on any hardware) make that possible, because the weights are portable and you choose where they run.
Settle 1 detail early. EU residency has to cover in-region processing. The inference call itself counts as processing under GDPR, so a model stored in the EU but run elsewhere doesn't qualify.
Our mix:
- Open weights, EU-resident. GLM 5.2, Llama, Qwen and similar, served from EU hosts with zero-retention terms (the host stores no prompts or outputs), or self-hosted on an EU cloud. We go through inference vendors that keep data in-region, instead of the model maker's API.
- Frontier models in an EU data zone. The large cloud providers offer EU data-zone deployments that keep prompts and responses in-region. The provider can be based anywhere, as long as it offers EU residency you can put in a contract. Avoid the global-routing tiers when residency is strict.
- The paperwork. An EU endpoint is only the start. You still need the data processing agreement (DPA, the contract that sets how a provider may handle your data), a written zero-retention guarantee, and a subprocessor review. Terms can differ between a provider's own models and the open models it hosts, so check per model.
Any tool that would send source code to an external service goes through a security, privacy, IP and compliance review for that use case before anyone uses it.
Governance as a config file
In a regulated company, someone will eventually ask who can use which model, with what data, and who approved it. If the answer lives in a dashboard that admins clicked through over months, you end up reconstructing history. We keep the answer in a config file.
We declare the whole org structure in 1 file:
- business units
- teams
- people
- which model tier each person can use
- each team's budget
A small generator turns that file into the gateway's runtime config. Changing someone's access is a PR: edit the file, get it reviewed, merge, deploy. The git history is the audit trail.
3 things we learned setting this up:
- Test what your gateway enforces. In the OSS build we use, per-person model access and per-team rate limits enforce correctly. Hard dollar budgets didn't. In our test, a key over its cap kept working, so we enforce dollar caps upstream, per key, at the provider.
- PII scanning sits in front of the model call. PII is personal data that can identify a customer. In a fintech, prompts will eventually carry customer data, and something has to catch it. The gateway's built-in guardrails were limited to the enterprise tier, so we run an open-source scanning layer in front:
- In requests, it blocks or redacts PII, secrets and prompt-injection attempts (text written to make the model ignore its instructions).
- In responses, it redacts PII.
- Request scanning fails closed: if the scanner is down, the request doesn't go out.
- Response scanning fails open. We chose both on purpose.
- Put each control where it can act:
| Control | Where it sits |
|---|---|
| Rate limits | The gateway |
| Spend caps | The provider, per key |
| Model access | The config file |
| PII scanning | On the wire, in front of the model call |
Tooling we can swap
AI tooling changes month to month: new models, new harnesses, new agents. A harness is the agent app a dev drives, such as Claude Code. If your setup is wired to 1 tool, you rebuild it every time something changes, so we built everything to be swapped.
A standard endpoint. The gateway speaks a standard API, so any harness only needs a base URL. Swapping a model or adding a provider is 1 central change, and no dev has to touch anything.
A single setup command. New devs run 1 installer that bundles:
- their chosen harness (Claude Code, OpenCode, Cline)
- the gateway config and their virtual key
- token compression at 2 layers: command output compressed at the shell (rtk), longer context compressed before the model (headroom)
- a code graph, so the agent answers structural questions (who calls this, where is X defined) from a precomputed index instead of reading through files, which cuts the bulky output that fills the context
A dev is set up in minutes, and a tooling change ships as an installer update.
Context for agents in every repo. Every repo starts from templates in our engineering handbook:
- a README that says what the service does
- an agent context file with the conventions and commands
- a design doc
When an agent keeps producing plausible but wrong changes in a repo, the fix has almost always been better context: clearer conventions in the repo, acceptance criteria in the task, a worked example to follow. A bigger model or broader access has rarely been the answer. We review changes to those context files like code.
Benchmarks instead of guesses. We compare compression tools and graph engines on questions from our repos. The winner becomes the default and the runner-up stays available:
- Compression. 1 tool did better on command output and another on long context, so we run both, scoped so they never compress the same bytes twice.
- The graph. We started with a code-only index that builds locally and is shared across the team with no server. We're now benchmarking a multi-modal engine (graphify) that also indexes docs, SQL schemas and diagrams, so 1 graph can answer questions about the whole system. It also runs locally. The benchmark on our repos decides which becomes the default.
We want a setup we can re-point in an afternoon.
Behind the tooling there's a 1-page policy, short enough that people read it:
- approved use cases
- prohibited data
- review and test expectations
- security and IP guardrails
- an escalation path
We standardize the boundary and the gateway, and leave the choice of tool inside it to each team.
People learn this by doing their work, so onboarding is hands-on sessions on the team's current tasks, with good and bad usage shown next to each other.
Quality gates and CI
AI raises the rate of change, so the pipeline that catches bad changes has to get stronger at the same time.
When an AI test-generation tool hands you 500 new tests, curate them:
- Check them against the known risk areas.
- Drop duplicates and brittle cases.
- Stabilize the useful ones.
- Add those to CI.
flowchart LR
Ch[AI-assisted change] --> V[Pre-PR validation]
V --> CI{CI and quality gates}
CI -->|pass| M[Merge]
CI -->|fail| An[Analyze failure patterns]
An --> Fix[Strengthen gates,<br/>prompts, workflow]
Fix --> Ch
When AI speeds up coding and CI failures climb, fix it upstream:
- Read the failure patterns.
- Strengthen pre-merge validation.
- Improve the prompts and workflows that produced the bad changes.
- Update the gates.
For the high-risk flows, we generate regression tests from our defect history, then check whether escaped defects fall and CI stays stable.
Where to point AI first
To pick targets, combine signals you already have:
- defect history
- change frequency
- complexity
- test coverage
- usage
Code that changes often, is complex and has thin test coverage is where AI-assisted refactoring and test generation return the most. The same data tells you which technical debt to pay down.
For a legacy module nobody wants to touch, such as an ERP core or a payments path, go slice by slice:
- Take 1 high-value slice.
- Add characterization tests, tests that pin the current behavior whatever it is.
- Apply AI to that slice, with a human reviewing each change against the tests.
- Move to the next slice.
That way every change lands under tests you trust, and each AI-written commit covers 1 slice of the module.
Bringing the org along
Across 60 devs, a few try anything new on day 1.
A handful of respected devs pick it up next, and the rest wait to see what those people conclude. The gap between the early few and the cautious majority is where I've seen rollouts stall.
3 things move the majority:
- a clear improvement over the current way
- a low-risk way to try it on their code
- seeing peers they trust get results
So our rollout order is:
- Seed with the devs people already listen to.
- On-ramp everyone through the single setup command, so trying it costs nothing.
- Measure the pilot honestly, at team level.
- Show the results to the people who haven't moved, in their terms.
- Coach. A small group of senior devs works with teams, inside their code.
If you mandate a tool nobody has seen proof of, people comply on paper and work around it in practice, and your metrics stop describing what's happening.
When to scale
Before we scale, we want a repeatable gain across representative teams and codebases, without giving up quality, security, maintainability or developer experience. 1 good pilot week is only 1 data point.
flowchart LR
P[One-team pilot works] --> V[Validate across<br/>representative teams]
V --> D[Document the playbook]
D --> E[Enable and coach]
E --> Ok{Metrics hold,<br/>no bad tradeoffs?}
Ok -->|yes| Std[Org standard]
Ok -->|no| Iter[Iterate]
Iter --> V
2 examples of a number improving while the process gets worse:
- More PRs, more defects. Suppose a pilot ships 40 percent more merged PRs and escaped defects rise with it. Hold, find where the workflow and quality bars let weak changes through, tighten them, and measure again before widening anything.
- Faster cycle time, heavier load. Cycle time improves while devs report more mental load and review fatigue. The devs are paying for that gain, and it won't last.
Widen only when the metrics hold, with a written playbook and senior devs coaching the teams.
When something goes wrong
Something will go wrong, so we keep responses ready:
| Signal | Response |
|---|---|
| Escaped defects rising | Read the failure patterns, strengthen pre-merge validation, improve the prompts and workflows that produced them, update the gates |
| Implementation time down, review time up | Look at the handoff before blaming reviewers: PR size, change complexity, test evidence, context quality. The fix is usually smaller diffs and better context |
| A noisy AI reviewer | Calibrate it against the quality bar, track the ratio of useful comments to noise, and limit it to the areas where it helps |
| Cost per result creeping up | This is the spend signal we act on. Check whether the model tier is bigger than the task needs, whether compression is on, and whether devs are re-running the same expensive prompts |
Key takeaways
- A coding agent speeds up 1 step of the pipeline. The gain reaches prod only if review, CI and deploy can take the extra volume.
- Run adoption as an experiment: measure the baseline, pilot on real work, compare, decide.
- Let devs choose how they work, and check what comes out. Track outcomes, never activity.
- Measure delivery and product outcomes at team level: lead time, deploy frequency, change failure rate, recovery time, rework, review quality, developer experience, and whether the work moved a product number.
- Tokens measure spend. Divide spend by results (cost per shipped change), or don't track it at all.
- AI speeds up the system it lands on. Fix version control, batch size, tests and the platform where they are weak, then scale AI on the strong parts.
- A named dev answers for every AI change: small diffs, test evidence, a risk read, a named author. Coach oversized PRs and overtrust instead of banning the tool.
- Put 1 gateway in front of every model: per-dev keys, budgets, a spend ledger, and EU residency, covering in-region processing plus a data processing agreement per model.
- Put governance in a config file so access changes are reviewed PRs and git is the audit trail. Test what your gateway enforces, and scan the traffic for PII.
- Build the tooling to be swapped: a standard endpoint, a single setup command, benchmarked alternatives.
- Scale only on a repeatable gain that holds without hurting quality, security or the devs. If quality slips when you widen, fix the workflow and measure again.
Common questions
Why is lines of code a weak way to measure AI in engineering?↓
If you measure lines of code, you get more lines of code, because an agent produces whatever you reward. More code means more to review, test and maintain. Measure delivery instead: lead time, deploy frequency, change failure rate, recovery time, and whether the shipped work moved a product number.
Is token consumption a good measure of AI adoption?↓
No. Tokens measure spend. 2 devs can spend the same tokens where one ships a useful feature and the other produces nothing, and the token count looks the same. Track spend through the gateway, then divide it by results: cost per shipped change, per feature, per resolved ticket. Watch that ratio.
How do you keep devs autonomous without losing control?↓
Devs choose how they work: which harness, how they prompt, when they use AI. The org checks what comes out: small reviewable changes, tests, and work that moves a number the team is responsible for. Nobody tracks anyone's AI usage.
Who is accountable for code an AI wrote?↓
The dev and team who submit, review and approve it. The model has no judgment about your domain, so the normal review bar applies: small diffs, test evidence, a risk read, and a named author.
Does AI make engineering teams faster?↓
It speeds up what is already there. Individual devs get faster almost immediately. In DORA's research, team-level delivery stability got worse at first. A team with readable version control, small batches and tests it trusts keeps the gains; a team without those ships its problems faster.
How do you govern who can use which AI model in a regulated company?↓
Put the rules in a config file. We declare business units, teams, people, model tiers and budgets in 1 file, and a generator turns it into the gateway config. Changing access is a reviewed PR, and git history is the audit trail. Test what your gateway enforces: in ours, model access and rate limits were enforced and dollar caps were not, so spend caps sit upstream at the provider.