wiki / concepts / agentic-code-quality

Agentic Code Quality

medium confidence updated 2026-08-27 coding-guidelines · feedback-loops · tdd · workflow · evaluation · security

Agentic Code Quality

Agentic code quality is usefully modeled as a property of the model–scaffold–toolchain–policy system, not the generator alone. While practitioners emphasize patterns like agentic engineering patterns and eval driven development, empirical research reveals distinct failure modes: test-oracle defects, reward hacking, scope expansion, noisy automated review, and long-horizon degradation. agentic quality evidence separates observed evidence from the architecture proposed here.

Quality Vector

A software factory should report independent acceptance dimensions plus their joint intersection:

DimensionDirect evidenceProxy to distrust
Requirement correctnessHidden behavioral tests plus expert adjudicationVisible tests alone
Regression safetyFull-suite, differential, property, or metamorphic checksChanged tests only
SecurityExecutable abuse cases and confirmed findingsScanner count
ArchitectureDependency contracts around stable public boundariesFolder naming
Test integrityProtected baselines and mutation survivalRaw coverage
Scope disciplineAudited actions against an authorization allowlistTask completion
ReviewabilityTrue findings per reviewer minute (TPR/TNR calibrated)Comment volume
OperabilityCanary health, rollback, defect survivalMerge success
EconomicsCost and elapsed time per releasable changeLOC or PR count

At the factory exit, report correctness_pass, regression_pass, security_pass, architecture_pass, and scope_pass, plus their joint releasable patch rate. Critical security, authorization, and data-loss events remain separate tail outcomes.

Risk-Conditioned Control Architecture

flowchart TD
    I[Human Intent and Authorization] --> S[Executable Spec and Contracts]
    S --> C[Context Assembly]
    C --> G[Generator in Isolated Worktree]
    G --> F[Fast Deterministic Checks]
    F -->|Fail: bounded repair| G
    F --> B[Behavior and Regression Oracles]
    B -->|Fail: bounded repair| G
    B --> A[Architecture and Security Contracts]
    A -->|Fail: bounded repair| G
    A --> R[Calibrated Independent Review]
    R -->|Actionable finding: bounded repair| G
    R --> H{Risk Gate}
    H -->|Low risk and observable proof| D[Canary Deployment]
    H -->|Ambiguity or high blast radius| U[Accountable Human Decision]
    D --> T[Telemetry and Rollback]
    T --> S

Tier 0 — Authorization and Containment

  • Declare allowed repositories, paths, services, secrets, and deployment targets.
  • Mount hidden conformance suites and protected regression baselines read-only outside the generator worktree.
  • Keep candidate test paths writable so the generator can use red green tdd; evaluate those tests independently.
  • Isolate filesystem, processes, credentials, and network egress to bound blast radius.^[raw/papers/overeager-coding-agents-2026.md]
  • Record tool actions through audit channels the agent cannot bypass.

Tier 1 — Fast Inner Loop

Run after each coherent edit:

  • TypeScript: oxlint for fast AST checks (see deterministic lint gates for the error-only gate pattern); tsc --noEmit --incremental for type compatibility; changed Vitest/Jest unit tests. [source: oxlint-type-aware-linting-2026]
  • Python: Ruff lint/format; Pyright or mypy under repo policy; changed-scope pytest. Fast checks create cheap back-pressure by catching local syntax and type impossibilities.

Tier 2 — Structural and Behavioral Contracts

Before review:

Tier 3 — Test Strength and Adversarial Verification

Used selectively for critical domain, parser, financial, cryptographic, or security logic:

Tier 4 — Calibrated Independent Review

  • Independent judge agents review diffs against specifications, non-goals, and security policies before seeing implementer rationale.
  • Reviewer agents must be calibrated on expert-labeled sets, reporting true positive (TPR) and true negative rates (TNR) to avoid low-signal review noise.^[raw/papers/code-review-agents-empirical-study-2026.md] [source: hamel-husain-shreya-shankar-evals-skills-2026]

Tier 5 — Risk Gate and Production Feedback

Auto-merge only for pre-approved low-risk changes meeting observable criteria:

  • Conformance suite passes; touched resources match allowlist; regression checks pass without exceptions.
  • Canary monitoring and rollback triggers active. Ambiguous intent or high blast radius requires accountable human sign-off.

Controls by Task Risk

