Complete AI Training
Sign inGet my AI kit

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI agent for systems engineers

Feature Flag Cleanup Agent

Retire unused feature flags safely.

Feature Flag Cleanup Agent: what goes in, what the agent does and what you get

What it does

Old feature flags pile up in the code with unclear dependencies, and removing the wrong one can break a release. Each quarter this agent maps every flag's use across code, experiments and release plans. For each flag it checks for live dependencies, including rollback plans that rely on it. Any flag with a live dependency stays protected. For flags that are truly unused, it prepares a cleanup proposal with the code locations and a removal order. It rechecks the proposal against the latest release plans before handing it over. Product operations approves, and engineers disable flags and deploy. Edge case: a flag looks unused but a release plan relies on it for rollback, so it stays.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
Yes, continueYes, continueApprovedNoNo 1 STARTS WHEN Quarterly flag review 2 USES A TOOL List all flags and their age 3 USES A TOOL Map flag usage in code, experiments and releaseplans 4 CHECKS THE RESULT Is the flag free of code, experiment and rollbackdependencies? If not: keep it protected. Back to step 3. 5 DOES Prepare the cleanup proposal 6 CHECKS THE RESULT Is the proposal still valid against the latestrelease plans? If not: remove newly dependent flags from the proposal.Back to step 3. 7 YOU APPROVE Product ops approves 8 RESULT Flag retirement review
Read the steps as a list
  1. Quarterly flag review
  2. List all flags and their age
  3. Map flag usage in code, experiments and release plans
  4. Is the flag free of code, experiment and rollback dependencies?If not: keep it protected. Back to step 3.
  5. Prepare the cleanup proposal
  6. Is the proposal still valid against the latest release plans?If not: remove newly dependent flags from the proposal. Back to step 3.
  7. Product ops approvesThe agent waits here for your OK.
  8. Flag retirement review

How it decides

It protects any flag with a live dependency.

  • Protect any flag with a live dependency.
  • Rollback plans count as a dependency.
  • The agent never disables flags or deploys.

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Sources to scan (code, experiment tool, release plans)
  • Minimum age before a flag is considered (default 90 days)
  • Removal batch size (default 10 flags)
  • Who approves cleanup

What keeps you in control

It always asks you first

  • Disabling flags
  • Deploying changes

Hard limits

  • Read-only.

It stops when

  • Done: proposal ready.

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensThe Q3 review on 1 October maps 84 flags. The agent finds 27 with no code references. The dependency check fails for 4 of them: experiments still read 2, and the payments release plan uses another 2 for rollback. Those stay protected. It drafts a cleanup proposal for 23 flags. A final recheck finds a new reference added that week, so it drops 1. Product ops approves 22.

More agents for systems engineers