Rule identification and completion