For HMDA, until a house is completed, you are still constructing it, so a loan (that contains the permanent financing portion) to finish construction of a dwelling is a purchase. As John said, if it meets the 1026.20(a) definition of a refinancing, then you have a TRID refi. If not, you have a TRID construction loan. As stated above, TRID cares about the dirt securing the loan when it comes to picking a loan purpose.
_________________________
I'm fixin' to fix that.