Code RoomAPI deprecation codemod
HardPrep Room Coding #5

API deprecation codemod

Vibe & agenticAI agents & automationSenior–Staff~18 min

Your company is removing a deprecated internal API used in roughly four thousand call sites across a large monorepo. Design a codemod agent to do the migration: how it plans the work, what it may change and commit on its own, how the changes reach production safely, and where humans review. Include how you'd verify correctness at that scale — you can't hand-read four thousand diffs — and how you'd convince skeptical code owners to accept agent-authored changes.

Implement
plan_codemod_batches(call_sites: list[str], max_sites_per_pr: int) → list[str]
Examples
in[["payments:simple","payments:simple","payments:simple","search:dynamic"],2]out["owner=payments;rule=simple;sites=2","owner=payments;rule=simple;sites=1","owner=search;rule=manual;sites=1"]
in[["core:generated","core:reflection","core:simple"],10]out["owner=core;rule=manual;sites=2","owner=core;rule=simple;sites=1"]
in[["search:simple","payments:simple","search:simple","payments:wrapper","search:dynamic"],2]out["owner=payments;rule=simple;sites=1","owner=payments;rule=wrapper;sites=1","owner=search;rule=manual;sites=1","owner=search;rule=simple;sites=2"]
What a strong answer looks like

Turn the fuzzy goal into a bounded agent task. Say what the agent reads, what it may do on its own versus draft for a human, and what it must never touch. Then earn the trust: how you’d verify it before rollout, and the pitch (the problem, what you built, why it matters).

0:00 of about 18 min

Agent build: design the agent in plain language (or narrate it). The coach grades the decomposition, the guardrails, the verification plan, and the pitch.

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