My basic answer would be Yes to most of your idea.
- Vest over a good period, say 24 months
- Setup milestones for both of you to be fair.
- Each period (say 3 months) provides a "milestone payment" of 3/24 of your vesting provided you hit your targets for the period.
Sales and Marketing milestones could be
- First X users from sources setup by them. (Google analytics or similar can track the source).
- Sales pipeline. This can be a useful tool to judge progress. How many are entering the pipeline, how many is the marketer pushing through per month?
- Volume targets.
- Revenue targets.
- Other metrics like Tradeshows attended.
- Feedback received from talking to prospects. This is actually a good "soft" measure, if they are genuinely out and about, they will always be receiving feedback at each meeting.
Development milestones.
These are far more clear cut. Layout the project/feature plan over 24 months, it will change, that doesn't matter.
You just need to nail what is agreed to every X weeks.
Then agree to the next block.
You hit your 2 weeks your get your vesting % for 2 weeks.
Other stuff the more important consideration.
There is more to running the business besides the coding and the selling. Everything from accounts, taking out the rubbish, seeking funding and leading key meeting, hiring people, firing people, handling clients, handing complaints, running the support and Q&A with customers, fixing servers and project management ... plus others I can't remember right now.
Part of your vesting rules needs to be an agreement about who does which bits of the "other" pile.
If you are successful and grow it will most likely be these forgotten things that hinder you and that cause conflict between you ... the risk is both of you will be driving for their vesting, neither will be doing what is required to make the business a complete success.