
feature_decision(feature) := result if {
  has_feature_rule(feature)
  rule := feature_rule(feature)
  matched := [matched_rule | matched_rule := rule; action_match(matched_rule)]
  deny_rules := [matched_rule | matched_rule := matched[_]; not object.get(matched_rule, "allow", false)]
  allow_rules := [matched_rule | matched_rule := matched[_]; object.get(matched_rule, "allow", false)]
  count(deny_rules) > 0
  result := {
    "allow": false,
    "matched_rules": matched,
    "deny_rules": deny_rules,
    "allow_rules": allow_rules,
  }
}