Who Gets Capitalized in a Novel?

Few readers will be puzzled by the capital D in the first example and the small d (and s) in the second. “Detective MacSwain” is treated like a name, a proper noun; “detective” (like “sleuth”) is a common noun. But what form would you choose in the following examples?