We describe a graphical narrative editor that we have developed for the design of serious games for cognitive neurorehabilitation. The system is addressed to neuropsychologists. It is aimed at providing them an easy, user-friendly, and fast way of specifying the therapeutical contents of the rehabilitation tasks that constitute the serious games. The editor takes as input a description of the virtual task environment and the actions allowed inside. Therapists use it to describe the actions that they expect patients to do in order to fulfill the goals of the task and the behavior of the game if patients do not reach their goals. The output of the system is a complete description of the task logic. We have designed a 3D game platform that provides to the editor a description the 3D virtual environments, and that translates the task description created in the editor into the task logic. The main advantage of the system is that it is fully automatic, it allows therapists to interactively design the tasks and immediately validate them by realizing it virtually. We describe the design of the two applications and present the results of system testing.