A unified formalism for the core mass-luminosity relations of shell-burning stars