Implement non-linear transitions between steps. This is one of the key goals of the planned update to the API.
The idea is that each step has a callback function which decides which step to proceed to. This callback is called when an event occurs, such certain mw.hook, a user-provided event (there will be a way to tell the tour to check at a particular time), or a page change.
There can also be global transitions, which apply throughout the whole tour (for example, clicking "edit source" at any time may transition to the first step of the wikitext editing flow).
Simple use case:
Have a single tour with the basics of both wikitext and VisualEditor editing. When you click "edit source" or "edit beta" at any time (unlike today, you don't have to be at the beginning), it transitions to the appropriate step. You can then walk through the basic flows of the editors (as today)
Your are in a detailed tour for VisualEditor. You are in the step for the references dialog. You click the template button, and it transitions to the step for adding a template. When you walk through and save that, it transitions to a step for saving the reference.