Currently there are no advance doc on how to create Criterion and SortClauses. FacetBuilder neither, but it's at least hinted about where to look in that case.
For a partner I referred them to the following urls to be able to understand how to do it by looking at how it's implemented in kernel, and this should be enough for a dev/ps to write a tutorial on. I used ContentTypeIdentifer as example.
1. Creating a Criterion (API part)
2. Setting up CriterionHandler for Legacy Search Engine (DB) and Parser/Visitor for REST:
(besides the config you also need to create similar classes as those refered to there)
3. Setting up visitors for Solr search engine:
typically needs one per operator supported (EQ, LIKE, ..)
Similar approach can be taken for documenting creating custom sort clause.