To begin with, FD use two different sets of luminosity classes - one for hand-authored real stars, and another for proc-gen stars.
With the proc-gen stars, the luminosity classes use the A -> AB -> B distinction which is normally seen in supergiant spectra for almost all the spectra. Like VA, VAB, VB. A real star would just be called V without distinction. In the case where a hand-authored primary star has proc-gen secondaries, you can see this illustrated, e.g. HIP 72235 has a G5 V primary and an M7 VA secondary.
Luminosity classes are assigned in-game based strictly on luminosity calculated from (T**4) * (R**2). For real stars, they're usually assigned (AIUI) by looking at pressure broadening effects on spectral lines.
Each spectral temperature subclass (G0, G1, G2...) has a different set of boundary values for the different possible luminosity classes. A G0 star of 1 solar luminosity will be called G0 VB. A G1 star of 1 solar luminosity will be called G1 VAB, and so on. Not all luminosity classes are available for each spectral temperature subclass. The overall consequence is a stepped distribution where some stars of lower luminosity can appear to have a brighter luminosity class than stars of higher luminosity...
(I haven't worked out the underlying formula that determines the shape of the steps - I have a lot of
empirical data and know most of the boundaries fairly well.)
Some of the luminosity divisions are simply backwards as far as I can tell, like B9 IA stars are less luminous than B9 IAB.
And there are one or two instances where luminosities are forced: all M9 stars are M9 VI, all brown dwarfs are V.