What this page answers
- Why a flag name such as new-checkout-flow is not enough to decide cleanup.
- How cleanup expectations define timing, evidence, coding rules, dependencies, and end state.
- Where to put cleanup rules so Codex, Claude Code, Copilot, FeatBit CLI, and FeatBit MCP workflows can use them.
A name is not a policy
A flag named new-checkout-flow tells an engineer what it probably controls. It does not say when cleanup starts, which branch should remain, which metrics matter, or which downstream systems must be checked.
That missing policy is why teams can have clean naming and still accumulate stale flags. A coding agent can search a name, but it still needs a cleanup expectation to decide whether the flag is removable, active, or blocked by missing evidence.
Start with type-based expectations
Release flags, experiment flags, operational flags, permission flags, migration flags, and configuration flags should not share one cleanup rule. They have different purposes and different end states.
A release flag might be reviewed 30 stable days after 100% rollout. An experiment flag should be removed after the decision and losing variants are no longer needed. A permission flag may be a long-lived business rule that is reviewed when packaging changes.
Put the policy where agents can read it
FeatBit stores useful evidence such as tags, creation time, rollout state, audit history, and experiment state. The cleanup policy itself should live in repository rules such as AGENTS.md, a project skill, or another file your coding tools read before making changes.
This turns cleanup from a remembered norm into an executable contract. The same rule can guide a developer review, an agent-assisted implementation, and a later cleanup pull request.
- Define default review windows by flag type.
- List lifecycle files such as flag registries, evaluation helpers, and client component props.
- Record business dependencies for special flags.
- Require code deployment before archiving or deleting the FeatBit flag.
Write the cleanup contract once
FeatBit's docs include a copyable cleanup expectation template for repository rules and agent skills.
Use the template