To convert a direct question into indirect speech, several grammatical changes must occur:
The Conjunction: Since this is a "Yes/No" question (starting with the auxiliary verb "Have"), we must use "if" or "whether" to join the reporting verb to the reported clause.
Tense Shift: In reported speech, if the reporting verb is in the past tense ("asked"), the tense of the quote shifts backward. Present Perfect ("Have done") changes to Past Perfect ("had done").
Pronoun Change: The pronoun "you" refers to "me," so it changes to "I." Similarly, the possessive pronoun "your" changes to "my."
Sentence Structure: In indirect speech, the question format (Verb + Subject) changes back into a statement format (Subject + Verb). Therefore, "Have you done" becomes "...if I had done."