We introduce and study a new discrete basis of gravity constraints by making use of harmonic expansion for closed cosmological models. The full set of constraints is split into area-preserving spatial diffeomorphisms, forming closed subalgebra, and Virasoro-like generators. Operational Hamiltonian BFV-BRST quantization is performed in the framework of perturbative expansion in the dimensionless parameter, which is a positive power of the ratio of Planckian volume to the volume of the Universe. For the (N + 1)-dimensional generalization of stationary closed Bianchi-I cosmology the nilpotency condition for the BRST operator is examined in the first quantum approximation. It turns out that a certain relationship between the dimensionality of the space and the spectrum of matter fields emerges from the requirement of quantum consistency of the model.