I have never worked in these advanced nodes, but in many
PDKs there are non-printing layers used for things like device
recognition / indication of intent. The rules will use a getTexted()
to figure out what the device is supposed to be, rather than
trying to figure out intent based on polygons. The layout call
will contain a text on some IX (or text) layer that says what
the thing is supposed to be, and this drives the device-specific-
construction-rules locally (the usual groundrules also apply,
but some things like "must contain" that relate to very specific
devices, is made much easier / less "circular" (like, if your NPN
was missing the base, would NPN construction even get
checked so you know it was malformed? Or, is N+ in N- legal
and you know nothing?).