Brought to the “black site” in diapers, the paper says, the prisoner’s head and face were shaved, he was stripped and photographed and sleep deprivation and a diet limited to Ensure Plus, a dietary drink, began.

“The interrogators’ objective,” the background paper says, “is to transition the HVD to a point where he is participating in a predictable, reliable and sustainable manner.” The policy was to use the “least coercive measure” to achieve the goal. The harsh treatment began with the “attention slap,” and for three prisoners of the nearly 100 who passed through the program, the endpoint was waterboarding.

Waterboarding might be an excruciating procedure with deep roots in the history of torture, but for the C.I.A.’s Office of Medical Services, recordkeeping for each session of near-drowning was critical. “In order to best inform future medical judgments and recommendations, it is important that every application of the waterboard be thoroughly documented,” said medical guidelines prepared for the interrogators in December 2004.

The required records, the medical supervisors said, included “how long each application (and the entire procedure) lasted, how much water was used in the process (realizing that much splashes off), how exactly the water was applied, if a seal was achieved, if the naso- or oropharynx was filled, what sort of volume was expelled, how long was the break between applications, and how the subject looked between each treatment.”

When the doctors gauged what a drenching in a cold cell might do to a prisoner, they did their research, consulting a textbook entitled “Wilderness Medicine,” in particular Chapter 6 on “accidental hypothermia,” as well as a Canadian government pamphlet, “Survival in Cold Waters,” according to footnotes.

Lawyers at the Justice Department’s Office of Legal Counsel, likewise, were immersed in the details of investigations.

A week before he completed the first major legal opinion that authorized the use of physical pressure, John C. Yoo, the national security specialist in the counsel’s office, was faxed a six-page C.I.A. “psychological assessment” of the first man the brutal methods would be used on, Abu Zubaydah. “Subject is a highly self-directed individual who prizes his independence,” the assessment said.