I have a macbook pro with OS X 10.8.2. XCode is installed. I know this as it appears in the Applications directory. There are also the xcodebuild and xcode-select files in /
From a programmatic perspective the Homebrew folks have a check for the existence of various files to determine if the command line tools are installed. Currently it always checks for /Library/Developer/CommandLineTools/usr/bin/git
and will also check for /usr/include/iconv.h
if the OS version is 10.13 or below.