Text this: Fundamentals of story logic