In this very good P.E. answer, it is explained precisely what it means for a quantum system/theory to have a symmetry group $G$ (where $G$ is a Lie group) : going back to first principles, it means that the Hilbert space $\mathcal H$ is equipped with a projective unitary representation of $G$, ie a morphism $G\to \operatorname{PU}(\mathcal H)$. We can then work out exactly what this means for the Hilbert space itself, in terms of linear representations, encountering central extensions of $G$ (some of which can be detected at the level of the Lie algebra, other are coverings).
My question : what is the corresponding line of reasoning for the gauge group ? Working from first principles as much as possible, how does the global structure of the gauge group factor in defining the QFT ?
I know that to get a positive energy from the Yang-Mills lagrangian, there needs to be a positive definite bilinear form on the Lie algebra, which implies that it is the direct product of an abelian factor and a compact semi-simple Lie algebra.