Federal contractors had to stay nimble as the government rewrote its own rules — and it mattered what business they were in.