https://doc.wikimedia.org/Wikibase/master/php/md_docs_topics_extending-entities.html exists but it old and outdated and could do with more info.
For example definitions of the ways to define custom bits of entiities with links etc.
I recently found myself touching something to do with entity-reference-extractor-callback and had to do lots of digging before it was clear what it was doing / what I needed to consider.
Many of these plugable services an configs exist in an entity definition in Wikibase.
They should all be nicely documented on the docs site