API deprecation codemod
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.
plan_codemod_batches(call_sites: list[str], max_sites_per_pr: int) → list[str][["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"][["core:generated","core:reflection","core:simple"],10]out["owner=core;rule=manual;sites=2","owner=core;rule=simple;sites=1"][["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"]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).
Agent build: design the agent in plain language (or narrate it). The coach grades the decomposition, the guardrails, the verification plan, and the pitch.