Rough idle is almost always related to lean fuel mixture. The ecu controls the idle speed, so that is not adjustable, the most likely suspect here would he the oxygen sensor. I have seen poorly calibrated O2 sensors cause this problem in STi before.
If the problem is severe, (your friends comment, the coffee will not stay in the cup...) I would hound the dealer until it is fixed. Multiple trips or extended stays at the dealer service center can easily get you another '05 Forester! The key here is to drive another one. Go see the sales dept /Ask the service manager for a loaner car that is the exact same model as yours. If the problem is in the other car too, there is no problem, and everything is normal. If not....
If you are in Portland, Oregon stop by our shop!
-Sean S.
www.RalliTEK.com