"This should not be an ugly divorce," a source tells PEOPLE of the couple, who had been privately separated for a few months before their public announcement. "They plan on co-parenting and doing absolutely everything in the best interest of the kids."
Both Affleck and Garner plan to continue living on the same property, the 8,800-sq.-ft. estate in L.A. they purchased in 2009 for $17.5 million. Filing for joint custody will allow Garner, 43, and Affleck, 42, to continue to make Violet, 9, Seraphina, 6, and Samuel, 3, "their top priority," adds the source.
"They've been in counseling for some time and have tried hard to work through things in their marriage," the source says of the couple, who married in 2005. "They've been separated for a few months but will continue to work together as co-parents and as two people who still care about each other."
Whispers of an impending split reached fever pitch in mid-June when moving trucks appeared outside their home, but sources told PEOPLE at the time that the trucks were there in preparation for a long-planned renovation.