This is a tricky situation to run. You don't want to Mary Sue the NPCs but you don't want the story to get stuck when players don't have ideas of their own. What I try to do is get the players to talk as much as possible and highlight anything that sounds like part of a plan. Then ask them all the productive sounding parts until it's something I can make rolls on.
If none of that works I have an NPC present a plan and cast some doubt onto his character or competence.
In short I give the players as much ownership as I can.