When you get hit with a puff, two things happen.
The first thing is that the sails generate more power, so whatever forces are at work on the sails before the puff will be magnified.
The second thing is that the apparent wind will more aft. Since the apparent wind angle is a combination of your boat speed and the windspeed, when the windspeed increases it reduces the contribution of boatspeed to the equation. As your boatspeed increases, the apparent wind will move forward again.
So knowing that, when you experience a puff, you should either head up (if close hauled) or ease your sails to adjust for the artificial lift generated by the puff. You must do this to prevent being overtrimmed. If you are still overpowered at that point, you should look for ways to depower the rig quickly. Depending on the boat and point of sail, you could accomplish this by easing the main sheet, dropping the traveller, or blowing the vang. Once your boat has picked up speed, you will need to bear off some due since you will lose your artificial lift. Then as needed power up the rig again, by undoing the things you did to depower.