The Question Behind ROI

“Did the assistant make developers faster?” is too vague to measure. A serious evaluation asks:

For which task, under which workflow, did the intervention increase successful delivery without unacceptable quality, security, privacy, learning, or operational cost?

An assistant may reduce typing while increasing review, debugging, context switching, or dependency risk. A larger pull-request count may reflect smaller changes rather than more value. ROI is an empirical claim about a workload, not a property of a product name.

Treat Published Numbers as Context

Vendor experiments, internal reports, field studies, and independent controlled trials answer different questions. Before comparing two numbers, record:

Dimension Questions
outcome time, accepted patch, merged change, issue resolution, or user value?
task toy task, unfamiliar repository, maintenance, feature, or incident?
participants experience, selection, training, and opt-in effects?
comparator no tool, another tool, or historical baseline?
protocol randomization, observation window, exclusions, and retries?
quality tests, review, defects, rollback, and rework?
scope individual, team, repository, or organization?
uncertainty confidence interval, missing data, and sensitivity?

A controlled result on a narrow task does not predict a company-wide result. An internal report may be useful context while still being subject to selection and reporting bias. Do not turn heterogeneous studies into a tool leaderboard.

Build a Baseline Before a Pilot

Choose a bounded workload such as bug fixes, dependency upgrades, test writing, documentation changes, or a particular service. Define inclusion and exclusion rules, then record a baseline long enough to contain ordinary variation.

Capture:

  • time to first usable patch and time to merge;
  • successful task rate and abandonment;
  • review rounds, review minutes, and rework;
  • test, security, and defect outcomes;
  • rollback or post-release incidents;
  • developer interruption and satisfaction;
  • model, tool, repository, and policy versions.

Do not require a fixed number of weeks or tasks. Use power analysis or a practical precision target appropriate to the workload, and report when the sample cannot support a conclusion.

An Outcome Matrix

Layer Example measure What it does not prove
delivery successful task per engineer-hour long-term product value
flow cycle time, queue time, review time code correctness by itself
quality tests, escaped defects, rework, rollback maintainability in every future release
security secret findings, dependency risk, policy violations absence of unknown vulnerabilities
developer experience interruption, cognitive load, satisfaction customer impact
economics cost per successful task opportunity cost without assumptions
learning explanation quality, independent follow-up durable skill growth

Keep numerator and denominator visible. “Code generated” and “suggestions accepted” are activity signals, not outcomes.

A Defensible ROI Model

Separate measured quantities from assumptions:

javascript
function roiRange({
  successfulOutcomes,
  valuePerOutcome,
  assistantCost,
  trainingCost,
  reviewCost,
  reworkCost,
  securityCost,
  migrationCost,
}) {
  const value = successfulOutcomes * valuePerOutcome;
  const investment = assistantCost + trainingCost + reviewCost +
    reworkCost + securityCost + migrationCost;
  if (investment <= 0) throw new Error("investment_must_be_positive");
  return {
    incrementalValue: value,
    netValue: value - investment,
    roi: (value - investment) / investment,
  };
}

This is a structural example, not a claim about currency, salaries, or savings. valuePerOutcome needs a documented business assumption. Run sensitivity analysis across plausible ranges and include costs that are easy to hide:

  • subscriptions and inference;
  • onboarding and policy work;
  • review and rework;
  • tests, security review, and incident response;
  • provider migration and lock-in;
  • developer learning and reduced independent practice;
  • privacy, licensing, and data processing obligations.

Report cost per successful, reviewed, accepted outcome rather than cost per generated line.

