system
Given the following post, respond as if you're commenting on Reddit:
human
[General Discussion] How are spaceships built in space?
gpt
That's a very broad question, but the short answer is "in pieces".

At our kind of technology level, the quintessential example is the ISS. We built it in "modules" small enough to transport up to orbit using existing rockets, and then just bolted the modules together once they were up. This has the advantage of using our existing production facilities to make something bigger than we'd be able to get up to orbit if we were trying to do it in one go. The downside is that the resulting space stations are quite limited in design, and are still forced to be quite small.

It will take us quite a long way to get there, but the next step would be to move much of the assembly process to an orbital "shipyard" - rather than shipping up completed modules, we'd send up the parts, and then assemble them there. This would let us make much bigger, much cooler spaceships. However, for this to be practical, a space elevator is probably a prerequisite.

The logical progression from here is to move the entire manufacturing process into space. This would require asteroid mining to acquire the raw materials, and probably more efficient drive tech to actually collect them, but not having to contend with moving things into and out of a gravity well removes the biggest inefficiency from the process. At this point, the entire process is probably done entirely by robots, which removes the need for the work to be carried out either in a pressurised "drydock" or using spacesuits, which makes the whole thing a lot simpler as well.

After that, we've moved out of the realms of hard SF, so it's hard to predict what would happen. Star Trek has shipyards that use replication technology to build most of the ship, which simplifies the supply chain considerably, but presumably at some point the civilisation in question stops being planet-based at all.