Bah, people, I can think of something raws friendly.
New raws needed:
Mana_default (Spell effects)
Rituals_default (Ritual-spells)
Spell_default (spells you can cast)
Your levels of magic users:
Divine - Gods and Demons of course, given to creatures with the gods of the world/creatures with a [DIVINE] tag
Natural - Natural innate magics, given to creatures with [NATURALMAGIC:(sphere)] tag(s)
Otherwise - A learned magic skill(s), controlled by the game's spheres and a [MAGIC:(sphere)] tag(s)
Item users- Creatures with artifact items powered with a spell effect
Potion drinkers - obvious...
Your casting types:
Ritual - Requires all the items needed. Items with a [CONSUME] tag beside them would be used up in the ritual, others would be reusable. Would have to add support for multiple spell effects in one ritual (dont want your new zombies being breserk on you, now would you?). Some rituals might need sacrifices of creaures with a certain [NATURALMAGIC] tag, so say, a full heal spell should require a live unicorn, with the outcome of a healed dwarf and a cursed caster.
Natural - Spells with the [NATURAL] tag can be casted if the creature has a matching [NATURALMAGIC] sphere tag
Manastone: A new rock tag, [MANA] would be given to a manastone type rock. Creatures would need to harvest these in order to make magic with normals spells, defined by a [CASTPOWER] tag in the spells raws
No-limitation: You can make a tag for this for certain spells or not, the [GENPOWER] tag in creatures can be used to see how low a level a spell can be cast without requirements.
Item - A dwarf uses his artifact adamantine sword, but sadly in the randomness of dwarf fortress, the maker decided all it needed to do was turn the user green...
Potion - A class of potionbrewer should use plants with special magic-effect tags to make potions.
Kinds of effects:
Create - Obviously costly spells, creates things like water, food, and other useful/not useful things. Your classic zombie making spells would be in this catagory, obviously needing a corpse as a component...
Blessing - Positive buffs. Ranging from making one more lucky (The gods grant you a +2 on all random checks!) to simply making one more friendly (personality aspect +). Segregated so a remove curse spell can be added.
Curse! - Negative buffs. Ranging from making one quite stupid (like adding the [SLOW_LEARNER] tag) to making them quite impatient (personality aspect -). Segregated for a remove blessing spell.
Mutate - Adds/removes bodyparts, changes colors, makes things insane/friendly (good for a control undead spell), and can change one into an entirely new being (therefore its a good idea to get a mutate-dragon spell on your hands, isnt it?)
Combat - your standard fireballs/lighting strikes/magic missles here.
Alteration - Healing, Teleportation, the like (that doesnt fit mutate). Healing spells should be costly.
Artifacts:
(un)Sadly, this is something the raws SHOULDNT control. When artifacts are being made, there should be a percent chance (possibly defined in the init.txt) of a manastone being used in the creation. If mana stone is used the item is enchanted with a spell. A spell effect flagged with an [ARTIFACT[ tag will be picked out and added to the item (only one per item/or one per manastone used). Item enchantments are not in "charges", and are free reign. Obviously (at least by default) only low-level spell effects will be used, so you dont suddenly make the "Rose gold idol of create adamantine" or the "Iron ring of mutate-newt".
Casting should be a skill, preferably multiple (skill by sphere!). You can only use spell effects that are known by your fort magic users/adventurer. An arch mage noble should be added for fort mode, however they should make mandates at an increased rate and not do ANYTHING useful, the only benefit being that they will add a ton of spells to your effect "library" that disappear upon his/her death.
Spells should be given an incredibly low learning rate to keep multi-sphere legendary casters from appearing.
Any additions/modifications are welcome. I hope I got out a complete thingy...I think I did.