<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Flagship</title>
    <description>The latest articles on DEV Community by Flagship (@goflagship).</description>
    <link>https://dev.to/goflagship</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4133457%2F85614eae-bf08-4708-806e-1f557a748924.jpg</url>
      <title>DEV Community: Flagship</title>
      <link>https://dev.to/goflagship</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/goflagship"/>
    <language>en</language>
    <item>
      <title>Why WET is the New DRY: Structuring code for Agentic LLMs</title>
      <dc:creator>Flagship</dc:creator>
      <pubDate>Mon, 21 Sep 2026 11:54:20 +0000</pubDate>
      <link>https://dev.to/goflagship/why-wet-is-the-new-dry-structuring-code-for-agentic-llms-nf3</link>
      <guid>https://dev.to/goflagship/why-wet-is-the-new-dry-structuring-code-for-agentic-llms-nf3</guid>
      <description>&lt;h2&gt;
  
  
  The problem with DRY
&lt;/h2&gt;

&lt;p&gt;For decades, developers have been used to write code following a &lt;strong&gt;DRY&lt;/strong&gt; paradigm: &lt;strong&gt;Don't Repeat Yourself&lt;/strong&gt;. This project structure is drilled into the minds of web developers since their first youtube tutorial: every piece of code you need more than once, should be exported to a shared function, and referenced when needed.&lt;/p&gt;

&lt;p&gt;But the landscape of coding is actively shifting. We are moving from human keystrokes to relying on &lt;strong&gt;Agentic LLMs&lt;/strong&gt;, dynamic AI systems like Claude Code, Open Code or Devin, that plan, write and test full projects.&lt;/p&gt;

&lt;p&gt;As these AI agents become our collaborators, DRY architecture is becoming a liability. Instead, &lt;strong&gt;WET&lt;/strong&gt; (&lt;strong&gt;Write Everything Twice&lt;/strong&gt;, or &lt;strong&gt;Write Every Time&lt;/strong&gt;) is being reconsidered as the best way to structure projects for AI-driven development.&lt;/p&gt;

&lt;p&gt;Here is why having a project full of duplicate code, might not be as bad as they brought us to think.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Token Trap of Deep Abstractions
&lt;/h2&gt;

&lt;p&gt;Agentic AI &lt;strong&gt;writes code differently&lt;/strong&gt; when compared to human devs. When an agent tackles a task, it &lt;strong&gt;loads all the relevant files&lt;/strong&gt; into his &lt;strong&gt;context window&lt;/strong&gt;, works out the logic, and execute changes based on a &lt;strong&gt;continuous loop&lt;/strong&gt; of observation and reflection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In a hyper DRY codebase&lt;/strong&gt;, every problem is solved using lots of small solutions, &lt;strong&gt;scattered&lt;/strong&gt; among lots of files, meaning an AI Agent, to understand the codebase and perform an edit we might see as simple, needs to &lt;strong&gt;sift&lt;/strong&gt;, &lt;strong&gt;fetch&lt;/strong&gt; and &lt;strong&gt;keep all these files loaded&lt;/strong&gt; in &lt;strong&gt;working memory&lt;/strong&gt;, &lt;strong&gt;consuming tens of thousands of tokens&lt;/strong&gt; just in tool calls and file reads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WET architecture keeps logic localized&lt;/strong&gt; by allowing some duplication, so all the context an AI needs to understand to reach an objective lives there, drastically decreasing cognitive load and API cost, as well as preventing the AI from wandering around dependencies and forgetting the original goal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Death of the "Typing Penalty"
&lt;/h2&gt;

&lt;p&gt;Historically, &lt;strong&gt;WET code was interpreted&lt;/strong&gt; as "We Enjoy Typing" or "Waste Everyone's Time" in a &lt;strong&gt;mocking&lt;/strong&gt; way. &lt;strong&gt;For a human developer, that is absolutely correct&lt;/strong&gt;, writing the same code five times over is tedious, boring and prone to syntax errors. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For an AI on the other hand&lt;/strong&gt;, typing is &lt;strong&gt;instantaneous&lt;/strong&gt; and &lt;strong&gt;flawless&lt;/strong&gt;. &lt;strong&gt;The physical cost&lt;/strong&gt; of WET architecture &lt;strong&gt;dropped to zero&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;AI excels at generating boilerplate, pattern-matching, and scaffolding out full files in seconds. When the primary friction of WET architecture the manual labor of typing is removed by an LLM, we are free to focus on the concept we want to build, and how to prompt it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimizing the AI's "Blast Radius"
&lt;/h2&gt;

&lt;p&gt;One of the &lt;strong&gt;biggest risks&lt;/strong&gt; of using autonomous AI agents is &lt;strong&gt;unintended consequences&lt;/strong&gt;. When an agent edits a &lt;strong&gt;highly abstracted, shared DRY function&lt;/strong&gt; to fix a bug for &lt;strong&gt;some feature&lt;/strong&gt;, &lt;strong&gt;it risks accidentally breaking 3 other features&lt;/strong&gt; that relied on that same abstraction.&lt;/p&gt;

&lt;p&gt;WET architecture &lt;strong&gt;isolates&lt;/strong&gt; components. AHA principle (Avoid Hasty Abstractions) says &lt;strong&gt;duplication is cheaper and safer than the wrong abstraction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The AI can &lt;strong&gt;confidently&lt;/strong&gt; rewrite the &lt;strong&gt;localized&lt;/strong&gt; code, run its tests, and &lt;strong&gt;verify success&lt;/strong&gt;, &lt;strong&gt;without&lt;/strong&gt; needing to trigger &lt;strong&gt;a huge test suite across the entire application&lt;/strong&gt; to ensure it didn't break a shared utility.&lt;/p&gt;

&lt;p&gt;This isolation &lt;strong&gt;gives the agent&lt;/strong&gt; the &lt;strong&gt;psychological safety to act autonomously&lt;/strong&gt;. It can &lt;strong&gt;plan&lt;/strong&gt; and &lt;strong&gt;execute freely&lt;/strong&gt; with the blast radius of its changes is &lt;strong&gt;confined to a single component&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;TLDR&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Hyper optimized, DRY code was &lt;strong&gt;built for human limitations&lt;/strong&gt;: our slow typing speeds and our need for a single source of truth to hold in our limited biological memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI agents just don't have these bottlenecks&lt;/strong&gt;. They &lt;strong&gt;thrive&lt;/strong&gt; on &lt;strong&gt;clear context&lt;/strong&gt;, &lt;strong&gt;isolated blast radiuses&lt;/strong&gt;, and &lt;strong&gt;linear logic&lt;/strong&gt;. WET architecture means our &lt;strong&gt;AI tools get used to their full capabilities&lt;/strong&gt;, it means providing them with the exact environment they thrive in, it means &lt;strong&gt;cheaper costs&lt;/strong&gt;, it means &lt;strong&gt;local LLMs&lt;/strong&gt; that can actually, finally build &lt;strong&gt;fast&lt;/strong&gt;, &lt;strong&gt;safe&lt;/strong&gt;, and autonomous software.&lt;/p&gt;

&lt;p&gt;And &lt;strong&gt;that&lt;/strong&gt;, is the reason we chose WET architecture for our &lt;strong&gt;AI-ready&lt;/strong&gt; SaaS boilerplate, &lt;strong&gt;Flagship&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So have fun tinkering with Agentic AIs knowing about these advantages, and &lt;strong&gt;give us feedback&lt;/strong&gt; about the outcome!&lt;/p&gt;

&lt;p&gt;Flagship signing off.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
