If you wanted to build from scratch all the homes in the city of Somerville as they exist today, you would only be able to reconstruct 22 lots.
The rest of the city's 11,800 residential lots — more than 99 percent of them — would require special municipal approval to be built.
What gives? Somerville's zoning code.
The set of regulations are, er, not quite as "hip" as the rest of the city.
Addendums and amendments baked into the code over the years, mixed with sometimes vague and even contradictory language, have spawned what may well be one of the most complex, confusing zoning codes around.
If it were to be expressed in red tape, you'd need a truckload. If Goldilocks read the rules, she'd say, "This zoning code is too nitpicky."
But the city, in true Somerville fashion, is on the cusp of completing a top-to-bottom overhaul of the regulations that will make its zoning code — if such a thing is possible for regulations — trendy.
"Somerville is making tremendous progress," Mayor Joseph A. Curtatone said in a statement. "But our current zoning code does not reflect nor does it allow for the kind of development Somerville and our region desperately needs."
Overseeing the zoning code overhaul is the city's director of planning, George Proakis. He explained how Somerville got into this mess.
Zoning codes outline rules for things like the size of lots, how large buildings can be, and how far they should be from the street.
Somerville adopted its first one in 1925 and reorganized and updated it in the 1960s, '70s, and '80s.
It underwent its last extensive rewrite in 1990.
"That code was the state-of-the-art solution at the time," said Proakis.
As modern as it might have been back then, it still included rules from previous versions of the code dating all the way back to the city's original one, now nearly a century old.
Save for a few smaller updates, much of the code has stayed the same since 1990.
Structures in violation of the code are not illegal per se. As the code was modified over the years, existing structures were grandfathered in, meaning no action was required of property owners.
But issues arise when property owners want to make a change.
If a property does not meet just one of a slew of zoning requirements, it is considered "nonconforming." And owners of nonconforming properties often must get city approval before making changes.
"[The 1990 version of the code] doesn't work as a strategy now," Proakis said. "It makes it really, really difficult for homeowners to do small things," like building a deck or finishing a basement or attic.
It was a report the city issued in 2012 that detailed just how nonconformist Somerville's residential properties had become.
"I wasn't surprised to find there were only 22 lots that were conforming," Proakis said. "It was lower than I thought, but I wasn't shocked."
Still, it's not just home improvement projects that can get held up. The code doesn't work well for other types of property, like commercial, industrial, and mixed-use sites, including areas now in high demand due to plans to bring MBTA trolley service to Somerville.
"With the Green Line coming, now is sort of the time to look at the zoning, to try to bring in good development and good jobs and reduce the tax burden on the city," said William A. White Jr., president of the city's Board of Aldermen.
Proakis and his team unveiled their first draft for a new zoning code in January 2015 but were sent back to the drawing board. Since then, they've been reworking the original proposal as they review feedback from more than 100 public meetings and several hundred comment submissions.
Proakis said he expects city officials will present a second draft this fall, and he's hopeful that, if all goes well, that proposal would be adopted by the city's aldermen and take effect by early 2017.
The new code will be less confusing for the city's 80,000-some residents as well as for developers and city officials. It's on track to be roughly half the current 450-page code.
"It's a combination of conserving neighborhoods, enhancing corridors and squares, and opening up development near transportation," said Proakis. "We are very focused on making sure that we are able to grow, while maintaining all that we love about Somerville."
To be sure, Somerville is far from the only community with out-of-date zoning.
It's fairly common around the United States, including locally. For example, a recent study by the Massachusetts Housing Partnership found that 82 percent of residential lots were nonconforming in Concord's Back of the Depot neighborhood, as well as 77 percent of housing lots in Lexington Center.
"It's very common for cities to be zoned where many, many lots and uses are nonconforming. It happens most often in old cities on the coast because they were essentially laid out and built before zoning," said Donald L. Elliott, a national zoning expert and former Somerville resident whom city officials have consulted during the ongoing code overhaul. "They're hundreds of years old and zoning is only about 100 years old."
But Somerville's abundance of nonconforming lots is extreme, said Elliott.
And the step it is taking to fix the issues is, too.
While many communities take a Band-Aid type approach, fixing certain aspects of zoning code from time to time, it has been far less common for cities and towns to start over from scratch like Somerville is doing.
As Elliott explained, local government officials typically "are scared to take it apart because it's such a complicated job."
Leave it to Somerville to be ahead of the curve.