so the ship would be a capital ship?
No, I said absolutely nothing about capitalships...
Basically, you couldn't make anything generally do what you want. You could maybe make a ship that needs to "scan" a predetermined unit, say a hoshiko, and then after that the ship would be able to use another ability to spawn a hoshiko, but as you'd need a different ability for every ship, you at most could get 4 ships you could build. And not any for ships you scan, you'd need to determine which ships you want to be buidlable from the beginning. Also, the AI would never be able to use it right.
So yeah, basically you should just consider it not possible, the only way to do it is so lame it is not even worth the trouble.