One step ahead of (someone or something)

Better prepared or more successful than someone or something else, expecting and prepared for what will happen.

The city was one step ahead of the builders in trying to understand the problem.