True, you need to first know what the AI should do.
If the purpose of the AI is to close to one (or many) Player-positions, then it needs 3 parts:
-recognize when to move (like seeing player)and where to (playerposition, or hidingspot)
-plan how to move (build a pathfinding-path, waypoints or just find a general direction)
-pursue the move according to plan and dynamic obstacles. (Step by step following the path, stop at and avoid dynamic obstacles)
Each part can be developed in a seperate step.
Where each generates the input of another part.
Once this simple “see-follow” works out, you might want to think about a “top level” AI, like a finite statemachine or “general” or script
that controls the AI in more complex situations.