Each program has its own directory in
/var/lib/sorcery/codex/<grimoire>/<section>/<spell> containing the files with this information.
Not every spell has all the files that are possible; some simple spells have only couple of files, whereas complex spells may have 10 or more. All the files are bash scripts containing information about the spell. The one file that is required for all spells is DETAILS. Check out the Spellbook to get more information about each particular file.