We propose a step-by-step manual for the construction of alternative theories of gravity, perturbatively as well as in the exact setting. The construction is guided by no more than two fundamental principles that we impose on the gravitational dynamics: their invariance under spacetime diffeomorphisms and the compatibility of their causal structure with given matter dynamics, provided that spacetime is additionally endowed with a matter field. The developed framework then guides the computation of the most general, alternative theory of gravity that is consistent with the two fundamental requirements. Utilizing this framework we recover the cosmological sector of General Relativity solely from assuming that spacetime is a spatially homogeneous and isotropic metric manifold. On top of that, we explicitly test the framework in the perturbative setting, by deriving the most general third-order expansion of a metric theory of gravity that is causally compatible with a Klein-Gordon scalar field. Thereby we recover the perturbative expansion of General Relativity. Moreover, we construct the most general third-order perturbative theory of gravity that is capable of supporting a general (not necessarily Maxwellian) linear theory of electrodynamics.