جَاءَ رَجُلٌ صَالِحٌ: direct adjective of the man.
جَاءَ رَجُلٌ صَالِحٌ أَبُوهُ: relational adjective describing the father.
مَرَرْتُ بِرَجُلٍ أَبُوهُ صَالِحٌ: whole nominal clause is a sentence adjective.
Use three tests: (1) identify the matbūʿ, (2) determine whose quality is described, and (3) decide whether the adjective is a single word or a whole sentence.