At present, probably the easiest way of writing a plugin is to look at the existing plugins and use them as a templates. However, hopefully the following highlights some of the key concepts.
The key to writing a plugin is the plugin.xml file. It defines the targets and templates that a plugin contributes to the build. Broadly speaking, there are two kinds of targets, normal targets and templates. A normal target will automatically added to the project when it is enabled. e.g. The Jalopy plugin has a format target that is enabled by default when the plugin is included in a project.
TODO ...