I have seen the other questions but I am still not satisfied with the way this subject is covered.
I would like to extract a distiled list of things
When implementing an RFC or other protocol specification, comment state machines / event handlers / etc with the section of the spec they correspond to. Make sure to list the version or date of the spec, in case it is revised later.