A few times I’ve been able to formulate an entire program design in my head before working on it. Those are probably the designs I’m proudest of — Acta and Word Slinger. In both cases, the final product was pretty much exactly what I had envisioned at the start. (Mike Dietrich certainly added visual appeal to Word Slinger, but the way the game worked was how I had it in my head.)
More often, a design will evolve. For example, I had a pretty good idea of what King of Dragon Pass was like before writing a line of code. But the game was complicated enough that I couldn’t predict how it would play before we’d gotten fairly far into implementing it. (So Rob Heinsoo was able to make some significant design contributions.)
Having a software design in your head doesn’t guarantee commercial success, of course, but I think it’s an ideal to aim for.