CHATBOTS

Weekly Stale Feature-Flag Cleanup Concierge in Slack

On a weekly schedule the bot finds feature flags that have been fully on or off and untouched for 30+ days, posts a batched cleanup proposal in Slack.

CategoryChatbots
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires the cleanup run
  • ActionQuery Postgres for 30+ day stale flagsPostgreSQLPostgres
  • LogicExit if no stale flags qualify
  • ActionPost batched cleanup proposal to SlackSlack
  • ActionOpen GitHub PR removing approved flagsGitHubGitHub
  • OutputLog decision to Postgres + link PR in SlackPostgreSQLPostgres

What it does

Fights flag debt automatically. Each week the bot scans the Postgres flag store for flags that have sat at a constant value with no toggles for 30+ days — the classic candidates for removal. It groups them into one Slack digest with each flag's last-change date and owner, then waits for an approver. Approved flags get a single GitHub PR that strips them from the manifest, and the cleanup decision is recorded in Postgres.

When to use it

Use it to keep your flag inventory from accumulating dead toggles. Instead of an ad-hoc audit nobody runs, you get a scheduled, owner-visible cleanup with a reviewable PR and an approval gate before anything is removed.

How it works

  1. 1A weekly schedule fires the cleanup run (trigger).
  2. 2The bot queries Postgres for flags unchanged for 30+ days at a steady value.
  3. 3If none qualify, it exits quietly; otherwise it builds a batched proposal.
  4. 4It posts the candidate list with owners and Approve/Skip controls to Slack.
  5. 5On approval, it opens one GitHub PR removing the approved flags from the manifest.
  6. 6It logs the cleanup decision to Postgres and links the PR in Slack.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect PostgresAny Postgres URL — query, write, migrate.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  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.