https://projectaon.org/staff/christian/gamebook.js/
which was, admittedly, a strange idea (an experimental mix between a gamebook and interactive fiction), which I explained there:
http://cjauvin.blogspot.com/2013/03/suspension-of-parser-dis...
Nowadays I would use an LLM for that, of course.