1. A computer-implemented method comprising: maintaining in an online system: a set of feature expressions, each feature expression comprising one or more of: (1) a feature representing a value describing an entity represented in the online system, and (2) an expression composing one or more other feature expressions using operators, the expression mapping a set of input values to an output value, and a set of policies, each policy comprising a precondition represented as a feature expression and a policy action, wherein the policy action is executed responsive to the precondition being satisfied; receiving information describing one or more actions performed by users of the online system, each action associated with entities of the online system; and responsive to receiving information describing each action: evaluating each feature expression from the set of feature expressions, determining whether a precondition of a policy from the set of policies is satisfied based on feature expression of the precondition, and responsive to the precondition of the policy being satisfied, executing the corresponding policy action.