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
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?
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.
The Benchmark Setup
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?*
The Results
Is it possible? Yes.
How long did it take? < 3 days across a two-repo, ~100k-LOC SaaS codebase.*
Figure 1 - Backend repo (35k LOC) first to reach the final state: all enforcement thresholds met; part of a two-repo codebase (~100k LOC)**.
Figure 2 - Issues burndown (787 → 509 → 234 → 0)
The Process
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.
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.
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.
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.
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.
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.
Repeat distribute/validate/commit cycles until all gates pass and main is deployable; issues eliminated systematically: 787 → 509 → 234 → 0.
Zero issues/errors/warnings; all thresholds met; main remains deployable. Automated, policy‑as‑code guardrails prevent regression, so confidence is high for every change.
A Critical Distinction
Engineering Quality ≠ Product–Market Fit
Engineering Quality
(Control Problem)
Product–Market Fit
(Discovery Problem)
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.
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.
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.
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.
The data is clear.
Much more.
Much faster.
Much higher quality.
The tools are ready.
Are you?