add documentation for writing plugins, for #16