Gowers has written a paper where he distinguishes between two cultures of mathematics: theory builders and problem solvers.
There are many textbooks on "how to solve mathematical problems", or "how to prove things", such as Pólya's books, e.g. this one. I have looked at a few of them in the past, and so far as I can remember, they tend to have a "problem solver" perspective.
Are there such "how to do mathematics" books that take a theory-builder perspective?