I remember when I was first querying, I did not know the answer to this question, and definitely sent out some very, very embarrassing queries. I hope those agents don't remember them, because they were, like, noteworthy bad.
I'd say first, find critique partners/a writing group. Make at least ten people read it. Points if at least three of them are writers who have some basic understanding of craft.
Prioritize feedback: lay readers might know when something isn't working, but not how to articulate it. It might sound like "I didn't like this character." Or "I didn't understand why...", or, "this whole section made me fall asleep." CPs or groups (if they're well trained) might be able to tell you places they don't like something, but their WHY, or their offered fix for the problem might not be correct. If you're lucky enough to get professional feedback (like a detailed rejection letter from an agent
or editor) that might be more on point.
I never revise based on only one opinion unless
it's an opinion that makes a light bulb go on in my head. If I don't agree with feedback, but five people ALL tell me a character arc doesn't make sense or a passage is boring, then I (pout, and then) change it.
How do you make sure your projects are in
querying shape?
Haha, the pouting, oh yes, I definitely do the pouting part! I'm getting ready to send out my second manuscript. It's out with betas now. I'm trying to follow Sanderson's leave it be advice, but I keep peaking at the feedback. Some of it makes my heart soar, other parts make me confused, and of course there's the pouting. I don't think I'll ever KNOW that it's ready, but when I get to the point where I can't reasonably make it better, and I've followed my editing rubric, I'll send it out. I'm also big on deadlines. I know too many ridiculously talented writer friends that have never gotten their work out there because they can't get past the first draft/editing process. Sometimes you just have to push go.
"And if she fails, at least she failed while daring greatly." Brene Brown.