Codebase drift from agent generation
Six months into heavy agent use, your TypeScript monorepo has quietly fractured: there are four ways to fetch data, three date-handling utilities, two competing validation approaches, and a sprawl of one-off helper functions agents generated instead of reusing existing ones. No single PR was wrong; the drift is emergent. As the staff engineer, how do you diagnose the damage, decide what's worth consolidating, and stop agents from re-introducing the same divergence next quarter — without a heavy-handed freeze?
plan_consolidation(usage_lines: list[str], bug_prone_capabilities: list[str]) → list[str][["fetch|apiClient|12","fetch|rawFetch|3","fetch|axiosWrapper|1","dates|dateUtil|9"],["dates"]]out["fetch|apiClient|4"][["dates|dateUtil|4","dates|momentShim|4","dates|handRolled|2","validation|zodSchemas|10","validation|manualChecks|1"],["dates"]]out["dates|dateUtil|18","validation|zodSchemas|1"][["fetch|apiClient|5"],[]]out[]Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.