1: \begin{abstract}
2: We propose a generalisation of the congruence subgroup problem for groups acting on rooted trees.
3: Instead of only comparing the profinite completion to that given by level stabilizers, we also compare pro-$\C$ completions of the group, where $\C$ is a pseudo-variety of finite groups.
4: A group acting on a rooted, locally finite tree has the $\C$-congruence subgroup property ($\C$-CSP) if its pro-$\C$ completion coincides with the completion with respect to level stabilizers.
5: We give a sufficient condition for a weakly regular branch group to have the $\C$-CSP.
6: In the case where $\C$ is also closed under extensions (for instance the class of all finite $p$-groups for some prime $p$), our sufficient condition is also necessary.
7: We apply the criterion to show that the Basilica group and the GGS-groups with constant defining vector (odd prime relatives of the Basilica group) have the $p$-CSP.
8: \end{abstract}
9: