Question: what document did james madison write?
Answer: The Federalist Papers
Other answers: The Papers of James Madison: Presidential Series, The Papers of James Madison: Congressional Series, The Papers of James Madison: Secretary of State Series, The Papers of James Madison, The Papers of James Madison: Retirement Series