Code RoomCodebase drift from agent generation
HardPrep Room Coding #4248

Codebase drift from agent generation

Vibe & agenticDatabases & SQLSenior–Staff~24 min

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?

Implement
plan_consolidation(usage_lines: list[str], bug_prone_capabilities: list[str]) → list[str]
Examples
in[["fetch|apiClient|12","fetch|rawFetch|3","fetch|axiosWrapper|1","dates|dateUtil|9"],["dates"]]out["fetch|apiClient|4"]
in[["dates|dateUtil|4","dates|momentShim|4","dates|handRolled|2","validation|zodSchemas|10","validation|manualChecks|1"],["dates"]]out["dates|dateUtil|18","validation|zodSchemas|1"]
in[["fetch|apiClient|5"],[]]out[]
What a strong answer looks like

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.

0:00 of about 24 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.