DEVOPS

Scan code for stale feature flags and open removal PRs

Weekly scans your GitHub repository for feature flags that have been fully rolled out or untouched past a threshold.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires
  • ActionSearch repo for flag references and datesGitHubGitHub
  • LogicKeep flags past staleness threshold and fully rolled out
  • ActionGenerate minimal removal diff per flagOpenAI
  • ActionOpen one removal PR per stale flagGitHubGitHub
  • OutputPost opened PRs to SlackSlack

What it does

Finds feature flags that have outlived their purpose and proposes their removal as code. Every week it walks the repo, cross-references each flag against its rollout state, and for any flag that is 100% on (or 100% off and long-dead) it opens a focused pull request that deletes the flag check and collapses the surviving branch.

When to use it

When flag debt is piling up and nobody has time to chase down which flags are safe to delete. Ideal for teams that gate features behind boolean flags and want a steady, low-effort cleanup cadence instead of a once-a-year purge.

How it works

  1. 1A weekly schedule kicks off the run.
  2. 2The repo is searched (GitHub code search) for all flag references and their last-modified dates.
  3. 3A logic step keeps only flags older than the staleness threshold whose rollout is fully resolved.
  4. 4For each surviving flag, an OpenAI step generates the minimal diff that removes the gate and keeps the live branch.
  5. 5A GitHub action opens one removal PR per flag, labeled `flag-cleanup`.
  6. 6A Slack message posts the list of opened PRs to the platform channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.