Text this: Logical Foundations for Rule-Based Systems