Add doc for defining hooks