A deck on a sloped roof requires a different approach to the framing underneath the joists. Roof deck framing, unlike for decks at ground level, doesn't entail a ledger attached to the rim joist of a house. Instead, a pair of beams rest on supports called sill plates to create a frame for the deck. Once you have your beams in place, everything above them -- joists, deck boards, balusters and handrails -- is the same as for any other deck.
Obtain the requirements for a deck above a sloped roof from your jurisdiction's permits office. Relay to your architect any special setbacks, such as rules that the front of the deck start 8 feet behind the roof ridgeline or that the height of the deck be no more than 2 feet above the midpoint between the gable and the rear of the roof. These requirements help keep a roof deck's framing compact and hide the deck from the street in historic districts with older row houses.
Cut four 1-foot lengths of 2-by-6 lumber for your sill plates, which act as bases to support each end of a pair of beams at the front and back of the deck. Your architect or engineer -- who may be required to create and sign plans for a roof deck -- will designate that the plates be attached to a strong area of the roof, often over a masonry end wall.
Create beams to the architect's specification in terms of length and thickness; for example, you may need to create a 4-by-10 beam out of two 2-by-10 pieces of lumber. Clamp the lumber together. Mark the top and bottom of the beam every 3 feet, 3 inches in from the edge. Drill through both pieces of lumber at each mark with a paddle bit. Press a galvanized lag bolt through the face of the beam into each drilled hole and place a washer and nut on the back of the beam. Tighten the nuts firmly with a ratchet wrench and socket.
Set one beam at the front of the sloped deck vertically on the front pair of sill plates. Have an assistant hold the beam in place with a spirit level to find true vertical. Place a hold-down -- a strong metal angle bracket -- on either side of the beam above one sill plate. Mark the holes in each hold-down on the sill plate. Set the beam aside.
Drill pilot holes through the sill plate and its shim with a 3/8-inch wooden drill bit through your marks. Press the drill bit slightly through the shim to nick the roof surface to mark the beginning of your pilot hole for a threaded rod to hold the sill plate in place. Switch to a hammer drill with long 3/8-inch masonry bit if you are continuing into brick. Continue drilling into the roof structure to drill deep enough to accept a 3/8-inch threaded rod, which serves as an anchor, per the architect's specifications, which may call for the rod to be embedded 8 inches into roof masonry.
Epoxy the threaded rod in place and allow it to set per the epoxy manufacturer's instructions. Spin a nut on top of each threaded rod and tighten it after the epoxy has set to secure the hold-downs, sill plates and shims. Repeat for the other sill plate and hold-down.
Place the beam between the hold-downs. Mark the holes in the top arm of the hold-downs where it touches the beam. Drill through these marks with a wood drill bit. Press a galvanized bolt through the hold-downs and the beam, add a washer and nut and tighten.
Set the rear beam over the rear sill plates following the same procedure. If your architect has planned elegantly and your roof slopes gently, your deck joists will run from the front beam to a joist sitting atop the rear beam, creating a level deck surface above your sloped roof. On a steeper sloped roof, the rear beam may instead have to be raised on brackets atop 6-by-6 posts supported by the sill plates to create a level deck.
Install joists atop the beams, as well as deck boards, posts, balusters and hand rails per a standard deck at ground level.