  We classify the countable ultrahomogeneous 2-vertex-colored graphs in which
the color classes are imprimitive, i.e., up to complementation they form
disjoint unions of cliques. This generalizes work by Jenkinson, Lockett and
Truss as well as Rose on ultrahomogeneous $n$-graphs. As the key aspect in such
a classification, we identify a concept called piecewise ultrahomogeneity. We
prove that there are two specific graphs whose occurrence essentially dictates
whether a graph is piecewise ultrahomogeneous, and we exploit this fact to
prove the classification.