TaskMinimum controlHuman role
Documentation or isolated formattingT0–T1 plus link/build checksSample audit
Local bug fix with reproducerT0–T2 plus protected regressionReview exceptions
Feature in one bounded moduleT0–T2 plus API/property checksApprove spec or boundary changes
Core domain, parser, financial, crypto, authT0–T3 with mutation/adversarial checksMandatory accountable review
Cross-module refactorT0–T4 with dependency graph & characterizationReview architecture & migration
Platform or data migrationT0–T5 with compatibility matrix & canaryApprove rollout
Ambiguous product behaviorPrototype and clarify firstDecide intent; no auto-merge

Oracle Health

A green verifier can still be flawed. Epoch and OpenAI audits demonstrated SWE-bench task contamination, test over-specificity, and exploitable test harness bugs. [source: epoch-swe-bench-verified-analysis-2025] [source: openai-swe-bench-verified-audit-2026] Production harnesses must treat evaluation oracles as production software subject to regression suites, mutation checks, and eval driven development.

What Remains Unverified

  • The causal effect of the complete multi-tier stack on escaped production defects.
  • Long-term maintenance cost under task-matched random assignment.
  • Mutation testing’s cost-effectiveness as an autonomous merge gate.
  • The strongest null: frontier model capability, basic compiler/linter feedback, and human task selection may drive nearly all observed success; multi-tier scaffolding may add compute and false rejection without reducing escapes.
