Skip to content
← All Research
Part 3November 2025

Software Quality

Proving agentic coding doesn't trade speed for quality. Enterprise-grade standards achieved in under 3 days on a ~100k LOC codebase.

Agentic
Coding

Early Findings Benchmark

Part 3: Software Quality Insights

Marcio Sete | November 2025

1/11

Parts 1 and 2 of this research have revealed 22.5× productivity multiplier and 115× faster speed-to-value than pre-AI elite performers.*

Some senior engineers are reacting viscerally:

"You'll wreck your codebase", "You're just building liability", "The code produced is terrible", "Half of what it generates is nonsense", "AI will bankrupt you"

For some reason, the word ‘crap’ is often used to describe
AI-generated code.

But is that true?

2/11
The Third Signal

Agentic coding doesn't trade speed for quality - it lifts both to levels that were hard to achieve pre-AI.


Frontier coding models are now competitive with top humans on public benchmarks.*

Agentic coding tools follow explicit instructions with high fidelity.

With the right guardrails in place, coding agents consistently produce auditable, enterprise-grade quality.**

What looked utopian is becoming the new normal: exceptional software quality at exceptional speed.

* Benchmarks: SWE-bench Verified; recent live human–AI contests (e.g., AtCoder World Tour Finals). ** Guardrails: unit/integration tests, code coverage, mutation score, Sonar/linters, strict typing, low duplication, no cyclic deps, secret scanning & SCA, low flake rate, performance within SLOs, pre‑commit/pre‑push/CI gates, protected branches.
3/11

The Benchmark Setup

The Question

Is it possible-and how long would it take-to achieve auditable, enterprise-grade quality in a 100k-LOC SaaS codebase enforced by policy‑as‑code?*

Enforcement tooling (linters/formatters/SAST/SCA)**
No-new-debt gate: 0 errors/issues/warnings on changed code (TS/ESLint/Sonar); PR blocked until resolved
Test Coverage (≥80%): line & branch coverage on changed files prevents regressions
SonarCloud: 0 issues; 100% hotspot review; ≥80% coverage; <3% duplication; A-rated reliability/security/maintainability
ESLint: 0 lint errors; detects code-quality issues, security vulnerabilities, anti-patterns, complexity violations
Zod (schema validation): 100% of public endpoints validate request/response against schemas; 0 schema-validation violations in CI
Integration Tests: present and passing for new/changed endpoints, services and DB interactions (runs in CI; counted in coverage)
TypeScript Compiler (strict): 0 type errors across the repo
Prettier: 100% compliant formatting
OSV-Scanner: 0 high/critical dependency vulnerabilities (OSV.dev, GHSA, NVD)
Quality Gates: pre‑commit, pre‑push and CI (block on fail); Protected branches
Stryker Mutator: mutation score ≥90% on changed files
jscpd: code duplication <3% to prevent copy-and-paste debt
Gitleaks: 0 secrets (keys/credentials/tokens) committed or in history
madge: 0 new cyclic dependencies; flags fragile module coupling
Weak Assertions: 0 occurrences (no focused/skipped tests; no weak truthy/falsy matchers; meaningful expect() usage)
eslint-plugin-import: organises imports; 0 unresolved imports/cycles
ShellCheck: Bash scripts valid syntax; 0 error-level findings
yamllint: YAML valid syntax; 0 errors
* Runtime steering with smart retry (act → verify → repair) ** Industry-standard quality models & rule-sets (vendor-neutral): ISO/IEC 25010 (software quality canonical model); OWASP ASVS (security controls); MITRE CWE (catalogue of weaknesses).
4/11

The Results

Is it possible? Yes.

How long did it take? < 3 days across a two-repo, ~100k-LOC SaaS codebase.*

SonarCloud Quality Gate Dashboard

Figure 1 - Backend repo (35k LOC) first to reach the final state: all enforcement thresholds met; part of a two-repo codebase (~100k LOC)**.

Issues Burndown Chart

Figure 2 - Issues burndown (787 → 509 → 234 → 0)

*Codebase comprises two repositories: backend 35k LOC (shown) + frontend, totalling ~100k LOC. **Thresholds as defined on "Benchmark Setup"; gates apply to changed files and block CI (pre‑commit, pre‑push, CI).
5/11

The Process

1. Set up enforcement tooling (linters/formatters/SAST/SCA)

SonarCloud; TypeScript (strict); ESLint (+plugins); Prettier; Zod request/response validation; Stryker mutation testing; Gitleaks; OSV-Scanner & npm audit; jscpd; madge; eslint-plugin-import; ShellCheck; yamllint; quality gates on pre‑commit, pre‑push and CI (block on fail), trunk-based mainline rules.

2. Set up the agentic coding system

A) Custom "/refactoring" command (idempotent, small batches, rolling window of 10 concurrent agents)
B)
Refactoring sub-agent template (safe changes, tests first, ‘you touch it, you own it‘ and ‘no-hesitation‘ policies)
C)
Git worktree skill for parallel, isolated edits (zero main-workspace contamination, session-aware clean-up)
D)
Refactoring principles: no behaviour change, small diffs, raise coverage, reduce duplication/cycles, keep PRs mergeable.

