How to frame a wall around existing exterior door
Thanks for the picture &amp; diagram updates, your initial question was a little unclear to me. You'll have to move the door in order for it to open more than 90-degrees &amp; to flat upon the wall.

Move the door, its jamb &amp; threshold inside to be flush with the new stud wall's drywall finished surface elevation for a full door swing. Then, extend the door jamb (sides &amp; top) out to the exterior wall &amp; re-apply the exterior trim. This provides a good exterior recess &amp; overhang to protect the door &amp; threshold from weather &amp; spiders will love it.

Additionally, since your door will now be mounted to your interior stud wall instead of the very &amp; completely solid foundation wall. You'll want to solidify the stud wall &amp; attach it to the door's existing framing with a toe-nailed or toe-screwed 2x4 bridging connector. This will also assist greatly with the jamb extensions &amp; their seamless alignment.