We've done quite a bit of these at Toi. We typically use a very boiler plate work for hire agreement and as part of the compensation, we reference a convertible note. Then we sign a separate convertible note with the client/partner to account for the equity split. We typically price the situation as if it were a cash client and then create the split based on those numbers. Part is cash and part goes in to the convertible note.
Also, you may want to read a book like Venture Deals by Brad Feld. It will give you a good run down on startup financing.