Loaded up the RSRD complete set, created new character, applied Naga (Guardian) race, then kit. Spells are added to the Spells Known correctly, except for the cleric spells.
The first class line of the Guardian Naga is:
1 ADD:SPELLCASTER|Sorcerer SPELLLIST:3|Cleric|DOMAIN.Good|DOMAIN.Law
I suspect that SPELLLIST was never intended to work on a class line in that manner. There are plenty of instances where this (or some similar tag) would be useful. Many dragons have clerical domains added to their spell lists, and there's at least one prestige class that adds additional domains to your spell list as you go up in levels.
Sorry, I should have been a little more specific in my quote then. Since this is about data in the 3.5 RSRD dataset, the quote was from the 3.5 SRD. The relevant section in the PRD is also under Monster Advancement, in the Adding Class Levels section:
"Next, add the class levels to the monster, making all of the necessary additions to its HD, hit points, BAB, CMB, CMD, feats, skills, spells, and class features. If the creature possesses class features (such as spellcasting or sneak attack) for the class that is being added, these abilities stack. This functions just like adding class levels to a character without racial Hit Dice."
Ok,I don;t think I've ever seen that little tidbit before. If the levels stack, then we do need a code fix.
The problem as I see it is that using the SPELLLIST tag on a class line or class level line grants the spell list to that class. Hence our issue. ADD:SPELLCASTER|Sorcerer adds the Sorcerer class. SPELLLIST:3|Cleric|DOMAIN.Good|DOMAIN.Law adds those spell lists to the Guardian Naga class, not the sorcerer class.
So we need to be able to target a specific class with SPELLLIST.
Yes, something like that would be great. I could finally code the Rainbow Servant prestige class
Back to you James. I think we've resolved that a code change/fix is the best way to proceed. Let me know if you need anything else from me.
Core 3.0 and 3.5 would benefit from this as well. (The initial report was about the RSRD).