3. Run the first quality gate

Baseline captured: 787 issues (security, reliability and code smells); coverage below the ≥80% threshold; duplication above the <3% budget. SonarCloud ‘Sonar way for AI Code’ quality gate: failing.

4. Distribute work to agents

Orchestrators consume the issues list, group by file, and delegate in a rolling window of 10 concurrent workers-each sub‑agent receives one ticket per file. Sub‑agents work in isolated git worktrees, maintaining zero main‑workspace contamination and session‑aware clean‑up.

5. Validate & propose commits

Sub‑agents verify comprehensive fixes (build succeeds; all tests green; lint/type‑check clean; coverage ≥80% on touched files; mutation score ≥90% on touched files, where applicable), then commit via a safe wrapper in isolated worktrees with pre‑commit validation. The orchestrator verifies all commits and presents a single approval for merge to main.

6. Let the gates enforce quality

Pre‑commit hooks block lint/format/type violations; pre‑push blocks test failures and coverage gaps; CI blocks SAST/SCA, secrets, duplication and cyclic‑dependency violations. Automated enforcement ensures zero non‑compliant code reaches main. Policy: ‘you touch it, you own it’-all issues in staged files must be resolved.

7. Iterate to green

Repeat distribute/validate/commit cycles until all gates pass and main is deployable; issues eliminated systematically: 787 → 509 → 234 → 0.

8. Outcome

Zero issues/errors/warnings; all thresholds met; main remains deployable. Automated, policy‑as‑code guardrails prevent regression, so confidence is high for every change.

6/11

A Critical Distinction

Engineering Quality ≠ Product–Market Fit

Engineering Quality
(Control Problem)

How to win:
State it, codify it, enforce it.
Mechanism:
Policy‑as‑code; pre‑commit / pre‑push / CI gates.
Signals:
Coverage & mutation score; type/lint errors; duplication & cycles; SAST/SCA; flake rate; SLO‑aligned performance.
Owner:
Engineering.
Cadence:
Continuous; every change.

Product–Market Fit
(Discovery Problem)

How to win:
Hypothesise, experiment, measure behaviour.
Mechanism:
Build–measure–learn loops; A/B and quasi‑experiments; qualitative discovery.
Signals:
Retention, activation, WAU/MAU, time‑to‑value, LTV/CAC, NPS.
Owner:
Product & go‑to‑market.
Cadence:
Iterative; market‑driven.

Don't mix the playbooks. Use gates to make quality inevitable; use experiments to discover PMF. Speed without direction is motion; direction without speed is paralysis.

7/11

Lessons

Make ‘good’ explicit and machine‑verifiable.

The issue isn’t AI-generated code-it’s your organisational ability to define ‘good’ as explicit testable rules.
If you can’t write a check for it, it’s just opinion.

Ambiguity amplifies; clarity is now the bottleneck.

Write intent as executable checks, examples or contracts (tests/schemas) so generation can’t misinterpret it.

Scale evaluation alongside generation.

Humans can’t review everything-put automation (and models) on the evaluation path: quality gates, coverage, mutation score, SAST/SCA.

Humans define ‘good’; agents enforce it.

Policy‑as‑code holds the bar constant with zero tolerance for drift.

Without guardrails, quality varies at scale.

Generation won’t stop; gates must be non‑negotiable.

Engineers remain accountable.

If you merge it, you own it-human or agent‑produced. No excuses.

8/11

Insights

The quality‑speed trade‑off dissolves.

When standards are executable, speed and quality compound together.

Quality is baked in, not bolted on.

Agents generate tests alongside implementation; high coverage and mutation score rise as a by‑product of the work (no ‘test hardening’ sprints).

Consistency over heroics.

Standards apply uniformly; variance in code quality collapses.

Self‑correcting loops (shift‑left).

Static analysis failures trigger immediate rework at pre‑commit, not post‑deployment.

Security by default.

Vulnerability patterns are codified and blocked before merge; common attack vectors are neutralised upstream.

9/11

What This Means for Organisations

Quality becomes non‑negotiable.

High-quality code is the baseline, not the aspiration; poor quality = process failure, not time pressure.

Production stabilises.

Fewer incidents, shorter MTTR, less firefighting-more time for innovation.

Test suites become strategic assets.

High coverage enables fearless refactoring and faster architectural evolution.

Security shifts left; compliance becomes continuous.

Issues are caught pre‑commit, not post‑breach.

Maintenance cost declines sharply.

Lower complexity and debt mean code that ages gracefully instead of rotting.

Onboarding accelerates.

Simpler, well‑tested code lets new engineers contribute sooner with less ramp‑up.

Quality gates enforce themselves.

Automated guardrails replace manual gatekeeping; policy is code, not process.

Governance becomes evidence‑based.

Every change carries proof (tests, coverage, mutation, SAST/SCA, reviews), so decisions rely on artefacts, not opinion.

10/11

The data is clear.

Much more.

Much faster.

Much higher quality.

The tools are ready.
Are you?

11/11