The subject was James Madison and the Constitution.
Explanation: The main idea of the sentence was to inform the reader about who wrote the Constitution. Therefore, the subject is about James Madison and how he wrote the Constitution with other leaders.