I've always wondered, what if you were to wire up a panel and one light to the grid, but the then rest of the house is on a separate independent circuit? Technically the house is on-grid...
I suspect the dividing line is voltage? >50v systems in cars are treated differently, so maybe the same for houses, you probably don't need that much for lighting anyway.