Turn stale feature flags into weekly Jira cleanup tickets

By General Input

Every Monday, we find the feature flags your team has outgrown, open a cleanup ticket for each one, and post a single summary to Slack.

Integrations

  • LaunchDarkly
  • Jira
  • Slack

Type

Agentic Task

Categories

  • Engineering

Every Monday at 9am, audit our LaunchDarkly feature flags for ones that have turned into technical debt, and open a Jira cleanup ticket for each one.

Start in LaunchDarkly with "List feature flag statuses" against the production environment. A flag is a cleanup candidate when its status is launched or inactive and its last requested date is more than 30 days ago. Launched means the flag is fully rolled out and is no longer making a decision; inactive means nothing has evaluated it recently. Both are signals the flag can probably come out of the codebase. Treat the 30 day window as a setting I may want to change.

For every candidate, gather the flag's details using "List feature flags" and "Get feature flag" so you have its name, key, description, tags, maintainer, creation date, and per-environment configuration.

Skip any flag tagged permanent or ops. Those tags mark kill switches and long-lived operational toggles that are supposed to stay in place, so they must never be proposed for removal even when they look inactive. Skip them silently, but keep a count so you can mention how many were excluded.

Before creating anything, use Jira "Search Issues (JQL)" to look for an open cleanup ticket that already references the flag key in our engineering project. If one exists, skip that flag. This runs every week, so it must not reopen the same ticket each Monday.

For each remaining flag, create a ticket with Jira "Create Issue" in our engineering project. Lead the title with the flag key so it is searchable, for example "Remove stale flag: checkout-new-payment-form". In the description cover when the flag was created, when it was last evaluated and how many days ago that was, which environments still have it enabled, and the flag's own description and tags for context. Where LaunchDarkly records a maintainer, assign the ticket to that person by matching their email with "Find Users Assignable to Issue". If there is no maintainer or no matching Jira user, leave it unassigned rather than guessing.

Finish by posting a single roundup to Slack with "Send a Message". One message for the whole run, not one per flag. Include how many stale flags were found, the tickets that were opened with their keys and links alongside the flag each covers, and call out the three oldest offenders by how long they have gone unevaluated. If nothing qualified, post a short all clear instead so we know the audit ran.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes