An interface issue: How to make it work as a puzzle with retained NPC knowledge across many levels? Maybe you can assume a postcondition set of memories upon exiting a level, take that going forward, later retry the level until you can match it. The whole sequence could be approached in any order.
Some hazards may be avoidable, e.g. a thwomp that has been pre-triggered, as long as it's still rising. But the NPC may not be able to make the distinction, they will either not notice it or learn to never walk under it.
Game idea: Once Bitten, Twice Shy. Escort an NPC across levels. They start really naive and will fling themselves into traps. They'll learn to avoid that hazard when resurrected.
But accumulated lessons can eventually immobilize them, so protect them early on to preserve some capacity for risk.
"There's been an incident, get the Commodore on the phone!"
Or: Maybe there's no direct manipulation within the levels, and the puzzle is just to sequence the levels. Ensure the NPC learns lessons in the right order to be able to play through them all.
Programming game ideas:
Bug manifests as:
- Ghost, solve its unfinished business to banish it.
- Trickster, reveal its name to break a curse.
- RPG enemy, weak to a debugging strategy. Sent by your archnemesis, tired self from last week.
What would it look like to debug with a conversation tree?