Thanks to Dark_Brick for this very interesting puzzle. It is tempting to throw the text into a parser or chatgpt to see if it can be decoded, but in the spirit of the puzzle, will not do so until after the puzzle is over. For metric 1, almost-TI solutions seemed to perform well, so one can guess it is an instruction-like. After more experimentation, I'm confident the actual primary metric is (inputs+2)*(rotation,track and piston instructions), therefore a pivot-only solution hits min primary. The additional fudge factor of (inputs+2) was pretty challenging to deduce; well played from Dark_Brick.