Does Code Quality Still Matter When AI Writes the Code?
Summary
DocSpring examines whether AI coding agents make technical debt less important. Using coding-agent transcripts, pull-request discussions, selected code changes, and small experiments from the previous three months, the team conducted a retrospective case study rather than a controlled productivity measurement. The clearest failures involved behavior duplicated across multiple paths and checks that failed to express the intended contract. In one example, a fix for JSON Pointer escaping reached conditional field visibility but missed the separate branch that made a field required, so the validator was not attached until a follow-up correction. DocSpring argues that shared implementations and tests covering meaningful combinations would make these omissions easier to detect. A second example involved a Ruby subclass defining `lint_command` while its base class expected `linter_command`; Sorbet accepted the typo under strict typing because both methods were independently valid. Adding an explicit `override` contract made Sorbet reject the non-overriding method, showing that strict typing only helps when the intended relationship is expressed. The investigation found no clear evidence that agents fail at a particular file-length threshold. Smaller modules were useful when they isolated frequently changed behavior with clear inputs, outputs, and tests, while total line count was a poor measure. Duplicate-code detection and lint rules likewise required judgment: textual matches can reveal shared transformations, but business-rule duplication may look different, and warnings do not automatically justify refactoring. The article also cites a SonarSource study of 660 Claude Code trials on six Java and Python repository pairs: cleaner code used about 7% fewer input tokens and 9% fewer output tokens, but did not improve the mean fraction of hidden tests passed. DocSpring plans a time-boxed pilot measuring active human work, correction rounds, CI and release waiting time, and post-release defects while recording task type, model, and harness. Its conclusion is that AI makes neglected code easier to revisit, but quality work should target what agents repeatedly miss rather than pursue cleanup for its own sake.