Original Reddit post

​ I write software for electrical utilities,and one module in our repo decides whether transformer running at 118% load sheds feeder 7,so code review here is very different sport from the one at my last job. one habit I borrowed from the ops side has made CLAUDE.md behave lot better,and it comes down to how they rank their rules. rather than a single list, they keep three, and the ranking between them is of explicit. L1 is the published standard, meaning IEEE, IEC or whatever applies to everyone in the field, and in repo that maps to your language version, formatting and lint config. L2 for vendor guidance,the advice specific to the kit you actually bought, which in repo means framework conventions, your ORM’s quirks and the way the test harness wants its fixtures built. L3, what this particular site learned the hard way, the rules that exist because something once caught fire, and in a repo it covers those three functions that look obviously refactorable and carry a comment in capitals warning everyone off. the part that matters is how ops resolves one conflict,since the published standard sets the floor while the local rule wins wherever it is stricter or more specific, because a standard describes the general case and a local rule describes this substation right!! I added one line to CLAUDE.md spelling that out, saying L3 wins over L1 on the conflict,and the agent stopped “helpfully” reformatting code to match the general rule while quietly breaking local constraint on the way past,which accounted for maybe 60% of my frustration with longer sessions the second habit comes from the same place,as control engineers check one constraint at a time and avoid asking whether the whole configuration looks fine,because broad question tends to get confident shrugg,so in plan mode i now ask one question per constraint rather than one per change,and the answers have become noticeably more more specific I keep the merge gate outside the agent entirely,as a typed yes/no with probability attached, and anything that abstains or touches control logic goes to human (bivia handel that for me, altho anything that returns value rather than paragraph does the job) so write your hierarchy down and state which layer wins,because an agent handed flat list treats “2space indent” and “leave this mutex alone” as equally negotiable right?? submitted by /u/BEYOND__7

Originally posted by u/BEYOND__7 on r/ClaudeCode