initial draft of protocol spec

I just want to open this as a place to discuss the raw protocol as I am currently implementing it, there are a lot of choices to be made and I dont want to make any bad ones.