Benjamin Gomes-Casseres, a Brandeis University professor who has written several books on alliances, offers this advice for copacetic co-development.
Spell out in advance which partner controls the resulting intellectual property and for how long. Protect existing intellectual property to which your customer may gain access.
Make sure there's a mechanism for swiftly resolving any issues that arise. If the project is more important to the supplier than to the customer, the customer may let things grind to a halt when obstacles emerge.
Insist the customer commit enough people to see the project through.
Make sure the resources each side commits are commensurate with the amount of risk each bears.