Evidence — verified primary sources
addy-osmani-agentic-code-quality-2026 https://addyosmani.com/blog/agentic-code-quality/
ingested 2026-08-27
sha256:7fa8c35a8f4c…
tessl-coding-benchmarks-misaligned-system-harness-2026 https://arxiv.org/abs/2606.17799
ingested 2026-08-27
sha256:4b68e983226a…
augment-code-software-factory-vs-devops-2026 https://www.augmentcode.com/guides/software-factory-vs-devops
ingested 2026-08-27
sha256:3c17a99bb840…
airbnb-eval-driven-development-2026 https://medium.com/airbnb-engineering/eval-driven-development-lessons-from-evaluating-genai-at-scale-e817e5ae5788
ingested 2026-08-27
sha256:94414a24787c…
stripe-can-ai-agents-build-real-stripe-integrations-2026 https://stripe.com/blog/can-ai-agents-build-real-stripe-integrations
ingested 2026-08-27
sha256:3d30b4fb0d9b…
hamel-husain-shreya-shankar-evals-skills-2026 https://hamel.dev/blog/posts/evals-skills/
ingested 2026-08-27
sha256:c4fc84c125ac…
simon-willison-agentic-engineering-patterns-2026 https://simonwillison.net/guides/agentic-engineering-patterns/
ingested 2026-08-27
sha256:f0fba6d5e10f…
raw/papers/agent-generated-code-maintenance-2026.md internal workspace doc
raw/papers/agentic-pull-requests-github-2026.md internal workspace doc
raw/papers/swe-evo-long-horizon-2026.md internal workspace doc
metr-task-completion-time-horizons-2026 https://metr.org/time-horizons/
ingested 2026-08-27
sha256:01fa095450fa…
epoch-swe-bench-verified-analysis-2025 https://epoch.ai/publications/what-skills-does-swe-bench-verified-evaluate
ingested 2026-08-27
sha256:f05fee740217…
openai-swe-bench-verified-audit-2026 https://openai.com/index/why-we-no-longer-evaluate-swe-bench-verified/
ingested 2026-08-27
sha256:abbd740bbd2c…
raw/papers/security-agentic-pull-requests-2026.md internal workspace doc
raw/papers/code-review-agents-empirical-study-2026.md internal workspace doc
raw/papers/tests-agentic-pull-requests-2026.md internal workspace doc
raw/papers/adversarial-hacker-fixer-verifiers-2026.md internal workspace doc
raw/papers/overeager-coding-agents-2026.md internal workspace doc
oxlint-type-aware-linting-2026 https://oxc.rs/docs/guide/usage/linter/type-aware.html
ingested 2026-08-27
sha256:f22fe71ea605…
dependency-cruiser-rules-reference-2026 https://github.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md
ingested 2026-08-27
sha256:fc4d8ba1aa00…
import-linter-layer-contracts-2026 https://import-linter.readthedocs.io/en/v2.9/contract_types/layers/
ingested 2026-08-27
sha256:d683a14684ad…
strykerjs-configuration-2026 https://stryker-mutator.io/docs/stryker-js/configuration/
ingested 2026-08-27
sha256:0a38b0567a80…
mutmut-documentation-2026 https://mutmut.readthedocs.io/
ingested 2026-08-27
sha256:00e262ebaa5c…
Graph context cluster: person (170 pages) betweenness: 7322 (rank #1)
Referenced by (82)
Agent Harness EngineeringAgentic Engineering Patternsmulti-tier quality controlsAgentic Software FactoryDeterministic Lint GatesEval-Driven Developmentmulti-tier control architectureFive Debts of Agentic EngineeringThe risk-conditioned T0–T5 verification architecture.Releasable Patch RateThe risk-conditioned control architecture.Site-as-Eval-Subject GradingAddy Osmaniconstraint-driven verification and multi-tier feedbackAditi Raghunathanempirical implications for factory quality controlsAhmed E. Hassanempirical implications for factory quality controlsAirbnbmulti-tier quality architectureAndrei Botocanempirical implications for factory quality controlsBeatrice Caseyempirical implications for factory quality controlsBeth Barnesempirical implications for factory quality controlsBrittany Reidempirical implications for factory quality controlsChristoph Csallnerempirical implications for factory quality controlsChristoph Nakazawamulti-tier verification architectureDavid Grosempirical implications for factory quality controlsDavid Reinempirical implications for factory quality controlsDipayan Banikempirical implications for factory quality controlsDORAquality controlsDung Nguyen Manhempirical implications for factory quality controlsEirini Kalliamvakouempirical implications for factory quality controlsEpoch AIoracle-health controlsFlorian Brandempirical implications for factory quality controlsGelei Dengempirical implications for factory quality controlsGergely Oroszverification controlsGitHubspecification and verification controlsHajimu Iidaempirical implications for factory quality controlsHao Liempirical implications for factory quality controlsHaoxiang Zhangempirical implications for factory quality controlsHiroshi Iwataempirical implications for factory quality controlsHuy Nhat Phanempirical implications for factory quality controlsIvan Bercovichempirical implications for factory quality controlsIvgeni Segalempirical implications for factory quality controlsJean-Stanislas Denainempirical implications for factory quality controlsJoanna C. S. Santosempirical implications for factory quality controlsJoel Beckerempirical implications for factory quality controlsK M Ferdousempirical implications for factory quality controlsKen’ichi Yamaguchiempirical implications for factory quality controlsKent BeckKexun Zhangempirical implications for factory quality controlsKowshik Chowdhuryempirical implications for factory quality controlsLeo Yu Zhangempirical implications for factory quality controlsMaliheh Izadiempirical implications for factory quality controlsMartin Fowlerquality control architectureMert Demirerempirical implications for factory quality controlsMiku Watanabeempirical implications for factory quality controlsMinh Vu Thai Phamempirical implications for factory quality controlsModel Evaluation & Threat Researchproposed factory controlsMohammed Latif Siddiqempirical implications for factory quality controlsNate Rushempirical implications for factory quality controlsNghi D. Q. Buiempirical implications for factory quality controlsPeter Cihonempirical implications for factory quality controlsPrem Devanbuempirical implications for factory quality controlsRahul Panditaempirical implications for factory quality controlsRazvan Mihai Popescuempirical implications for factory quality controlsSabrina Haqueempirical implications for factory quality controlsSarvesh Ingaleempirical implications for factory quality controlsShashwat Saxenaempirical implications for factory quality controlsShazibul Islam Shamimempirical implications for factory quality controlsShota Sawadaempirical implications for factory quality controlsSida Pengempirical implications for factory quality controlsSimon Willisonverification controlsStripeverification controlsTatsuya Shiraiempirical implications for factory quality controlsTesslfeedback signal tiers and verification gatesTue Leempirical implications for factory quality controlsVinicius Carvalho Lopesempirical implications for factory quality controlsWes McKinneymulti-tier verification and constraint-driven backpressureXinye Zhaoempirical implications for factory quality controlsYanjun Zhangempirical implications for factory quality controlsYi Liuempirical implications for factory quality controlsYing Zhangempirical implications for factory quality controlsYubin Quempirical implications for factory quality controlsYuekang Liempirical implications for factory quality controlsYutaro Kashiwaempirical implications for factory quality controlsZiqian Zhongempirical implications for factory quality controlsAgentic Code Quality — Evidence MapAgentic Code Quality Cycle 2 — Entity AccountingAgentic Code Quality Evidence — Entity Accounting