Many web sites explain the different effects of hard and soft credit inquiries, but none of them actually explain how the process works, so they're not useful for figuring out how borderline cases are determined to be soft or hard.
For example, this site vaguely talks about "Hard inquiries commonly take place ... soft inquiries typically occur ... Unfortunately, there are some gray areas where either a hard or soft inquiry could occur." Similarly, this one uses the weasel words "generally" and "typically" when describing when hard and soft checks occur. This site explains that the difference comes from whether or not the information is being used to make a lending decision, but again doesn't give any information about who determines the answer to that question and how.
What is the actual process by which credit checks do or do not affect one's credit score? For example, do the credit rating agencies see the complete list of all credit checks, and decide on their own which ones count as soft or hard? When someone performs a credit pull with a rating agency, does the agency ask them whether it's for the purpose of making a lending decision, and if so, how does it verify their answer?
Edit: it seems that people are taking my title question too literally. Obviously no one manually goes through every credit check and arbitrarily decides whether it's a hard or a soft pull. My question is, what is the process that determines the impact of a credit check on a credit score?