The most common misconception in outsourced development is that signing a non-disclosure agreement settles the intellectual property question. It does not. An NDA governs what each side may reveal about the other. Ownership of what gets built is a separate matter, requiring an explicit assignment, and a contract can be entirely silent on it while looking thorough. If your agreement does not contain the words assigning ownership of deliverables to you, the default position may not be what you assume.
Assignment should be present tense and unconditional on delivery, not conditional on final payment in a way that leaves ownership floating during a dispute — which is precisely when it matters. It should cover source code, designs, documentation and derived materials. And it should require the vendor to have obtained equivalent assignments from every individual who touched the work, including contractors and subcontractors. A vendor who cannot confirm that chain has a gap between what they promised you and what they are able to give.
There is a legitimate carve-out that a reasonable vendor will ask for, and refusing it is not clever. Development firms maintain internal libraries, scaffolding and tooling that predate your project and will outlive it. Demanding assignment of those either gets refused or gets agreed by someone not thinking clearly. The workable structure is that pre-existing and general-purpose materials remain the vendor's, licensed to you perpetually, irrevocably and royalty-free for use in the delivered work, while everything specific to your project is assigned outright.
Open source deserves its own clause because it is where the real risk sits. You want a commitment on which licences are acceptable, a maintained inventory of dependencies with their licences, and a warranty that nothing carrying a copyleft obligation has been incorporated into your proprietary code without your written agreement. This is not paranoia — it is the difference between a clean acquisition diligence and an eight-week remediation.
AI-assisted development has added a question that older contracts do not address at all. If a vendor's engineers use code generation tools, you want that disclosed, you want the same assignment and warranty to apply to the output, and you want to know their policy on what proprietary material may be sent to a third-party model. Silence in the contract does not mean it is not happening.
The practical test of whether your arrangement is sound is simple: if the relationship ended tomorrow on bad terms, could you take the code, build it, and have another firm continue it, without needing anything from the incumbent? If the honest answer is no, the gap is in the contract, and the cheapest moment to fix it is before the project starts.