There are 2 valuable bits of information the are available during contract assembly. 1) Program Counter (pc), the index in the bytecode of a given instruction 2) Template Variable Locations, the index in the bytecode of a given template variable and its type Producing an output file with the above would help with debugging and with variable insertion. More tooling for encoding and inserting template variables would be needed as well.