Dash Dash Strict

Dash Dash Strict

I recently got a new vacuum cleaner and was shocked at how much it picked up. I had thought that Roomba + Dyson + Cleaners coming regularly would leave nothing left, but so much was still picked up.

It’s a similar shock, when revisiting code generated by AI. The shock, and horror, of all the shortcuts Claude had taken, to produce its output. There was an error, swallow it? Value not set, here’s a default. Conflicting values, choose one. Claude loves making progress, and things like correctness only slow it down.

One method that has helped me, is <strict mode>. For scripts, that’s --strict. For services, it could SCRIPT_MODE=1. Sometimes it could be class variable or what.

The main thing is to ask Claude to implement strict mode. It then “confesses” all the shortcuts it took. Then ask to always run in strict mode.

Its not clear to me why, but just “asking” for it “be careful” - doesn’t get it all the way.

Another plus (or maybe a negative) is, if it fails in strict mode, Claude can still make call and re-run in not strict mode. So far, it's been reasonable when it does this - not just back to square one.