A girl and her grandfather devise a clever agility course for their dog.
devise
verb · /dɪˈvaɪz/
To plan, invent, or formulate something carefully through deliberate mental effort.
Do not confuse the verb "devise" (to formulate a plan or system) with the noun "device" (a physical tool or electronic gadget) or the lookalike "demise" (death or downfall).
Old French deviser ("to arrange, plan, or divide") from Latin dividere ("to separate, distribute") → to mentally divide into parts and arrange.