What if:
1) the hero has a default spellbook?
2) has secondary skills learned in a witch's hut?
3) has increased primary skills in places like a fortress?
4) has artifacts, including those that increase primary skills?
As I understand it, point 1) is definitely allowed, 2) and 3) are considered leveling up and are prohibited, just as it is prohibited to buy computer-controlled heroes with any artifacts, which is very logical.