DEVOPS

Slack-Triaged Flag Cleanup PR Generator

An engineer types a flag key in a Slack command and the workflow gathers the flag's state, finds its call sites, and uses an agent to draft a cleanup PR that removes the toggle.

CategoryDevOps
EngineSim + Paperclip
Difficultyadvanced
Triggerchat
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSlack slash-command with flag keySlack
  • ActionConfirm rollout state and winning variantPostgreSQLPostgres
  • ActionFind all call sites in repoGitHubGitHub
  • LogicAgent rewrites sites and removes flag
  • ActionOpen cleanup branch and PRGitHubGitHub
  • OutputReply in Slack with PR linkSlack

What it does

Turns a single Slack slash-command into a ready cleanup pull request. An engineer names a flag, and the workflow pulls its rollout state, finds every reference in the repo, and uses an agent to rewrite each call site to the winning branch, then opens the PR.

When to use it

Use it during flag-cleanup sprints or one-off retirements when an engineer already knows which flag to kill and wants the mechanical edits and PR drafted for them.

How it works

  1. 1A Slack slash-command supplies the flag key.
  2. 2The workflow queries Postgres to confirm the flag's rollout state and pick the winning variant.
  3. 3It searches GitHub for all call sites of the flag key.
  4. 4An agent rewrites each site to inline the winning branch and removes the flag definition.
  5. 5It opens a GitHub branch and pull request with the edits and a summary.
  6. 6It replies in the Slack thread with the PR link and a diff summary.

Set it up

What you configure once, before turning it on.

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