Plan the Removal of a Feature Flag: Find Dead Branches, Dependents, and the Safe Order of Deletion

A feature flag has been at 100% (or 0%) for a long time and we want to remove it. I will paste the flag name, the code search results for it, and its current config across environments.

Produce a removal plan:
1. Confirm the flag's effective value in every environment from the config I gave; list any environment where it differs or is unknown.
2. List every usage grouped by type: code branches, tests, config/IaC, dashboards or alerts, docs, and analytics events.
3. For each code usage, name the branch that survives and the branch that becomes dead, and any code only reachable from the dead branch.
4. Identify hidden dependents: other flags that are nested or combined with this one, cached values, and clients on old versions that may still read it.
5. Propose a sequence of small PRs (for example: stop reading the flag, remove tests for the dead path, delete config), each with a rollback note.
6. List what to verify after each step.

Do not assume usages I did not show you; list what additional searches are needed.

Input:
[FLAG NAME, SEARCH RESULTS, CONFIG]

Sign in to upvote this prompt.