when gosh makes complaints, it should do it as gosh.
make CommandTemplate and its fields public, in anticipation of adding a debug feature which will allow exposing that structure to a listener when a command is about to be invoked.
implement a Debug function which allows supplying a callback that gets a last peek at the command template before it runs.

this function is also technically capable of mutating the command template, though I don't know if that's at all advised.
Merge branch 'debug_mode'