improve user-defined rules config & loading