name: ocaml-opam-tinyflags-cleanup-flag description: Remove a stale TinyFlags flag and simplify OCaml call sites.
Cleanup TinyFlags Flag
Use this skill when a TinyFlags flag has reached its final treatment and should be removed from an OCaml package.
Workflow
- Identify the final behavior: enabled, disabled, or a specific variant.
- Replace
Tinyflags.enabled,Tinyflags.variant, andTinyflags.evaluatecall sites with the final behavior, simplifying the surroundingmatchorifexpression. - Delete the flag entry from the
Tinyflags.make_exn [ ... ]definition list. - Remove alcotest cases that only exercise obsolete rollout branching.
- Add or update tests for the final simplified behavior.
- Search for the flag name (string literal and any module-level binding
such as
let checkout_redesign = "checkout-redesign") acrosslib/,test/,README.md, and the.opamsynopsis.
Guardrails
- Do not leave a deleted flag referenced in a string literal anywhere.
- Do not keep rollout-specific tests after the rollout branch is gone.
- Preserve the public module signature unless the package's release notes
explicitly call out a breaking change. Add or update the
.mlifile accordingly. - Keep OCaml style consistent with the host project: same indentation,
same alcotest assertion style (
Alcotest.(check bool)).