The Intelligence Oversight and Surveillance Reform Act is the most comprehensive package of surveillance reforms presented to the Senate so far. It merges competing legislative proposals announced by various senators before the summer recess, and cherry-picks from ideas contained in a dozen other draft bills that surfaced in both the Senate and House of Representatives, following disclosures by whistleblower Edward Snowden.

The legislation is being introduced by three Democratic senators – Ron Wyden, Mark Udall and Richard Blumenthal – and the Republican Rand Paul. Wyden said the bill, which is the first bipartisan Senate effort to clip the wings of the National Security Agency, should be treated as the measure of what constitutes concrete reform to the surveillance system that is not purely cosmetic. The bill is competing with around a dozen others in the House and Senate, but such a situation shows that lawmakers are beginning to come together around a set of proposals that are sure to be debated, amended and significantly rewritten in committee stage, in the weeks ahead.

Like nearly all proposals being discussed in Washington, the Intelligence Oversight and Surveillance Reform Act contains no proposals to in any way limit surveillance of foreign nationals.

Here is a guide to what the bill would do:

Ban the mass collection of phone-record data

If the bill becomes law, the NSA would be prohibited from hoovering up the phone-record data of millions of Americans, regardless of whether they are suspected of wrongdoing. That proposal is the headline-grabbing aspect of the law, as it would effectively dismantle a pillar of US surveillance. The bill would still permit government agencies to obtain the phone records of anyone suspected of terrorism or espionage, but it would require the intelligence agencies to have a solid reason for securing the data. It would also allow the NSA to collect bulk phone records quickly in a situation deemed an emergency by the attorney general, providing court approval is sought no more than seven days later.

The program to collect phone data, authorised under an interpretation of section 215 of the Patriot Act and first disclosed by the Guardian when it published a secret court order forcing the phone company Verizon to hand over customer data, will be a key battleground in the weeks ahead. Arguably, on Capitol Hill it has proved to be the most controversial of all the Snowden disclosures. Intelligence chiefs are lobbying hard to protect the program, which they argue is necessary to "connect the dots" in terrorism investigations. A similar amendment voted on in the House in July was only narrowly defeated.

Ban the collection of internet communication data

The NSA has used a similar authorisation to collect in bulk the records of American's internet communication, meaning such data pertaining to emails. This program was abandoned in 2011, after intelligence chiefs concluded it was not particularly useful. However the legal framework that enabled the data to be collected in the first place remains in intact, and the data-collection process could be re-enacted at any time. The bill would prevent that, barring intelligence officials from gathering the internet-communication records of US citizens unless they are doing so for a targeted reason relating to terrorism or espionage, or in an emergency situation.

Close search loopholes

The second batch of disclosures made public by Snowden related to a program, known as Prism, that collects the phone calls and emails of foreigners. There is no attempt in the bill to limit the ability of intelligence agencies to continue spying on the digital communications of foreigners living outside the US, a practice which has frayed US relations in Europe and Latin America. So far, Congress does not appear willing to tamper with the process by which the US spies on foreigners. Even reformers, such as the authors of this bill, are focusing exclusively on ensuring innocent Americans are not caught up in data trawls.

With that in mind, the bill closes the loopholes that would potentially permit intelligence officials to search wholly domestic American communications that have been swept up in the dragnet, authorised under section 702 of the Fisa Amendment Act, which is intended for targeting foreigners. This section of the bill essentially cleans up this area of law, ensuring that the NSA and partner bodies would need to obtain warrants and prove terrorist connections before searching for communications of US citizens or people residing in the US.

It also seeks to close a gap in the law that permits so-called "backdoor searches" of Americans' data that has inadvertently collected under the program, and prohibits the NSA from collecting communications that might be "about" a terrorist target or suspect, mentioning them for example by name in an email, rather than communications that are to or from such an individual. It would also strengthen a rule designed to prevent "reverse targeting", the process by which, in order to obtain the communications of an American without obtaining a warrant, intelligence agents might claim to be targeting a foreigner with whom the American person is in contact.

Reform the surveillance court

The controversy over the NSA has led to concerns over the court which ostensibly overseas surveillance conducted by intelligence agencies, issuing warrants to allow them to do their work in a process that critics complain is cloaked in secrecy and has permitted the quiet expansion of surveillance powers never envisaged by Congress. One frequent complaint regarding the Foreign Intelligence Surveillance Court (known as the Fisa court) is that the bias is built into the system, with judges, whose rulings are not released, only ever hearing the government's case for warrant applications.

The bill seeks to redress that imbalance, inserting some degree of adversarial process into the Fisa court's proceedings, but only in significant or precedent-setting cases. To do so, it would appoint a "constitutional advocate", independent from the executive branch, to serve as a watchdog in important cases – although legal arguments would still be classified, taking place behind closed doors. The advocate would be appointed by the chief justice, choosing from a shortlist created by the Privacy and Civil Liberties Oversight Board, a body that will be mandated by statute to nominate attorneys who would be "zealous and effective advocates in defense of civil liberties".

Under these proposals, the attorney general would also be required to declassify Fisa court opinions that contain significant interpretations of the law. The constitutional advocate would also have the power to petition the court to make findings public. However, there is no proposal in the bill to change the way Fisa court judges are appointed – a suggestion backed by other members of Congress.

Companies, transparency and watchdogs

The bill also contains a number of proposals intended to help companies – both those that believe they have been affected by US surveillance programs and technology multinationals that, under law, are required to secretly hand over customer data. The legislation would fortify the right of an individual to bring a civil legal action on constitutional grounds, when they believe their communications with foreigners have been intercepted. It would also empower tech companies to disclose information, in aggregate, about the number "requests and demands" made by the US government for surveillance data, the extent to which they were complied with and the number of users or accounts affected.

The bill also contains a few measures to improve public accountability. The Fisa court's constitutional advocate would submit an annual report to Congress, and the government would also be compelled to disclose the total number of requests it makes for surveillance data, including a breakdown of whether they were regarding US citizens or foreigners.

The the bill also provides a small boost to the the Privacy and Civil Liberties Oversight Board, which is supposed to serve as a surveillance watchdog but currently has limited powers. If the draft legislation becomes law, the board would be able to bypass the attorney general and use its own legal mandate to subpoena government witnesses.