Resolve the winning archetypes for a (type, subType) selection from a flat
candidate list: filter to the selection, dedup by shortcode keeping the
winner by the composite ordering priority desc, tier asc, UUID asc, and
return the winners sorted by that same ordering (so the first element is the
highest-priority default).
Candidates with a blank shortcode are not collapsed together (they fall
back to their UUID as the dedup key) — an archetype should always carry a
meaningful shortcode, and merging distinct unkeyed drafts would hide them.
Resolve the winning archetypes for a
(type, subType)selection from a flat candidate list: filter to the selection, dedup by shortcode keeping the winner by the composite ordering priority desc, tier asc, UUID asc, and return the winners sorted by that same ordering (so the first element is the highest-priority default).Candidates with a blank shortcode are not collapsed together (they fall back to their UUID as the dedup key) — an archetype should always carry a meaningful shortcode, and merging distinct unkeyed drafts would hide them.