marker-interface-nested-enum-polymorphism
Installation
SKILL.md
A tag interface plus a runtime discriminator
A tag carries no members. It exists so that unrelated classes — persistence rows, search results, locally created records — can appear in one list and be accepted by one renderer:
interface HomeContentType
interface LibraryType
Where the renderer genuinely has to branch, the tag adds a nested enum and one accessor:
interface PlaylistType : HomeContentType, LibraryType {
enum class Type { REMOTE, RADIO, LOCAL, ALBUM, SERIES }
fun playlistType(): Type
}