As discussed generators should include MOODLE_INTERNAL as they make use of CFG and they don't make sense without requiring config.php.
Plus a simple core_question generator to test the concept.