Cosmological perturbations in generalised gravity theories: formulation | Synapse