DEVOPS

Weekly stale feature-flag sweep with cleanup PRs

Every week, scans the flag provider for flags that have been fully rolled out or untouched past a threshold, opens a GitHub PR removing the flag's dead code paths.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires the sweep
  • ActionFetch all flags and rollout state from providerHTTP webhook
  • LogicKeep only flags past the staleness threshold
  • ActionOpen a draft cleanup PR per stale flagGitHubGitHub
  • OutputDM the flag owner the PR link in SlackSlack

What it does

Runs a scheduled hygiene sweep over your feature flags. It finds flags that are stale — 100% rolled out for longer than your grace period, or with zero evaluations in the last N days — and for each one opens a draft GitHub pull request that strips the flag guard and keeps the winning code path. It then notifies the flag's owner in Slack so a human reviews and merges.

When to use it

Use it when flags pile up after launches and nobody circles back to delete them. Good for teams that treat flags as temporary release tooling and want a standing janitor instead of a quarterly manual audit.

How it works

  1. 1A weekly schedule fires the sweep.
  2. 2An HTTP call pulls the full flag list and rollout state from your flag provider.
  3. 3A logic step keeps only flags past the staleness threshold (fully rolled out or unevaluated).
  4. 4For each survivor, GitHub opens a draft cleanup PR removing the flag's branches.
  5. 5Slack DMs the owner the flag name and PR link for review.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect GitHubRepos, issues, pull requests, actions.
  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.