Overview
Ask Devin to remove one retired feature flag at a time, run the tests and open a pull request that you check against CI and your own flag records before merging.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Devin
- Prerequisites
- Devin with access to the repository. Its introduction page says to sign up at app.devin.ai for access, that Individual and Teams plans are available, and that if your company already works with Cognition you can request permissions from your administrator or Cognition and use the web application.
How It Works
List the flags your team has confirmed are retired and the value each should be frozen to, checking your flag system yourself. Pick one. In a Devin session on the repository, give the flag name and final value and ask for a plan first: every reference, the branches that become dead code, and the tests and configuration affected. Approve or correct the plan. Then have Devin make the change, run the tests and open a draft pull request that lists what it removed and anything it is unsure about. If a check fails, ask it to find out whether the same failure appears without the change before any test is edited. Read the diff and CI results yourself, merge only when satisfied, and delete the flag from your flag service by hand after the code is deployed.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Devin.
- Connect the toolsConnect the tools this workflow relies on: Devin.
- Check the prerequisitesDevin with access to the repository. Its introduction page says to sign up at app.devin.ai for access, that Individual and Teams plans are available, and that if your company already works with Cognition you can request permissions from your administrator or Cognition and use the web application.
- Gather your detailsCollect what the prompt asks for: Repository, Flag to remove, Final value, Test command.
- Run the starter promptPaste the starter prompt below into Devin and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.devin.ai before you rely on it.
Practical Starter Prompt: Remove one retired feature flag
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
In [Repository], remove the feature flag [Flag to remove], which is permanently [Final value]. First give me a plan: every reference to the flag, the code that becomes unreachable, and the tests and configuration you would change. Wait for my approval. Then make the change on a new branch, run [Test command], and open a draft pull request listing what you removed and anything uncertain. If a test fails, tell me whether it also fails without your change before editing it. Do not merge, deploy or change any value in the flag service.Approve the plan before code changes, review the diff and CI, and do the merge, deployment and flag deletion yourself.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Devin's documentation lists removing unused feature flags among the tasks it is strong at, and describes running tests, checking its own changes and returning pull requests for review. It does not cover your flag service or your pipeline, and no run was observed.
Limitations and Considerations
Only someone who knows the rollout history should declare a flag dead: one that looks unused may still be switched on for a single customer or environment. Devin's guidance says tasks with test suites, CI checks or verifiable outcomes yield the best results, so read changes on untested paths with extra care. Give the session only the repository access it needs and no permission to change production flag values. Check your plan's usage limits and cost before running many removals. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Introducing Devin - Devin Docs (opens in a new tab)
Project documentation · docs.devin.ai · Undated · Source checked 2 Dec 2026, 16:40 UTC
What this source supports
- Devin is an autonomous AI software engineer that can write, run and test code.
- Carving out tasks from your todo list at the start of your day and returning to draft PRs waiting for review.
- To access Devin, sign up at app.devin.ai .
- When to Use Devin - Devin Docs (opens in a new tab)
Project documentation · docs.devin.ai · Undated · Source checked 2 Dec 2026, 16:40 UTC
What this source supports
- Tasks with test suites, CI checks, or verifiable outcomes yield the best results.
- Review findings Devin escalated, check CI, and decide whether the PR is ready to merge.