I know this is a problem in the history of Linguistics. The most famous example I can think of is the Determiner Phrase vs. Noun Phrase debates. I'm trying to figure out, if you have evidence that Phrase A always shows up only once and directly before Phrase B, how can you identify whether Phrase B is a complement of Phrase A (1) or whether Phrase A exists in a specifier relation to Phrase B (2)? Of course, the same can be said in reverse, where Phrase A could be the complement of Phrase B, or Phrase B could be the specifier of phrase A, but those symmetrical alternate examples can be satisfied by answers to their symmetrical counterparts.
In both cases, the lexical head of A has the strength to agree with B, so any sort of agreement tests can't help. Nor can any c-command tests, since A c-commands B in both scenarios. Perhaps I could use a c-command test to see if B C-commands A in some way. Still, I'm not sure of a good test to distinguish these two structures.