Spec of v1 protocol

The spec is useful as a starting point for discussions at least. No doubt things can be improved, pull requests accepted.