ADR 0005: Keep runtime-helper and type-utility rules as separate families
- Status: Accepted
- Date: 2026-02-25
Context
The plugin enforces two different migration categories:
- Runtime helper migrations (
prefer-ts-extras-*): code-emitting changes such asObject.keys->objectKeys. - Type utility migrations (
prefer-type-fest-*): compile-time-only alias/type-shape normalization.
Mixing these categories into one conceptual family created confusion in documentation and rollout planning because runtime and type-level migrations have different review risk profiles.
Decision
Keep two explicit rule families and document them as separate design tracks:
prefer-ts-extras-*is treated as runtime behavior standardization.prefer-type-fest-*is treated as type-level expressiveness and consistency standardization.
Rule docs, release notes, and migration guidance should continue to preserve this split.
Rationale
- Clear risk model: runtime migrations require behavioral confidence checks; type-level migrations focus on assignability and API clarity.
- Cleaner rollout strategy: teams can phase runtime and type-only changes independently.
- Better rule authoring discipline: rule metadata, fixes, and examples remain aligned with the migration category.
Consequences
- Documentation and changelogs should explicitly label which family a rule belongs to.
- Bulk autofix campaigns can be grouped by risk profile (runtime vs type-level).
- New rules should declare category intent up front during design/review.
Revisit Triggers
Re-evaluate if:
- the project introduces cross-family rules that intentionally combine runtime and type-level transformations,
- or users report that the split no longer reflects how migration work is planned.