Design the Pilot

  1. Pre-register the question. Example: does the intervention reduce time for a defined maintenance task without increasing review rework?
  2. Select comparable work. Stratify by language, repository familiarity, change size, and risk.
  3. Declare treatment. Record model, tool version, context files, permissions, prompts, and allowed actions.
  4. Choose a comparator. Randomized assignment is strongest; a matched or interrupted time-series design can be useful when randomization is impossible.
  5. Keep quality gates constant. Tests, code review, security scanning, and merge approval must not be weakened for the treatment group.
  6. Collect failures. Record abandonment, hallucinated APIs, insecure patches, duplicate work, and rollback.
  7. Analyze slices. Report uncertainty and heterogeneity rather than only an average.
  8. Decide with a reversible gate. Expand, adjust, pause, or roll back based on predeclared evidence.

Do not hide a negative result. A tool that helps unfamiliar migrations but slows routine edits has a useful, narrower adoption boundary.

Acceptance Is Not Quality

Suggestion acceptance can be informative, but it is confounded by:

  • interface defaults and auto-commit behavior;
  • developer review habits;
  • task difficulty;
  • code ownership;
  • later rewrites and defect discovery.

Treat it as a diagnostic signal. Pair it with tests, review rework, escaped defects, and successful task completion. Never define a “healthy” acceptance interval without workload evidence.

Adoption Is a Socio-Technical Change

Repository and Data Policy

Classify repositories and data before enabling a provider. Decide whether prompts, code, logs, or dependencies may leave the environment; document retention, training use, residency, deletion, and incident notification. Redact secrets and personal data at the producer.

Capability Boundaries

Coding agents can read files, run commands, change dependencies, call services, and create external side effects. Start with least privilege:

  • read-only by default;
  • isolated worktrees or sandboxes;
  • allowlisted commands and network egress;
  • pinned dependencies and reproducible builds;
  • human approval for merges, releases, credential changes, and external writes;
  • auditable identity and tenant context.

Prompt instructions, generated plans, tool annotations, or a model refusal are not authorization.

Review and Ownership

The author remains responsible for understanding and testing the change. Require a meaningful diff, tests, dependency and license checks, secret scanning, and review appropriate to risk. Avoid a workflow where junior engineers copy unknown code without being able to explain its behavior.

Team Learning

Share failed cases and effective patterns, not only success stories. Measure whether engineers can maintain, debug, and modify the resulting code without the assistant. Learning is an outcome to observe, not a reason to ban or mandate a tool.

Selecting a Tool Without a Sales Ranking

Create a comparison sheet for the actual workload:

Criterion Evidence to collect
coding quality blinded task results, tests, review outcomes
context handling repository slices, retrieval errors, stale context
agent control permissions, sandbox, cancellation, audit events
privacy retention, training terms, residency, deletion
operations latency, quotas, outages, version pinning
economics subscription, inference, review, migration cost
exit cost export, workflow portability, lock-in

Pricing and capabilities change. Verify the current terms directly and record the date and plan instead of embedding a permanent price table in a methodology article.

Common Failure Modes

  • comparing vendor claims measured on incompatible tasks;
  • treating LOC, acceptance, or PR count as customer value;
  • assuming individual speed becomes organization throughput;
  • removing review or security gates to demonstrate speed;
  • giving an agent broad shell, network, or credential access;
  • sending source code or secrets to a provider without a data policy;
  • ignoring rework, debugging, queue, and incident costs;
  • forcing a single tool or workflow on every repository;
  • using a short pilot to claim durable skill or productivity gains;
  • publishing a point estimate without uncertainty or failed cases.

Decision Record Template

text
Question:
Workload and risk:
Baseline window and comparator:
Treatment version and permissions:
Primary outcome and denominator:
Quality/security guardrails:
Costs included:
Uncertainty and slice plan:
Expansion, pause, and rollback criteria:
Owner and review date:

This record makes a pilot auditable and prevents a favorable anecdote from becoming policy.

Summary

AI coding ROI is not a universal percentage and should not be inferred from a product label. Measure successful outcomes on a declared workload, preserve quality and security gates, count review and rework, account for privacy and learning costs, and report uncertainty. Adopt the capability where evidence supports it, keep permissions narrow, and make the decision reversible.

Primary Sources