T3 Wave 3 (T21). localStorage-backed library mirroring the T1 modifier-
profile library at modifiers/library.ts:
- Storage key: houserules:custom-modifiers:v1
- Capacity: MAX_ENTRIES (20) with starred-aware FIFO eviction; refusal
with a human reason when every slot is starred.
- API: loadCustomModifierLibrary, saveToCustomModifierLibrary (runs
T19's validateCustomDescriptor before persisting; rejects with the
validator's error list on failure), removeFromCustomModifierLibrary,
setCustomModifierStarred.
- Auto-populates descriptor.createdAt on first save; preserves it
across subsequent saves so library order stays stable.
- Per-entry shape failures during load are silently dropped (matches
T1 library behaviour — one bad row never blocks the drawer).
12 vitest scenarios cover round-trip, malformed-JSON tolerance,
update/remove/star, validator rejection, capacity eviction, and
all-starred refusal.