My best guess is to raid the taychon scanner on the wormhole you enter the AI homeworld in. Then you retreat, build as many stealth transports as possible, power them down so they do not fire, and then bring them next to key structures on the AI homeworld you need to kill. This should allow you to weaken the homeworld and escape with minimal losses. Also, the CPA guardpost can not generate ships from thin air; it needs ships from the planets and strategic reserve. I recommend doing that last.