Forum:End Phase Order of action

Which comes first?
I have a question, if you have a "Gragonith, Lightsworn Dragon," and 3 "Light Spirals" on the field face up and an "Outstanding Dog Marron" in your hand along with the 6 other cards and no cards in your deck. It's your End Phase, so what goes first?
 * You have to discard 1 card as you have 7 cards in your hand and the one you discarded is "Outstanding Dog Marron," then the effect activates, it goes to your deck. Then Gragonith's effect forces you to send 3 deck cards to your graveyard. You have 1 card in your deck now and it goes to the graveyard. The effect of "Outstanding Dog Marron" activates and 3 "Light Spirals" activate creating a chain. Your opponent must banish 3 deck cards, then "Outstanding Dog Marron" goes back to your deck.
 * Gragonith's effect activates but no cards are in your deck, so the effect of 3 "Light Spirals" cannot activate. Then you must discard 1 card as you have 7 cards in your hand and the one you discarded is "Outstanding Dog Marron," then the effect activates, it goes to your deck.

Does the effect activate or the card hand limit go first.