  We introduce an abstract framework for the study of clustering in metric
graphs: after suitably metrising the space of graph partitions, we restrict
Laplacians to the clusters thus arising and use their spectral gaps to define
several notions of partition energies; this is the graph counterpart of the
well-known theory of spectral minimal partitions on planar domains and includes
the setting in [Band \textit{et al}, Comm.\ Math.\ Phys.\ \textbf{311} (2012),
815--838] as a special case. We focus on the existence of optimisers for a
large class of functionals defined on such partitions, but also study their
qualitative properties, including stability, regularity, and parameter
dependence. We also discuss in detail their interplay with the theory of nodal
partitions. Unlike in the case of domains, the one-dimensional setting of
metric graphs allows for explicit computation and analytic -- rather than
numerical -- results. Not only do we recover the main assertions in the theory
of spectral minimal partitions on domains, as studied in [Conti \textit{et al},
Calc.\ Var.\ \textbf{22} (2005), 45--72; Helffer \textit{et al}, Ann.\ Inst.\
Henri Poincar\'e Anal.\ Non Lin\'eaire \textbf{26} (2009), 101--138], but we
can also generalise some of them and answer (the graph counterparts of) a few
open questions.
