EXCLUSIVE: Warner Bros is making a deal with Aaron Stockard to do script work on the Whitey Bulger movie that Ben Affleck plans to direct, with Matt Damon playing New England’s most notorious gangster and a man who has inspired numerous movie and TV bad guys, most recently played by James Woods on the Showtime series Ray Donovan. Affleck and Damon are producing through their Warners-based Pearl Street banner.

The script was originated by Boardwalk Empire creator and writer Terrence Winter, and the hiring of Stockard shows that Affleck and Damon are serious even though there is a rival project, Black Mass, that threatens to go into production first. Stockard worked with Affleck as a writer on his directing vehicles Gone Baby Gone and The Town.

Deadline broke the story on the film in late 2011, and the plan is for Affleck to also co-star along with Damon and his brother Casey Affleck, making it a real Good Will Hunting reunion.

Damon played a crooked cop in The Departed, the Martin Scorsese-directed film that took a page from the Bulger story, and there was a character like him played by the late Pete Postlethwaite in Affleck’s The Town. The real Bulger is the notorious South Boston crime boss who fled in 1994 and remained a fugitive for 16 years — 12 of them on the FBI’s Ten Most Wanted List. He was arrested in June in Santa Monica and was found guilty in August of 31 counts, including involvement in 11 murders. The story will cover Bulger’s youth to his incarceration on Alcatraz, through his rise to become a mob boss while secretly serving as an FBI informant for decades.

This won’t be next for Affleck, who’ll play the Caped Crusader in Batman Vs. Superman, and is directing and starring in Live By Night, based on the Dennis Lehane novel, both for Warner Bros. As for Black Mass, that Cross Creek/Exclusive Media-backed project is still putting the pieces back together after Johnny Depp fell out of playing Bulger, when they couldn’t get together on money last May. Barry Levinson had been ready to direct and Joel Edgerton was circling a role when Depp dropped out.

Stockard will focus on the aftermath of Bulger’s trial and ultimate conviction in a film overseen by WB’s Sarah Schechter. Stockard is repped by WME and 3 Arts.