San Francisco’s economic resiliency report will offer step-by-step actions aimed at protecting jobs and industries, and spell out how to best spend tax dollars and federal stimulus funds on public works projects to prop up the local economy.

Municipal officials are drafting an “economic resiliency plan” — one of the first of its kind in the U.S — to ensure the city of 865,000 can better withstand a financial earthquake akin to the one that roiled global markets in 2008 and left some U.S. cities on the verge of economic ruin.

San Francisco leaders are still haunted by memories of the dot-com bubble of the early 2000s and the Great Recession, which caused the largest collapse in state revenues on record and forced cities to reduce police spending, close libraries and wade deeper into public-pension debt. Some cities and states are trying to ensure they aren’t caught off guard again by boosting reserves and girding their residents against the next collapse. Utah is stress-testing its budget to find weakness in advance.

“There are things that you need to do to prepare your house so it doesn’t fall down,” said Todd Rufo, director of the San Francisco Office of Economic and Workforce Development. “We haven’t forgotten what 2008 was like and that’s why we want to be as prepared as we can be.”