Keep a map file the agent reads every session
Four tax implementations, three date helpers, ninety files in utils. Each was written by an agent that was given an empty picture of the codebase and built what it needed in front of it.
Tax is computed in billing/tax.ts and nowhere else.
Dates go through lib/format/date.ts.
Search for an existing helper before writing one.A minute per feature to keep it current. It is the single thing that stops the duplication.
ai-agentsmaintenance
Longer version: the post this came from.