Add an optional expiry field to the flag manifest schema to indicate flag deprecation/removal dates. This enables a complete lifecycle management workflow for feature flags, including:
- Manifest schema enhancement: Add
expiry field to BaseFlag struct supporting ISO 8601 date format
- Code generation updates: Modify all language generators (Go, Node.js, React, Python, Java, C#, NestJS) to emit deprecation annotations when flags have expiry dates
- Enhanced CLI commands: Update
compare and manifest list commands to visually highlight deprecated flags
- New usage analysis command: Add
manifest usage command to search codebase for flag references, reporting file paths, line numbers, and occurrence counts
This feature addresses a common pain point in feature flag management: understanding when flags are no longer needed and measuring the scope of work required to safely remove them.
Acceptance Criteria
Schema and Core Changes
Generator Updates
CLI Command Enhancements
New Usage Analysis Command
Documentation and Testing
Notes
- The expiry field should be purely informational and not affect runtime behavior
- Consider adding a future enhancement for warning users about flags that are past their expiry date
- The usage analysis command will help teams estimate the effort required to remove deprecated flags
- Deprecation annotations will provide IDE warnings to developers using deprecated flags
- Consider adding
--include-expired and --exclude-expired filters to manifest list command
Add an optional
expiryfield to the flag manifest schema to indicate flag deprecation/removal dates. This enables a complete lifecycle management workflow for feature flags, including:expiryfield toBaseFlagstruct supporting ISO 8601 date formatcompareandmanifest listcommands to visually highlight deprecated flagsmanifest usagecommand to search codebase for flag references, reporting file paths, line numbers, and occurrence countsThis feature addresses a common pain point in feature flag management: understanding when flags are no longer needed and measuring the scope of work required to safely remove them.
Acceptance Criteria
Schema and Core Changes
expiryfield toBaseFlagstruct ininternal/manifest/json-schema.goGenerator Updates
// Deprecated: expires on YYYY-MM-DDcomments for expired flags@deprecated expires on YYYY-MM-DDJSDoc tags@Deprecatedannotations with comments[Obsolete("expires on YYYY-MM-DD")]attributesCLI Command Enhancements
manifest listcommand to visually indicate deprecated flags (e.g., with warning icon or color)comparecommand to highlight when deprecation status changes between manifestsNew Usage Analysis Command
manifest usagecommand with flag key parameterflags.MyFlag()flags.myFlag(),getStringValue('my-flag')flags.my_flag()flags.getMyFlag()flags.MyFlag--formatflag supporting table, JSON, and YAML output--pathflag to limit search scope to specific directoriesDocumentation and Testing
Notes
--include-expiredand--exclude-expiredfilters tomanifest listcommand