The job I quite was a team lead/manager job and was very lucrative for the market. The software organization is new in this company and so is its executive leadership. The teams haven't yet shipped a product, but two previous prototypes failed. In the interview they claimed to use scaled agile framework in one of those "starting fresh, big budget, hiring the best" situations. Sounded awesome.
I got good feedback over the few weeks I was there but I could see the environment was a complete command-and-control waterfall environment. Micromanaging executive. Directors that came with him from a previous job. Design your database up front. Despite a simple and well-trod problem domain, teams of (only) junior developers had spent months talking/meeting/designing - with poor results. Every day was a calendar full of meetings to prepare for other meetings. I discovered other teams were reporting fraudulent statuses creating the illusion of progress when no actual progress actually existed. Clearly a deathmarch.
The leadership situation is pretty much exactly what Joel Spolsky describes in his (now 14-year-old!) post The Command and Control Management Method:
https://www.joelonsoftware.com/2006/08/08/the-command-and-control-management-method/
I'm aware that if I find the perfect software team, I shouldn't ruin it by joining. I just really really care about making excellent software and felt like I was in a situation where that was impossible.
So I ask the Hacker News Hivemind: what can you do before accepting a job to ensure the work environment is a good one to be a part of? How can I make sure not to repeat this situation in the future?