currently the validation is done mostly in primary_pre_publish hook, for example in the :
# initialization code ...
# check if pre_publish is in Maya, if Maya call self._do_maya_pre_publish() method
def _do_maya_pre_publish(self, task, work_template, progress_cb):
import maya.cmds as cmds
progress_cb(0.0, "Validating current scene", task)
# get the current scene file:
scene_file = cmds.file(query=True, sn=True)
scene_file = os.path.abspath(scene_file)
# validate it:
scene_errors = self._validate_work_file(scene_file, work_template, task["output"], progress_cb)
If len(scene_errors), we will issue some form of Exception or error message to user and interrupt the publish process.
If you are familiar, or can make the mental conversion, with ftrack, then perhaps this repo could help shape your idea of how it could work. It's developed by two engineers at different studios using it in production at the moment.
I am not currently familiar with ftrack, but I do wish to coordinate the effort on their side so we can try to keep as consistent a interface as possible. Also to reduce dependency and coupling between the extension and production tracking system as much as possible.
Production Tracking is currently enjoy some form of boom with several old and upcoming competitors (Alien Brain, Nim Lab, Tactics, and also the open source Stalker), so it might be good idea to keep that in mind when developing extensions.