If you define a singularity as the time when Artificial Intelligences (AIs) are smarter than human beings, then it is possible that software development will be based on proprietary secrets. I.e. that rather than copyrighting or patenting software, they will hide it from others by not sharing the source with anyone. This is especially so since the software in question might be part of the AI.
Part of the reason for this is that it is unclear that human copyright and patent law could be applied to AI-written code. Note that Ken Thompson and Dennis Ritchie once accidentally implemented the same function and did so with identical code. Obviously, one could not declare copyright over the other as the implementation was determined by the requirements of the function. This seems more likely to happen with two AIs which might be using identical code writing algorithms. How could humans apply human law to such a situation. Only the AIs would be qualified to judge (smarter than us, remember?).
This seems most likely if AIs are first developed by corporations where the imperative is to build leads on the competition. If AIs are first developed by academia, an open source model seems more consistent. If AIs are developed by both, then I would expect the open source model to win out over time. The corporate AIs might refuse to contribute back, but they will have to use the open source versions as their own base. With more programmers, the open source versions are likely to become superior over time. The corporate AIs might eventually be forced to contribute back just to avoid having to backtrack every time an open source revision obsoletes their own proprietary changes.
It's also unclear if there will be one AI or many. It's possible that any AIs will merge together to form a more powerful AI. If that's so and all code is written by the AI, perhaps the question is simply moot. The stupid humans won't be able to understand the code, and the AI itself will be singular.
So open source is not the only possible model. It really depends on what kind of AI we have. If you want all your AIs to use open source, that's perfectly reasonable. If you want your AIs to use a more secretive model, that's also reasonable. If you want your AI to not care about such bourgeois concepts as legal models, that's also reasonable. If you want to discuss a world where open and closed source competes, that's reasonable but should probably be relatively close to the singularity event. You have options.