{"id":11208,"date":"2026-01-27T16:29:12","date_gmt":"2026-01-27T16:29:12","guid":{"rendered":"https:\/\/techtrendfeed.com\/?p=11208"},"modified":"2026-01-27T16:29:12","modified_gmt":"2026-01-27T16:29:12","slug":"assessing-inner-high-quality-whereas-coding-with-an-agent","status":"publish","type":"post","link":"https:\/\/techtrendfeed.com\/?p=11208","title":{"rendered":"Assessing inner high quality whereas coding with an agent"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>There\u2019s no scarcity of stories on how AI coding assistants, brokers, and fleets of brokers have written huge quantities of code in a short while, code that reportedly implements the options desired. It\u2019s uncommon that individuals discuss non-functional necessities like efficiency or safety in that context, perhaps as a result of that\u2019s not a priority in most of the use circumstances the authors have. And it\u2019s even rarer that individuals assess the standard of the code generated by the agent. I\u2019d argue, although, that inner high quality is essential for improvement to proceed at a sustainable tempo over years, reasonably than collapse below its personal weight.<\/p>\n<p>So, let\u2019s take a better take a look at how the AI tooling performs in the case of <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/martinfowler.com\/articles\/is-quality-worth-cost.html#SoftwareQualityMeansManyThings\">inner code high quality<\/a>. We\u2019ll add a characteristic to an current utility with the assistance of an agent and take a look at what\u2019s occurring alongside the way in which. In fact, this makes it \u201csimply\u201d an anecdote. This memo is on no account a research. On the identical time, a lot of what we\u2019ll see falls into patterns and might be extrapolated, not less than in my expertise.<\/p>\n<h2 id=\"the-feature-were-implementing\">The characteristic we\u2019re implementing<\/h2>\n<p>We\u2019ll be working with the codebase for <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/ccmenu.org\/\">CCMenu<\/a>, a Mac utility that exhibits the standing of CI\/CD builds within the Mac menu bar. This provides a level of issue to the duty as a result of Mac functions are written in Swift, which is a typical language, however not fairly as widespread as JavaScript or Python. It\u2019s additionally a contemporary programming language with a fancy syntax and sort system that requires extra precision than, once more, JavaScript or Python.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/martinfowler.com\/articles\/exploring-gen-ai\/ccmenu-screenshot.png\" alt=\"Screenshot of CCMenu showing a list of pipelines and their status\" \/><\/p>\n<p>CCMenu periodically retrieves the standing from the construct servers with calls to their APIs. It at present helps servers utilizing a legacy protocol applied by the likes of Jenkins, and it helps GitHub Actions workflows. Essentially the most requested server that\u2019s not at present supported is GitLab. So, that\u2019s our characteristic: we\u2019ll implement help for GitLab in CCMenu.<\/p>\n<h2 id=\"the-api-wrapper\">The API wrapper<\/h2>\n<p>GitHub gives the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.github.com\/en\/rest\/actions?apiVersion=2022-11-28\">GitHub Actions API<\/a>, which is secure and effectively documented. GitLab has the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/api\/rest\/\">GitLab API<\/a>, which can also be effectively documented. Given the character of the issue house, they&#8217;re semantically fairly related. They\u2019re not the identical, although, and we\u2019ll see how that impacts the duty later.<\/p>\n<p>Internally, CCMenu has three GitHub-specific information to retrieve the construct standing from the API: a feed reader, a response parser, and a file that accommodates Swift capabilities that wrap the GitHub API, together with capabilities like the next:<\/p>\n<pre><code class=\"language-Swift\">  func requestForAllPublicRepositories(person: String, token: String?) -&gt; URLRequest\n  func requestForAllPrivateRepositories(token: String) -&gt; URLRequest\n  func requestForWorkflows(proprietor: String, repository: String, token: String?) -&gt; URLRequest\n<\/code><\/pre>\n<p>The capabilities return <code>URLRequest<\/code> objects, that are a part of the Swift SDK and are used to make the precise community request. As a result of these capabilities are structurally fairly related they delegate the development of the <code>URLRequest<\/code> object to 1 shared, inner perform:<\/p>\n<pre><code class=\"language-Swift\">  func makeRequest(methodology: String = \"GET\", baseUrl: URL, path: String,\n        params: Dictionary<string string=\"\"> = [:], token: String? = nil) -&gt; URLRequest\n<\/string><\/code><\/pre>\n<p>Don\u2019t fear in the event you\u2019re not aware of Swift, so long as you recognise the arguments and their varieties you\u2019re tremendous.<\/p>\n<h2 id=\"optional-tokens\">Elective tokens<\/h2>\n<p>Subsequent, we should always take a look at the <code>token<\/code> argument in a bit extra element. Requests to the API\u2019s might be authenticated. They don\u2019t need to be authenticated however they are often authenticated. This enables functions like CCMenu to entry data that\u2019s restricted to sure customers. For many API\u2019s, GitHub and GitLab included, the token is solely a protracted string that must be handed in an HTTP header.<\/p>\n<p>In its implementation CCMenu makes use of an optionally available string for the token, which in Swift is denoted by a query mark following the kind, <code>String?<\/code> on this case. That is idiomatic use, and Swift forces recipients of such optionally available values to cope with the optionality in a secure manner, avoiding the basic null pointer issues. There are additionally particular language options to make this simpler.<\/p>\n<p>Some capabilities are nonsensical in an unauthenticated context, like <code>requestForAllPrivateRepositories<\/code>. These declare the token as non-optional, signalling to the caller {that a} token should be supplied.<\/p>\n<h2 id=\"lets-go\">Let\u2019s go<\/h2>\n<p>I\u2019ve tried this experiment a few instances, throughout the summer season utilizing Windsurf and Sonnet 3.5, and now, just lately, with Claude Code and Sonnet 4.5. The strategy remained related: break down the duty into smaller chunks. For every of the chunks I requested Windsurf to provide you with a plan first earlier than asking for an implementation. With Claude Code I went straight for the implementation, counting on its inner planning; and on Git when one thing ended up going within the incorrect course.<\/p>\n<p>As a primary step I requested the agent, kind of verbatim: <em>\u201cBased mostly on the GitHub information for API, feed reader, and response parser, implement the identical performance for GitLab. Solely write the equal for these three information. Don&#8217;t make adjustments to the UI.\u201d<\/em><\/p>\n<p>This gave the impression of an inexpensive request, and by and enormous it was. Even Windsurf, with the much less succesful mannequin, picked up on  key variations and dealt with them, e.g. it recognised that what GitHub calls a repository is a challenge in GitLab; it noticed the distinction within the JSON response, the place GitLab returns the array of runs on the high stage whereas GitHub has this array as a property in a top-level object.<\/p>\n<p>I hadn\u2019t regarded on the GitLab API docs myself at this stage and simply from a cursory scan of the generated code all the things regarded fairly okay, the code compiled and even the advanced perform varieties had been generated accurately, or had been they?<\/p>\n<h2 id=\"first-surprise\">First shock<\/h2>\n<p>Within the subsequent step, I requested the agent to implement the UI so as to add new pipelines\/workflows. I intentionally requested it to not fear about authentication but, to only implement the stream for publicly accessible data. The dialogue of that step is perhaps for an additional memo, however the brand new code by some means must acknowledge {that a} token is likely to be current sooner or later<\/p>\n<pre><code class=\"language-Swift\">  var apiToken: String? = nil\n<\/code><\/pre>\n<p>after which it could possibly use the variable within the name the wrapper perform<\/p>\n<pre><code class=\"language-Swift\">  let req = GitLabAPI.requestForGroupProjects(group: title, token: apiToken)\n  var tasks = await fetchProjects(request: req)\n<\/code><\/pre>\n<p>The <code>apiToken<\/code> variable is accurately declared as an optionally available String, initialised to <code>nil<\/code> for now. Later, some code may retrieve the token from one other place relying on whether or not the person has determined to check in. This code led to the primary compiler error:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/martinfowler.com\/articles\/exploring-gen-ai\/ccmenu-error.jpg\" alt=\"Screenshot of Xcode panel showing a compiler error in GitLabProjectList.swift. The error reads &quot;Value of optional type 'String?' must be unwrapped to a value of type 'String'&quot;.\" width=\"50%\" \/><\/p>\n<p>What\u2019s occurring right here? Properly, it seems that the code for the API wrapper in step one had a little bit of a refined downside: it declared the tokens as non-optional in <em>all<\/em> the wrapper capabilities, e.g.<\/p>\n<pre><code class=\"language-Swift\">  func requestForGroupProjects(group: String, token: String) -&gt; URLRequest\n<\/code><\/pre>\n<p>The underlying <code>makeRequest<\/code> perform, for one purpose or one other, was created accurately, with the token declared as optionally available.<\/p>\n<p>The code compiled as a result of in the way in which the capabilities had been written, the wrapper capabilities undoubtedly have a string and that may after all be handed to a perform that takes an optionally available string, an argument that could be  a string or nothing (<code>nil<\/code>). However now, within the code above, now we have an optionally available string and that may\u2019t be handed to a perform that wants a (particular) string.<\/p>\n<h2 id=\"the-vibe-fix\">The vibe repair<\/h2>\n<p>Being lazy I merely copy-pasted the error message again to Windsurf. (Constructing a Swift app in something however Xcode is an entire completely different story, and I bear in mind an experiment with Cline the place it alternated between including and eradicating specific imports, at about 20\u00a2 per iteration.) The repair proposed by the AI for this downside labored: it modified the call-site and inserted an empty string as a default worth for when no token was current, utilizing Swift\u2019s <code>??<\/code> operator.<\/p>\n<pre><code class=\"language-Swift\">  let req = GitLabAPI.requestForGroupProjects(group: title, token: apiToken ?? \"\")\n  var tasks = await fetchProjects(request: req)\n<\/code><\/pre>\n<p>This compiles, and it kinda works: if there\u2019s no token an empty string is substituted, which implies that the argument handed to the perform is both the token or the empty string, it\u2019s all the time a string and by no means <code>nil<\/code>.<\/p>\n<p>So, what\u2019s incorrect? The entire level of declaring the token as optionally available was to sign that the token is optionally available. The AI ignored this and launched new semantics: an empty string now alerts that no token is offered. That is<\/p>\n<ul>\n<li>not idiomatic,<\/li>\n<li>not self-documenting,<\/li>\n<li>unsupported by Swift\u2019s kind system.<\/li>\n<\/ul>\n<p>It additionally required adjustments in each place the place this perform is named.<\/p>\n<h2 id=\"the-real-fix\">The true repair<\/h2>\n<p>In fact, what the agent ought to\u2019ve carried out is to easily change the perform declaration of the wrapper perform to make the token optionally available. With that change all the things works as anticipated, the semantics stay intact, and the change is restricted to including a single <code>?<\/code> to the perform argument\u2019s kind, reasonably than spraying <code>?? \"\"<\/code> all around the code.<\/p>\n<h2 id=\"does-it-really-matter\">Does it actually matter?<\/h2>\n<p>You would possibly ask whether or not I\u2019m splitting hair right here. I don\u2019t suppose I&#8217;m. I feel this can be a clear instance the place an AI agent left to their very own would have modified the codebase for the more severe, and it took a developer with expertise to note the difficulty and to direct the agent to the right implementation.<\/p>\n<p>Additionally, this is only one of many examples I encountered. Sooner or later the agent needed to introduce a very pointless cache, and, after all, couldn\u2019t clarify why it had even instructed the cache.<\/p>\n<p>It additionally failed to grasp that the person\/org overlap in GitHub doesn\u2019t exist within the GitLab, and went to implement some sophisticated logic to deal with a non-existing downside. It took greater than nudging the agent in direction of the right locations within the documentation to speak it down from insisting that the logic was wanted.<\/p>\n<p>It additionally \u201cforgot\u201d to make use of current capabilities to assemble URLs, replicating such logic in a number of locations, typically with out implementing all performance, e.g. the choice to overwrite the bottom URL for testing functions utilizing the defaults system on macOS.<\/p>\n<p>So, in these circumstances, and there have been extra, the generated code labored. It applied the performance required. However the brand new code additionally would\u2019ve added utterly pointless complexity and it missed non-obvious performance, lowering the standard of the codebase and introducing refined points.<\/p>\n<p>If engaged on giant software program techniques has taught me one factor it\u2019s that investing within the inner high quality of the software program, the standard of the codebase, is a worthwhile funding. Don\u2019t get overwhelmed by technical debt. People and brokers discover it tougher to work with an advanced codebase. With out cautious oversight, although, the AI brokers appear to have a robust tendency to introduce technical debt, making future improvement tougher, for people and brokers.<\/p>\n<h2 id=\"one-more-thing\">Another factor<\/h2>\n<p>If attainable, CCMenu exhibits the avatar of the particular person\/actor that triggered the construct. In GitHub the avatar URL is a part of the response to the construct standing API name. GitLab has a \u201ccleaner\u201d, extra RESTful design and retains further person data out of the construct response. The avatar URL should be retrieved with a separate API name to a <code>\/person<\/code> endpoint.<\/p>\n<p>Each Windsurf and Claude Code stumbled over this in a serious manner. I bear in mind a longish dialog the place Claude Code needed to persuade me that the URL was within the response. (It most likely received combined up as a result of a number of endpoints had been described on the identical web page of the documentation.) In the long run I discovered it simpler to implement that performance with out agent help.<\/p>\n<h2 id=\"my-conclusions\">My conclusions<\/h2>\n<p>Throughout the experiments in the summertime I used to be on the fence. The Windsurf \/ Sonnet 3.5 combo did pace up writing code, nevertheless it required cautious planning with prompts, and I needed to swap forwards and backwards between Windsurf and Xcode (for constructing, working exams, and debugging), which all the time felt considerably disorientating and received tiring shortly. The standard of the generated code had vital points, and the agent had an inclination to get caught attempting to repair an issue. So, on the entire it felt like I wasn\u2019t getting a lot out of utilizing the agent. And I traded doing what I like, writing code, for overseeing an AI with an inclination to jot down sloppy code.<\/p>\n<p>With Claude Code and Sonnet 4.5 the story is considerably completely different. It wants much less prompting, and the code has higher high quality. It\u2019s on no account top quality code, nevertheless it\u2019s higher, requiring much less rework and fewer prompting to enhance high quality. Additionally, working a dialog with Claude Code in a terminal window alongside Xcode felt extra pure than switching between two IDEs. For me this has tilted the scales sufficient to make use of Claude Code recurrently.<\/p>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>There\u2019s no scarcity of stories on how AI coding assistants, brokers, and fleets of brokers have written huge quantities of code in a short while, code that reportedly implements the options desired. It\u2019s uncommon that individuals discuss non-functional necessities like efficiency or safety in that context, perhaps as a result of that\u2019s not a priority [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":11210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[75,7580,1256,3877,5848],"class_list":["post-11208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-agent","tag-assessing","tag-coding","tag-internal","tag-quality"],"_links":{"self":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/11208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11208"}],"version-history":[{"count":1,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/11208\/revisions"}],"predecessor-version":[{"id":11209,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/11208\/revisions\/11209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/media\/11210"}],"wp:attachment":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 69d9690a190636c2e0989534. Config Timestamp: 2026-04-10 21:18:02 UTC, Cached Timestamp: 2026-05-06 18:09:25 UTC -->