--- name: remove-old-feature-flags-without-changing-behavior description: "Old feature flags pile up and make code hard to read. Your AI removes the ones that are always on and keeps behavior the same. Use for: Remove old feature flags without changing behavior." --- # Remove old feature flags without changing behavior Old feature flags pile up and make code hard to read. Your AI removes the ones that are always on and keeps behavior the same. ## What you need from the user - Your list of flags and where they're set - Proof each flag is on everywhere - The tests that cover the flagged code ## What to give back A diff that removes each always-on flag, updates its tests and lists anything that could change behavior. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Help me remove old feature flags that are always on. Flags to remove and their setting in each environment: [list] Where the flags are used: [paste code, or point to my repo] Tests that cover this code: [list] 1. Check that each flag is on everywhere. Skip any that aren't and say why. 2. Remove the flag and its dead branch, keeping the "on" path. 3. Update or remove tests that only test the "off" path. 4. List anything that could change behavior, like other code reading the flag. Make the change as a diff on a new branch. I'll run the tests, review it and merge it myself. ``` ## Rules - BotCurrent rates this job "Acts with your OK". Show what you will do and wait for a clear yes before each action. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - Check that a flag is on in every environment before you remove it. A flag that's off for some users will change what they see. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/retire-obsolete-feature-flags-while-preserving-behaviour-880c222cb94e/ Original report: https://devin.ai/customers/ramp BotCurrent has not tested this skill. Check the result before you use it.