Duplicate Tooling
This is the "script proliferation" pain point. It's that frustrating discovery that the 50-line utility script the AI just wrote for you is a near-perfect duplicate of one that already exists deep in the codebase. Because the AI's default behavior is to generate new code rather than search for existing, re-usable code, it constantly "re-invents the wheel." This creates a maintenance nightmare where your codebase is littered with multiple, slightly different versions of the same exact utility.
By default, an AI agent lacks full-repository awareness. When a developer asks for a utility (e.g., "write a script to validate email addresses"), the AI's path of least resistance is to generate a new script from scratch. It has no easy way to "search" the repository to see if a validateEmail() function already exists in a shared utils folder. This lack of a "find-then-use" workflow leads to a constant proliferation of duplicate tools and helper functions, bypassing your team's established, shared libraries.
This is a silent killer for maintainability, acting as a "technical debt multiplier." The codebase becomes bloated with redundant, single-use scripts, increasing the maintenance overhead exponentially. When a bug is found in the original validation script, no one knows to fix the three other AI-generated duplicates that are now scattered across the repository. This creates massive inconsistency and confusion, as different parts of the application are now doing the same thing in slightly different, and possibly buggy, ways.
The "Duplicate Validator"
The AI generates a brand new isValidEmail() function in a component file, unaware that the team has a battle-tested, regex-compliant validateEmail function in a shared utils/validation.js module.
The "Forked" Audit Script
Two different developers, in two different parts of the repo, ask an AI to "write a script to find unused icons." The AI generates two similar but slightly different scripts (find_unused_icons.sh and audit_icons.py), creating two sources of truth for the same task.
The "Redundant Pre-Commit Hook"
A developer asks the AI to "write a script to check image sizes before committing." The AI creates a new check-images.js hook, not knowing that the main CI/CD pipeline already has a built-in step that performs the exact same check, just with a different tool.
The "Shadow" Helper Function
The AI writes a new formatCurrency function, not knowing that the team already has a useCurrencyFormatter hook that is wired up to the central localization and theming system. The new function "works" but doesn't respect the user's currency preference.
The problem isn't the AI; it's the lack of a human-in-the-loop verification and governance system. These workflows are the perfect antidote.
Prevent Duplicate Tooling
View workflow →The Pain Point It Solves
This workflow directly attacks the "script proliferation" problem by requiring developers to search the codebase before creating any new script or tool. Instead of allowing AI to generate new code from scratch, this workflow enforces a "find-then-use" approach that prevents duplicate tooling.
Why It Works
It enforces tool discovery. By requiring developers to search the codebase (grep -r "function.*check|function.*validate|function.*audit" scripts/ lib/) before creating any new script, checking for similar functionality in existing scripts, and reviewing ADRs for existing patterns, this workflow ensures that AI cannot constantly "re-invent the wheel." If an existing tool is found, use it. If it needs enhancement, extend it rather than creating a duplicate. This prevents the maintenance nightmare of multiple, slightly different versions of the same utility.
Pre-Change Validation
The Pain Point It Solves
This workflow addresses the "lack of repository awareness" problem by requiring developers to search for existing validation scripts before making changes. Instead of allowing AI to create duplicate tools, this workflow ensures that existing tools are discovered and used.
Why It Works
It enforces repository awareness. By requiring developers to search for existing validation scripts (find scripts/ -name "*check*" -o -name "*validate*" -o -name "*audit*") before making changes, reviewing pre-commit hooks to see what validations already exist, and verifying tools work before using them, this workflow ensures that AI has "full-repository awareness" and cannot bypass established, shared libraries. This prevents the proliferation of duplicate tools and helper functions.
Want to prevent this pain point?
Explore our workflows and guardrails to learn how teams address this issue.
Engineering Leader & AI Guardrails Leader. Creator of Engify.ai, helping teams operationalize AI through structured workflows and guardrails based on real production incidents.