Sorry, plans don't work against knife attacks. With enough training you may develop an instinctive response whether you are on your feet or on the ground but trying to plan for a random attack won't work. The one thing in your favour will be that the attacker intuitively will try to retain the weapon. If you have control of the weapon or arm holding the weapon, that may give you the opportunity to take control of the total situation. But, you can't plan for that. As in all our training, you have to use what you are given.You want some sort of plan if they are on top. Of course a plan that puts you on top would be better.
Of course well rounded grappling skills does solve both problems as well as they can be solved.