I've reproduced this before; but it calls for a rerun because the question is so important. Madison didn't believe civil governments could take "cognizance" of religion. He wrote about such in the context of remonstrating against a bill that would support Christianity generally.
He thought government taking cognizance of Christianity in particular would lead to arguments over what's Christian and what's not. That wasn't part of civil government's just powers.
It's interesting that James Madison doesn't provide an answer to the question here or elsewhere. Madison had a commitment to theism generally, and a perhaps very broad understanding of Christianity generally that would accept all of the differences we see him writing about below.
But we don't see commitments along the lines of, "I believe the Roman Catholic Church is the true one, but if not, you have to at minimum believe in X to be a 'real Christian.'" Or "I believe the atonement is limited; but folks could disagree and still be 'good Christians.' But no true Christian could countenance Y."
Here is a link to the original.
3. What is Xnty? Courts of law to Judge.4. What edition: Hebrew, Septuagint, or Vulgate? What copy what translation?5. What books canonical, what apocryphal? the papists holding to be the former what protestants the latter, the Lutherans the latter what the protestants & papists ye former.6. In what light are they to be viewed, as dictated every letter by inspiration, or the essential parts only? Or the matter in general not the words?7. What sense the true one for if some doctrines be essential to Xnty those who reject these, whatever name they take are no Xn Society?8. Is it Trinitarianism, Arianism, Socinianism? Is it salvation by faith or works also, by free grace or by will, &c., &c.9. What clue is to guide [a] Judge thro' this labyrinth when ye question comes before them whether any particular society is a Xn society?10. Ends in what is orthodoxy, what heresy.panegyric on it, on our side.