<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t" -->

---
title: How we automated feature-flag cleanup with Agentic Pipelines
description: Atlassian describes how one internal team automated stale feature-flag cleanup using Agentic Pipelines in Bitbucket. A scheduled Rovo Studio automation rule...
canonical: https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How we automated feature-flag cleanup with Agentic Pipelines | daily.dev
og:description: Atlassian describes how one internal team automated stale feature-flag cleanup using Agentic Pipelines in Bitbucket. A scheduled Rovo Studio automation rule...
og:url: https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t
og:image: https://api.daily.dev/og/posts/JLNnMCZ3T.png
og:image:alt: How we automated feature-flag cleanup with Agentic Pipelines
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How we automated feature-flag cleanup with Agentic Pipelines

**[Atlassian](https://daily.dev/sources/atlassian)** · 8 min read · 2 upvotes · 0 comments

## Summary

Atlassian describes how one internal team automated stale feature-flag cleanup using Agentic Pipelines in Bitbucket. A scheduled Rovo Studio automation rule finds stale flag tickets in Jira and triggers a coding-agent pipeline for each one. The agent reads ticket metadata, loads a versioned 'flag-cleanup skill', verifies the current codebase state, inlines the final flag behavior, removes dead code, runs lint/type-check/tests, and opens a pull request for human review. The prompt is kept intentionally thin while domain knowledge lives in an editable skill file. Engineers still review and merge every PR. The team has run this since April 2026 and suggests the pattern generalizes to other bounded maintenance tasks like dependency updates or documentation fixes. Agentic Pipelines remains in beta for Bitbucket Cloud.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.atlassian.com/blog/bitbucket/how-we-automated-ff-cleanup-with-agentic-pipelines>

## Questions this post answers

### How does Atlassian automate feature-flag cleanup using AI coding agents in Bitbucket?

A scheduled Rovo Studio automation rule queries Jira for stale flag-cleanup tickets, then triggers a coding-agent pipeline run in Bitbucket for each one. The agent reads the ticket's flag name and final value, loads a flag-cleanup skill, verifies the flag's current state in the codebase, inlines the final behavior, removes the dead branch, runs lint/type-check/tests, and opens a pull request for engineer review.

_Teams automating repetitive maintenance work can follow similar agentic pipeline patterns shared on daily.dev._

### Why keep the AI agent prompt thin and put domain logic in a separate skill file instead?

Keeping the prompt thin and putting flag-cleanup knowledge in a versioned skill file avoids scattering domain logic across prompt text and pipeline configuration. The skill encodes how flags are registered and consumed across frontend and backend so it can be reviewed, updated as codebase patterns drift, and reused whether triggered by a pipeline or run interactively by a developer.

_Developers designing agent workflows can compare prompt-versus-skill design tradeoffs like this one on daily.dev._

### What safety checks prevent an AI coding agent from opening a broken pull request during automated flag cleanup?

The agent must verify the flag's current state in the codebase before editing, since ticket context can be stale if the flag was already removed or its final value changed. Checks such as linting, type-checking, and tests must pass before a pull request opens; if it cannot produce a safely passing change, it stops and reports the result instead of opening a failing PR. Branch restrictions and scoped tokens further limit what the agent can touch.

_Engineers evaluating agent safety guardrails for CI/CD can track these patterns on daily.dev._

## Similar posts on daily.dev

- [How We Turned Feature Flag Cleanup Into a Mostly‑Hands‑Off AI Workflow](https://daily.dev/posts/how-we-turned-feature-flag-cleanup-into-a-mostly-hands-off-ai-workflow-tuii8tkbg) · Atlassian · 0 upvotes · 0 comments
- [How we made vulnerability fixes review-ready with Agentic Pipelines](https://daily.dev/posts/how-we-made-vulnerability-fixes-review-ready-with-agentic-pipelines-xxtgsat4y) · Atlassian · 0 upvotes · 0 comments
- [Agentic automation in practice: putting standard engineering work on autopilot](https://daily.dev/posts/agentic-automation-in-practice-putting-standard-engineering-work-on-autopilot-km13vjz8f) · Atlassian · 0 upvotes · 0 comments
- [Teaching an agent to auto-fix bugs](https://daily.dev/posts/teaching-an-agent-to-auto-fix-bugs-iu4hvtr8d) · Linear · 1 upvotes · 0 comments
- [How We Used Agentic Pipelines to Swarm Documentation](https://daily.dev/posts/how-we-used-agentic-pipelines-to-swarm-documentation-sdly2qldb) · Atlassian · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#cicd](https://daily.dev/tags/cicd), [#bitbucket](https://daily.dev/tags/bitbucket)

[View this post on daily.dev](https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How we automated feature-flag cleanup with Agentic Pipelines","url":"https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t"},"datePublished":"2026-09-24T04:41:33.703Z","dateModified":"2026-09-24T04:42:00.273Z","description":"Atlassian describes how one internal team automated stale feature-flag cleanup using Agentic Pipelines in Bitbucket. A scheduled Rovo Studio automation rule...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/905e586d5badc6b6cec497b63c210be5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/905e586d5badc6b6cec497b63c210be5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Atlassian","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Atlassian","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/44750d8e66de4411bb477159b321bb43","url":"https://daily.dev/sources/atlassian"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,cicd,bitbucket","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Atlassian","item":"https://daily.dev/sources/atlassian"},{"@type":"ListItem","position":3,"name":"How we automated feature-flag cleanup with Agentic Pipelines"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-we-automated-feature-flag-cleanup-with-agentic-pipelines-jlnnmcz3t#faq","mainEntity":[{"@type":"Question","name":"How does Atlassian automate feature-flag cleanup using AI coding agents in Bitbucket?","acceptedAnswer":{"@type":"Answer","text":"A scheduled Rovo Studio automation rule queries Jira for stale flag-cleanup tickets, then triggers a coding-agent pipeline run in Bitbucket for each one. The agent reads the ticket's flag name and final value, loads a flag-cleanup skill, verifies the flag's current state in the codebase, inlines the final behavior, removes the dead branch, runs lint/type-check/tests, and opens a pull request for engineer review. Teams automating repetitive maintenance work can follow similar agentic pipeline patterns shared on daily.dev."}},{"@type":"Question","name":"Why keep the AI agent prompt thin and put domain logic in a separate skill file instead?","acceptedAnswer":{"@type":"Answer","text":"Keeping the prompt thin and putting flag-cleanup knowledge in a versioned skill file avoids scattering domain logic across prompt text and pipeline configuration. The skill encodes how flags are registered and consumed across frontend and backend so it can be reviewed, updated as codebase patterns drift, and reused whether triggered by a pipeline or run interactively by a developer. Developers designing agent workflows can compare prompt-versus-skill design tradeoffs like this one on daily.dev."}},{"@type":"Question","name":"What safety checks prevent an AI coding agent from opening a broken pull request during automated flag cleanup?","acceptedAnswer":{"@type":"Answer","text":"The agent must verify the flag's current state in the codebase before editing, since ticket context can be stale if the flag was already removed or its final value changed. Checks such as linting, type-checking, and tests must pass before a pull request opens; if it cannot produce a safely passing change, it stops and reports the result instead of opening a failing PR. Branch restrictions and scoped tokens further limit what the agent can touch. Engineers evaluating agent safety guardrails for CI/CD can track these patterns on daily.dev."}}]}
```

