I used to use the 4 Ps (prompt, polite, prepared, productive) but developed more specific rules over the years.
I have a few catch-all rules there, but really rules don't matter much. It's all about the procedures. I couldn't possibly list all my procedures, but here are a few:
I stress that all the procedures are about us being productive and the work and learning being NUMBER ONE at all times. Middle schoolers are social and I acknowledge this to the kids but tell them they're going to have to socialize elsewhere. We will cooperate. We won't sit in total silence much at all. We will laugh and maybe cry at literature. We will think about text. We will write our hands off. We will do all kinds of things. BUT we will not do anything that doesn't serve the work, and that includes anything needlessly off topic. That's my main thing.
I'm also very upfront with the "Hey, I can't make a rule for everything that could possibly happen, so if I say to do something, just do it. If you think I'm being unfair, talk to me privately and share your concerns - it may not turn out how you like but I'll listen (it's true, I will). If you mess up, apologize. I will too. I don't make rules without a reason but I'm not an omniscient God-like creature - just a person." Then I get to say what omniscient means, which is fun and teaches them a new word - they always ask.