If I wanted AI to try and implement entire Codebase from scratch how would you proceed? what's required?

Hello,

I am somewhat a beginner with coding I've been using AI tools to learn over last few months.

One thing I have learned is to break things down into modular parts.

I know it's unlikely I'll be able to implement my entire codebase in one shot but I do see videos online of people using something like Roo + Sonnet API and it almost creating entire comprehensive script.

Lets say I wanted to give myself the best chance that this maybe be possible and somewhat work..

What additional instructions /setups/ ways I should communicate to the AI about implementing to have best chance at success?

I think the big problem for beginners we just don't know the proper aspects to consider to carefully guide AI for implementation, or items you should tell AI to consider.