My intuition is to capitalize any word that used in reference to a person in place of their name: Mother, Father, Grandma, Grandpa, Doctor, Captain, Professor, Sir, Ma’am, Boss, etc. But my research seems to indicate some of these are proscribed: sir is capitalized only when it's being prepended to the name of a knight, and ma'am is never capitalized.
What’s the rule—or, if guidance differs, what are the rules—here?
I am not asking about cases where one of these words is used with an article such as the. In these cases, the standard seems to be no capitalization: the doctor, the captain, the professor. Nor am I asking about the case where one of these words is prepended to a name as is the chivalric Sir mentioned above. In these cases, capitalization seems standard: Doctor Jones, Captain Smith, Professor Brown.
What I’m wondering is this: what makes the sir in “yes, sir” any different from the Dad in “hi, Dad”? They’re both titles used in place of someone’s name, but one is capitalized and the other isn’t—what rule governs that? And which side of this rule do things like the C/captain in “aye aye, C/captain” fall onto?
Is it that sir is normally only used in vocative address, whereas Dad is also used in third-person reference?
According to Capitalizing Personal Titles as Substitutes for Names, at least some style guides recommend say that formal titles like chancellor and chairman should be capitalized only if they precede a name... but what about Father as used in vocative address to a Catholic priest? If it’s capitalized, it’s an exception because it violates this rule; but if it’s not capitalized, it’s an exception because it’s an (albeit fictive) kinship term, and kinship terms are universally capitalized in the vocative.