
How do I get an AI coding agent to reuse existing code instead of creating duplicate functions?
Search for existing code by name and by behavior before planning a new helper, judge near-matches by their contract, point the agent at canonical examples, and review diffs for duplicates.







