Add constraint definition.

Based on the former repository feature_constraints_controller.