What do you use the function AddTheSpell for?
As per my comment line, the script wouldn't compile unless I put my RegisterForUpdates inside a function. Not sure if this is because it is a quest script of if that always holds.
Also, if what you want is just adding a spell on game start, you could just use the AddSpell() in the OnInit. Check the scripts in http://www.gamesas.com/topic/1344324-adding-spells-on-startup
It does seem much easier. I think it was because I was looking only at events for Quest objects, and tried OnReset() without success. But now I see Quest extends Form, so has more things you can use!

EDIT: Once I couldn't add a spell through the console neither. It was because I copied the effect from another one and has a Hide from UI thing enabled. So what happened is that I already had it, but couldn't select it.
EDIT 2: I hadn't assigned a magic school back then neither... :S
Well, you were spot on! I had copied Alduin's Invulnerability effect I believe which had the "Hide in UI" thing checked. I corrected this, and basically made everything in my effect look EXACTLY like the Absorb Stam ConcAimed effect.
I also changed the spell from a Lesser Power to a regular old spell, and removed the default Absorb Stam effect so my custom spell effect which looks just like Absorb Stam but has a script was the only effect in the list for the spell I'm trying to add.
I changed the script to this:
Scriptname phitestquestS extends QuestSpell Property phiTestSpell autoEVENT OnInit() Actor player = Game.GetPlayer() if !player.HasSpell(phiTestSpell) player.AddSpell(phiTestSpell) endIfEndEvent
That compiles fine. However, after all that, and waiting 30sec on a save I never loaded with this mod (clean save), it still will not add the damn spell! The quest starts, which I can verify with GetStage. But no spell!