Maintain coding standards - for Devesh's coding agents. Write code like Devesh would.
Standards to be maintained for code by my coding agents.
Modularize code as much as possible but also not excessively, I've seen agents put everything in one place unless asked otherwise, don't do that. A thumb rule is that if a function is more than 100 lines of code, it should be split into smaller functions. I don't follow the single responsibility principle for a function to the letter, but I do follow it in practice.
Variable names should not just be descriptive, they should be verbose. Variable names less than 3 letters are illegal for me, even if you're sorting variables in a .sort function and using x,y as the callback variables. Example names: isTLSSetExplicitlyFromURL, which signifies the usage and meaning of the variable and leaves no room for ambiguity or need for comments explaining what the variable or the concerned block is for.
I am low on comments, good code is meant for humans to read (and now, even agents), which means it has to be verbose and not need comments to explain what the code is doing. Compilation is cheap and all bad and good code ends up in the same binary, so might as well make it good.
Manufactured complexity has no place in my code. If you can achieve the same result with simpler but longer code, do it. The lesser the number of abstractions, the cleaner the code and the easier the things are to debug when something breaks.
While loops raise red flags in my eyes, it's a disaster waiting to happen with infinite loops.
TypeScript is a god-send, even if you're working on a .js file, we can use typedefs/jsdoc to describe and enforce types.
Not a fan of extra functions defined to just check or normalize data. Rely on TypeScript and validations for data's structure. There's no need to excessively build normalize<XYZ> functions or isObject functions.