Use compiler pass to add rules as listeners.