Rule 1: Know your stuff.
You are presumably engaged, in part, for your presumed expertise in English grammar and usage. You must be able to distinguish actual rules, conventions, superstitions, and errors while deftly navigating the registers of the language.
Rule 2: The stylebook is your tool, not your master.
While your job is to enforce the consistency that stylebooks aim for, you must not be fettered by it. If following style blindly leads to something unclear or, worse, ridiculous, you must be prepared to apply judgment.
Rule 3: Look it up.
Though you are knowledgeable, you are not infallible. You do not guess about factual details or rely on some dim memory. You reach for the references.
Rule 4: It's not your text.
You are in the middle of things. You have a responsibility to assist the writer in achieving their purpose. You have a responsibility to the publication to maintain its standards and integrity. You have a responsibility to the reader, the party most commonly overlooked in these operations, to meet their needs of clarity and usefulness. Your personal preferences are subordinate to these responsibilities.
Rule 5: You need to be informed.
You must be up to date in any specialized or technical area in which you are editing. Beyond that, you must always be reading widely, because that is how you will be able to form judgments on how the language is currently being used.
Rule 6: Your work is solitary but collegial.
Yes, you are alone with the text, but you must expect to work cooperatively with writers and other editors associated with the project. And there is a wider community of editors with whom you can connect in professional associations and online discussions. Make the most of their shared expertise.
Rule 7: Be honest.
You have to be straightforward but tactful with the writer about what works and what doesn't work. You also have to be straightforward about your own performance. When you are responsible for an error, either overlooked or committed by yourself, own up to it.
Rule 8: Be realistic.
When you sit down to a text, you perform triage: You identify what absolutely must be done to make the text publishable, you identify things that ought to be attended to after the major issues are addressed, and you identify the things it would be nice to do, that you would really like to do, but which you are prepared to sacrifice because we are not given in our mortal span to accomplish everything. Sometimes the result of your labors will be Excellent. Sometimes it will be Better Than Average. And sometimes it will be Good Enough. You will learn to live with Good Enough.