So here's some good-news-that's-also-bad-news: Government spending at all levels — local, state, and federal — added 0.46 of a percentage point to economic growth in the second quarter of this year. "The best quarterly contribution since 2010," as Bloomberg Business put it.

The good news is obvious: Government is helping us create more jobs faster. The bad news is implied: With the exception of a few blips, government has been doing the opposite since the Great Recession. For seven bloody years, government budgets at all levels combined to make the Great Recession and its aftermath deeper and longer rather than shallower and shorter.

This is not normal. In previous recoveries, government spending grew in comparison to where it was during the worst of the collapse. The post-2008 period is the only time when it shrank. The same holds true for public sector employment:

(Graph courtesy of Brookings.)

In fact, we still have massive teacher shortage across the country compared to where we were before 2008. Which is all part of why the collapse in employment after 2008 was so deep and took so long to recover.

There are actually two intertwining stories here. Federal government spending immediately after the Great Recession was actually a boost to growth. Spending on safety net programs like nutrition assistance, Medicaid, and unemployment insurance all automatically went up as the ranks of the unemployed swelled. And the grab bag of spending programs and tax cuts that was the 2009 stimulus pumped further support into the economy. This of course made the federal deficit balloon, but that was a good thing. It meant the government was actually injecting demand into the economy, thus preventing the collapse from getting even worse. If we had raised taxes or cut other spending to close the deficit, we would have just been shuffling money around the economy rather than raising the aggregate level of demand.

Unfortunately, by 2010, spending cuts at the state and local level were sucking money out of the economy faster than federal spending was pumping it in. Then the Republicans came into power in Congress and forced the sequester, which pulled back federal spending just as state spending started rising again. By 2013, state and local governments were making modest but positive contributions to growth, so now it was the federal government that was the overwhelming drag. The aggregate result was that government budgets at all levels held back the recovery for most of the last seven years. We only just recently popped back into positive territory, and in fact a sizable majority of that 0.46 percent contribution to growth came from state and local spending.

(Graph courtesy of Bloomberg Business.)

The takeaway for federal spending is straightforward: Deficits during recessions are good and should have been bigger, and the stimulus should have been much bigger. The U.S. has plenty of room to borrow, and as a last resort the Federal Reserve can always buy up our debt by printing money. At the most fundamental macroeconomic levels, fiscal policy and monetary policy collapse into one another, so the upper limit on both is set by inflation. And inflation is rock bottom.

But what about the state level? Why did the states cut so brutally at such a crucial time?

Well, states can't print their own currency, so they don't have the monetary backstop. That makes them less of a sure bet for investors than federal debt. States can still borrow, and sometimes do, and it's worth looking for possible policy advances in this space. But states are never going to have the same freedom to counteract recessions that the national government enjoys.

Making matters much worse, almost every state has a balanced budget amendment. When combined with their lack of monetary control, that means state budgets are essentially required to rise and fall with the economy. If their economies tank and revenues collapse, states will have to cut spending; if they want to hike spending, they're going to have to hike taxes.

This makes state budgets pro-cyclical, i.e. they reinforce whatever the economy is doing. If the economy is growing, they help it grow, and if it's shrinking, they help it shrink faster. That's a good thing right now, when the economy has been growing again for a while, however sluggishly. But it's obviously a less-than-ideal situation overall. The vast majority of state spending is taken up by Medicaid, K-12 education, and higher education. The needs of students are tied to their socioeconomic circumstances, so the money going to schools shouldn't be tied to the ups and down of the economy at all. And if anything, spending on Medicaid should be counter-cyclical, going up as more people fall into bad financial straits.

The ideal situation, frankly, would be to eliminate state and local budgets. Just have local legislative authorities with the power to distribute certain streams of federal spending. But that would require upending the entire structure of American government, so that probably won't happen anytime soon. The chances of a national campaign to abolish state balanced budget amendments, or an effort to fully federalize education spending, are worth pursuing, but still really ambitious.

The lower-hanging fruit would be to fully federalize Medicaid, and thus remove the burden it places on state budgets entirely. The program is already jointly financed by the federal and state governments, so moving it entirely onto the federal side would just be building on the established policy reality. There are also compromise proposals floating around to federalize the long-term care portion of Medicaid, while turning the acute care over to ObamaCare's exchanges and upping the subsidies. The one thing to look out for here is that Medicaid is a major provider of care for lots of extremely poor, sick, and marginalized Americans. You don't want the transition to lose the institutional knowledge of how to care for them.

The other thing we could do is bring back revenue sharing, which is just the federal government distributing checks to state and local governments so they can firm up their budgets as they see fit. We actually experimented with this in the 1970s and 1980s. We could design it in different ways, but the best approach would probably be to just give those governments a set amount of money per person, based on the populations in their jurisdictions, and with an extra top-off for particularly vulnerable communities. And to do it with no strings attached, and with no end date.

The real trick would be remembering that the federal government is designed to spend beyond its means.