Sounds like you are shooting for an unvented, conditioned attic.
- A closed-cell foam will qualify as an air barrier.
- Once an air barrier is established at the roof deck, you can supplement the closed-cell foam with just about any product you like.
Is this new construction or an existing home? If it is an existing home, you may need to install some temporary ventilation of the attic and/or a humidifier until the attic acclimates to the conditioned portion of the home.
For more information:
Read Steve Saunder's excellent Q&A "I'm converting my attic into a non-vented conditioned space. Should I use open cell or closed cell foam to insulate?"