|XP is just a number|
If you want a happy, contented bunch of team-players, give them the nice comfortable, open-plan environment, morale boosting perks, ralaxed atmosphere, artwork on the walls etc. where they can communicate openly, share their problems and so forth.
If you want a productive team.
Hire yourself productive programmers! Give them their own spaces where they can close the door and shut themselves off from the world and unplug the phone for at least the 4 hours of the day. Let them decide which 4 hours individually.
Allow them to work hours that suit their personality traits. Morning people work morning, night people work evenings, if they choose. Have one day every 1 or 2 weeks when everyone has to be together. Don't make that day a Monday or a Friday. Don't allow them to work more than 10 hours a day.
Then hire yourself a good project manager--someone with the ability to organise resources, schedule things, keep records. Probably not a programmer!
Then hire yourself a technical project leader, with good people skills. Not a 'suit'.
Give the project leader the sole responsibility for managing the people. The project manager the project. Have them both report to the same manager who abitrates between them when they don't reach a consensus.
Organise your coders in teams of two or three. Give them complete responsibility for their parts of the project.
Ban meeting that include more than 6 people or more than one manager.
Examine what is said, not who speaks."Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.