Feature flag cleanup driver
Your codebase carries hundreds of feature flags, many fully rolled out years ago, and every one is a live code path someone must reason about. Design an agent that drives flag cleanup — finding stale flags and opening removal pull requests. Removal changes production behavior, so what checks must pass before it even proposes a change, who reviews, and how do you bound the blast radius? How do you validate the approach, and what's the case to engineering leadership?
select_removable_flags(observations: list[str], min_flat_days: int) → list[str][["checkout_v2,prod,default,100,180","checkout_v2,prod,enterprise_a,0,180","new_pricing,prod,default,100,200","new_pricing,staging,default,100,200"],90]out["new_pricing"][["dark_mode,prod,default,0,365","dark_mode,staging,default,0,365","ab_test,prod,default,50,400"],90]out["dark_mode"][["fast_path,prod,default,100,30","fast_path,staging,default,100,120"],90]out[]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.