The Archdiocese of Philadelphia agreed Monday to work more closely with the School District of Philadelphia and the city’s charter-school community to ensure that the city’s children have access to quality schools — a decision that could increase the city’s chances of winning millions of dollars from the Bill and Melinda Gates Foundation. In a ceremony at St. Peter the Apostle School in Northern Liberties, Archbishop Charles J. Chaput signed an agreement that would make the city’s Catholic schools a member of the Philadelphia Great Schools Compact, a collaborative education effort backed by Mayor Nutter, state Secretary of Education Ronald Tomalis, the district, and charter organizations that aims to add 50,000 seats in high-performing schools within five years across the city.