Couple comments: * It is important to sort the skills_5min. We should always give the most recently invoked skill the first chance to handle the utterance.
I think the easiest way to handle this would be to use a list instead of a dictionary. I also don't like the name "skills_5min" because it won't make sense if we go to, say, a 7 minute window. So I'd rather use the name "active_skills".
So in init you'd do:
self.active_skills = 
When you invoke a skill you'd:
self.active_skills.insert(0, [skill, time])
When you "touch" a Skill you can just remove it from this list and prepend it with skills_5min.insert(0, skill) to keep the list sorted. I realize this causes a little headache whenever you add a skill to the list, since you have to search the list for and existing entry that already contains it and remove that reference. You can minimize the effort by creating helpers like: remove_active_skill(skill) and add_active_skill(skill).
There are probably a few other implementations. But having this sorted is a pretty big deal that I'd like in place from the beginning.
- Nitpick: "whether" instead of "wether" :)
- Nitpick: let's avoid mixing in camelCase. So use "converse()" instead of "Converse()" and "do_conversation()" instead of "doConversation()". My apologies if I used camelCase when we were talking about this in Slack -- bad habit of mine.