Sometimes a little duplicated code makes a feature easier for an AI coding agent to understand and change. That is the case for selective explicitness—not a rule to copy every function instead of using abstractions. Keep a rule shared when it must stay consistent; consider keeping implementation local when similar-looking pieces have different reasons to change.
What “WET is the new DRY” means
DRY—“Don’t Repeat Yourself”—is a familiar design principle: avoid maintaining the same knowledge in multiple places. In this discussion, WET is a deliberately provocative counterpoint. It means tolerating some repetition so the logic for a feature is visible where an agent is asked to work, rather than requiring it to trace several shared layers.
The phrase is an argument about tradeoffs, not a settled engineering standard. The Flagship article on DEV Community frames it around the idea that abstractions can scatter relevant logic, while explicit code may be easier to follow. Its AHA formulation is: “AHA principle (Avoid Hasty Abstractions) says duplication is cheaper and safer than the wrong abstraction.” That is the article’s wording, not a quotation from a separately identified standards body or individual.
Why code locality matters for agents
Anthropic describes Claude Code as an agentic coding tool that can read a codebase, edit files, run commands, and work across multiple files and tools (Anthropic’s Claude Code overview). When a requested change crosses abstractions or files, an agent must inspect the relevant definitions and relationships before it can make a safe edit. Keeping a feature’s steps together may reduce that navigation and make the intended change easier to review.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems#1 Best Overall
That is a plausible design consideration, not a measured result. The available sources do not establish a general token-cost advantage, quantify productivity or defect rates, or show that all coding agents gather context in the same way. Nor do they demonstrate that duplicated code is safer in every project.
When duplication helps—and when it hurts
Consider local, explicit code when
- Two pieces look similar but represent different business decisions or have different reasons to change.
- A routine feature change is difficult to follow because its behavior is distributed among helpers, configuration, and shared abstractions.
- The implementation is small enough that keeping it nearby improves readability without creating a second copy of a rule that must remain identical.
Keep behavior shared when
- Multiple features depend on the same rule and should change together.
- Duplicating the rule would require separate updates whenever the underlying policy changes.
- A shared helper has a clear purpose and makes the behavior easier to test, understand, and review rather than merely hiding it behind indirection.
The important distinction is between duplicated structure and duplicated knowledge. Two workflows may have similar steps but evolve independently; copying the same authorization, validation, or calculation rule can instead create inconsistent behavior if one copy is updated and another is missed.
Rank #2
A practical way to choose
Before extracting a shared abstraction—or duplicating an existing one—ask what should change together. Use these questions to make the boundary explicit:
- Trace a routine change. How many files and concepts must a developer or agent inspect to make a typical change? Does a shared layer clarify the route or make it harder to see?
- Identify the knowledge. Do the repeated sections encode one rule, or do they merely have a similar shape?
- Compare change boundaries. Should the instances evolve together, or should each feature be free to change independently?
- Estimate the reach. How many callers and features could be affected by a change to the abstraction?
- Plan for divergence. If code is duplicated, what tests and review checks will catch copies that should have changed together?
These are decision questions, not a scoring formula. If the same policy must remain identical, sharing it usually makes that relationship clearer. If a common abstraction would force independently changing features into lockstep, a small amount of local repetition may be the simpler design.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Explicit workflows can coexist with shared infrastructure
The Pipulate project describes its approach as “WET Workflows, DRY Framework”: workflows remain explicit and step-by-step, while common framework structure is shared (Pipulate on GitHub). This is an example of selective explicitness, not comparative evidence that the approach is universally better. It illustrates how local clarity in feature logic can coexist with reuse for genuinely common infrastructure.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Should you duplicate code for an AI coding agent?
Sometimes—but not simply because the editor is an AI. Prefer code that makes the relevant behavior and change boundary clear. Duplicate a small implementation when its instances are likely to evolve independently and a shared abstraction would add more navigation than value. Share a rule when it represents one piece of knowledge that must remain consistent. Then test the behavior and review the full set of affected call sites, whether the implementation is local or shared.
The case for WET is therefore selective: make code easy to locate and reason about, without turning “agent-friendly” into an excuse for unsynchronized copies. The available sources provide an architectural argument and examples, not controlled measurements proving that WET beats DRY across codebases.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




