I'm not so sure how wave work,
I've clear all the warp gate around my main homeworld and I have others planets with active warp gates, however the AI still seem to send his wave directly to my homeworld, bypassing my others defenses.
Do you have an exo-galaxy wormhole of the AI on your homeworld? If so, then that's what is going on; only the Backdoor Hacker AI type uses those.
Also, are you certain what you are seeing are actually waves? Waves refers only to the countdown timer where ships come in, it's not referring to ships that just wander over to your planet; those are typically either "Special forces" ships that wander based on the special forces guard posts (and you may be seeing a ton of those if you are playing against a Special Forces Captain AI type). I think you may particularly find these wiki articles helpful:
What Are The General Behaviors That AI Ships Can Have?How Do Cross-Planet Attacks Work?And possibly also:
How Do Basic AI Reinforcements Work?Hopefully those should clear up most, if not all, questions. But let us know if there is still confusion!
I'm also not so sure about the AI behaviour on this either, they seem to amass ton of ship in the system I left alone beside my homeworld and then empty them to attack me in a massive wave, is it because I left them their guardpost (the tutorial seem to say the guardpost only allow for sending small group of ship, but i'm looking at a 300 plus wave so i'm not sure).
Generally speaking, the AI is not allowed to mass up ships and then attack you with them unless those are special forces ships gathering around a wormhole to your planet (in which case it will usually be a fairly low number of ships -- between 30 and 100 -- unless you are facing a Special Forces Captain), or it will be a Cross Planet Attack as defined in the link above (and those have a countdown timer, and tend to be fairly diffuse overall, though they can clump more at a planet like you may be seeing -- but these also only come around every 3 hours or so at most).
Please help me with my current inability to understand what going on.
Our pleasure! Let us know if there are other questions you have.