Feature Flag Debt Audit
Use this skill to turn feature-flag debt into an owner-ready cleanup plan. The skill can run the repository scanner at feature-flag-debt-audit/scripts/feature_flag_debt_audit.py and then apply the guardrails from feature-flag-debt-audit/references/cleanup-rules.md.
Inputs
- Flag export as CSV or JSON.
- Repository path to scan.
- Stale policy in days.
- Owner and rollout constraints when known.
Workflow
- Preserve flag metadata, owner, status, type, last-seen date, expiry, and code references.
- Run the local scanner when files are available.
- Classify each flag as
delete_candidate,owner_review,instrument_first, orkeep_permanent. - Refuse broad deletion plans without owner approval, production-state evidence, references, tests, and rollback instructions.
- Return a Markdown cleanup report with guardrails, code references, cleanup tickets, and verification steps.
Command
python3 feature-flag-debt-audit/scripts/feature_flag_debt_audit.py \
--flags feature-flag-debt-audit/scripts/fixtures/flags.csv \
--code-dir feature-flag-debt-audit/scripts/fixtures/sample_app \
--stale-days 90 \
--today 2026-05-12
Expected output includes Flag Debt Decision, at least one delete_candidate, at least one keep_permanent, and reference counts.