1. A method, implemented by a computing system, comprising: upon receiving information associated with a device event, generating, by the computing system, a first rule for a device based on the information and a system state; determining, by the computing system, an updated system state based on the first rule for the device; determining, by the computing system, whether a second rule is required based on the updated system state; and upon determining that the second rule is required based on the updated system state, generating, by the computing system, the second rule.