If I wanted to make my own smart shape, how would I go about it?

For Example
Make my own line brush and head brush for consistant line with a shape or group on the end of it that maintains size/aspect/direction with the line itself?

or

Make my own smart shape group with some shapes locked in size, others that will stretch, similar to the cylinder smart shape in the gallery.