The wording of the second option above implies a level of arbitrariness in which projects get funded. A third option (perhaps a variation on your second) is to establish some sort of relatively uniform national policy and fund a myriad of projects through thatThere's a level of arbitrariness in now much each state gets granted in general revenue too.
With general grants or specific grants to states, the Commonwealth will have a budget and will need to decide how much of it goes to each grant. For each grant, it will ideally assess the state's need for a grant of that size and their ability to get funding separately from the Commonwealth.
With transport infrastructure projects, the norm is to make an estimate of how much the new transport infrastructure will contribute to the economy. If it allows people to ride their bicycles on the weekend, then the only contribution will be in paying someone to build it. If it releases hours of a million people's time getting to and from work, that will contribute more. If it gets goods to factories or ports reliably, then that will contribute to exports or efficient manufacturing. The amount that a project contributes to the economy can then be compared against the cost. The higher the ratio, the more interested any government should be in building it.