Test it: make a question or negative. If do appears, the phrase is not a true auxiliary.
Auxiliary have: no do needed, marks the perfect. Have you left?
Semi-modal have to: needs do, expresses external obligation. Do I have to wear a helmet? It substitutes for must with full inflection.
Recognition test and close neighbours
True modal auxiliary: behaves like can or must, taking a bare infinitive and no do in questions. Must you go? Fine as it stands.
Auxiliary have: behaves the same way in perfect tenses, so do never appears. Have you seen it?, not Do you have seen it?
Semi-modal have to: blends modal meaning with verb-like form, taking a to-infinitive after it and needing do in questions and negatives. Do we have to book ahead?
Semi-modal be to: same group as have to, but it keeps modal word order in questions. Am I to wait here? sounds formal; Do I have to wait? is the everyday equivalent.
Have got to: expresses the same external obligation as have to, but in questions it usually keeps have in front instead of taking do. Have you got to go? is the natural form for most learners to use.
When the test gives the other answer
The test flips when have is the perfect auxiliary. There, do never combines with it, so Have you seen it? is right and Do you have seen it? is not. Before applying the do test, check what follows have: if to comes next, you are dealing with the semi-modal and do belongs in the question. At the decision point, that one check classifies I have to eat correctly on first encounter.
Same spelling, opposite behaviour, which is why the phrase as a whole decides the answer. Have to eat needs Do I have to eat?, while bare have seen takes Have you seen? directly.