If you want to contribute to the project, this part of the documentation is for you.
morepath.directive – Extension API
morepath.directive
Developing Morepath