Since my project is small I am looking at small (relative to the current crop of MMetcetera) solutions to this problem.
About a year and a half ago I dove heavily into researching interactive fiction, and discovered that someone had made some progress in creating an Interactive Fiction Markup Language based on the Inform. And while the work doesn't seem to have been updated since 2002 it does a good job of breaking down the problems inherent in creating a conditional/stateful story browser.
When I was teaching web design at Kendall College or Art and Design I would have my students write a simple "Choose your own adventure" book in HTML as a way of learning how anchor tags work. Inevitably some of the students would ask how to allow the user to carry items from one room to another, or how to keep score, or something of the like. Then I would have to explain the concept of "having state", which is the same thing as saying "having a past". In order to change to something it is necessary to have changed from something. Otherwise the change is meaningless.
Building a story engine modeled on the work done by the IF crowd makes sense to me. I won't be using the language-based toolset ("Go N"), but the rest will be quite useful.