Question: What number book in the Harry Potter series involves Snape becoming a double agent on behalf of Albus Dumbledore?

Context paragraphs:
Harry Potter (character): Harry James Potter is the title character and protagonist of J. K. Rowling's "Harry Potter" series.  The majority of the books' plot covers seven years in the life of the orphan Potter, who, on his eleventh birthday, learns he is a wizard.  Thus, he attends Hogwarts School of Witchcraft and Wizardry to practise magic under the guidance of the kindly headmaster Albus Dumbledore and other school professors.  Harry also discovers that he is already famous throughout the novel's magical community, and that his fate is tied with that of Lord Voldemort, the internationally feared Dark Wizard and murderer of his parents, Lily and James.

Harry Potter and the Half-Blood Prince: Harry Potter and the Half-Blood Prince is the sixth and penultimate novel in the "Harry Potter" series, written by British author J. K. Rowling.  Set during protagonist Harry Potter's sixth year at Hogwarts, the novel explores the past of Harry's nemesis, Lord Voldemort, and Harry's preparations for the final battle against Voldemort alongside his headmaster and mentor Albus Dumbledore.

Dumbledore's Army: Dumbledore's Army (or D.A. for short) is a fictional student organisation in J. K. Rowling's "Harry Potter" series that is founded by the main characters, Harry Potter, Ron Weasley and Hermione Granger, to stand up against the regime of Hogwarts High Inquisitor Dolores Umbridge, as well as to learn practical Defence Against the Dark Arts.  It was founded in the fifth book, "Harry Potter and the Order of the Phoenix".  Cho Chang conceives of the abbreviation "D.A." and Ginny Weasley conceives of the name "Dumbledore's Army".

Harry Potter and the Forbidden Journey: Harry Potter and the Forbidden Journey is a motion-based dark ride located in The Wizarding World of Harry Potter themed areas of Islands of Adventure in Orlando, Florida, Universal Studios Hollywood in Universal City, California, and Universal Studios Japan in Osaka, Japan.  The ride takes guests through scenes and environments in and around Hogwarts Castle from the Harry Potter series of books and films.  Mark Woodbury, president of Universal Creative, described the ride as an in-depth look at the world of Harry Potter, which utilizes never-before-seen technology which transforms "the theme park experience as you know it".  The ride first opened at Islands of Adventure with "The Wizarding World of Harry Potter" on June 18, 2010, at Universal Studios Japan on July 15, 2014, and at Universal Studios Hollywood on April 7, 2016.

Harry Potter and the Chamber of Secrets (film): Harry Potter and the Chamber of Secrets is a 2002 British-American fantasy film directed by Chris Columbus and distributed by Warner Bros.  Pictures.  It is based on the novel of the same name by J. K. Rowling.  The film is the second instalment in the long-running "Harry Potter" film series.  It was written by Steve Kloves and produced by David Heyman.  Its story follows Harry Potter's second year at Hogwarts School of Witchcraft and Wizardry as the Heir of Salazar Slytherin opens the Chamber of Secrets, unleashing a monster that petrifies the school's denizens.  The film stars Daniel Radcliffe as Harry Potter, with Rupert Grint as Ron Weasley, and Emma Watson as Hermione Granger.  The film is also the last film to feature Richard Harris as Professor Albus Dumbledore, due to his death that same year.

Danielle Elizabeth Tumminio: Danielle Elizabeth Tumminio is an Episcopal priest, theologian, a certified life coach and spinning instructor, and the author of "God and Harry Potter at Yale: Teaching Faith and Fantasy Fiction in an Ivy League Classroom".  She was the instructor of the "Christian Theology and Harry Potter" seminar at Yale University in the spring of 2008; in 2011, she repeated the course at Tufts University.  Tumminio has also presented material on the intersection between theology and the Harry Potter series at the Infinitus Symposium in Orlando, Florida in 2010, the Portus Symposium in Dallas, Texas, in the summer of 2008, and she chaired the panel on Harry Potter and Religion at the 2008 American Academy of Religion conference.  Her teaching has been praised by Harry Potter commentator John Granger on his Hogwarts Professor website.

James Potter (series): The James Potter series is an unofficial sequel-series of J.K. Rowling's Harry Potter universe, written by G. Norman Lippert.  The novel series centers around the character of James Sirius Potter, Harry Potter's son, a character who makes a fleeting appearance in the novel "Harry Potter and the Deathly Hallows".  The series starts with his first year at Hogwarts, set one year before the end of the Harry Potter series.

Order of the Phoenix (fictional organisation): The Order of the Phoenix is a secret organisation in the "Harry Potter" series of fiction books written by J. K. Rowling.  Founded by Albus Dumbledore to fight Lord Voldemort and his followers, the Death Eaters, the Order lends its name to the fifth book of the series, "Harry Potter and the Order of the Phoenix".

Richard Harris: Richard St John Harris (1 October 1930 – 25 October 2002) was an Irish actor and singer.  He appeared on stage and in many films, appearing as Frank Machin in "This Sporting Life", for which he was nominated for the Academy Award for Best Actor, King Arthur in the 1967 film "Camelot" and the subsequent 1981 revival of the show.  He played an aristocrat and prisoner in "A Man Called Horse" (1970), a gunfighter in Clint Eastwood's Western film "Unforgiven" (1992), Emperor Marcus Aurelius in "Gladiator" (2000), and Albus Dumbledore in the first two "Harry Potter" films: "the Philosopher's Stone" (2001) and "the Chamber of Secrets" (2002).  Harris had a number one hit in Australia and Canada and a top ten hit in the United Kingdom and United States with his 1968 recording of Jimmy Webb's song "MacArthur Park".

Severus Snape: Severus Snape is a fictional character in J. K. Rowling's "Harry Potter" series.  An exceptionally skilful wizard, his coldly sarcastic and controlled exterior conceals deep emotions and anguish.  A Professor at Hogwarts School of Witchcraft and Wizardry, Snape is hostile to the series' protagonist, Harry, the moment he sets foot in Snape's classroom; this hostility is rooted in Harry's resemblance to Harry's father James, who bullied and harassed Snape during their time at Hogwarts.  Though philosophically attracted to the Dark Arts and Lord Voldemort's ideology of wizard supremacy, Snape's love for Muggle-born Lily Evans, Harry's mother, eventually compels him to defect from the Death Eaters.  Snape becomes a double-agent on behalf of Albus Dumbledore and the Order of the Phoenix, and protects Harry throughout the series.

Supporting paragraphs: Severus Snape Order of the Phoenix (fictional organisation)
Answer: the fifth book of the series