We in Massachusetts like to think of ourselves as ahead of the curve when it comes to democracy. As former Gov. Deval Patrick put it, “Massachusetts invented America,” so we had a bit of a head start.

But poke around beneath the Freedom Trail and behind our presidential pedigree, and you’ll find signs of rot. Our Massachusetts democracy is not very democratic (with a small "d") and is becoming less so.

The state’s weakening democratic foundation will likely be hidden next month by relatively high voter turnout. But when you get into the voting booth, look at how few of the contests on your ballot feature more than one candidate, and you will see one of the problems.

According to the Ballotpedia, Massachusetts elections for the state Legislature rank dead last among states in terms of competitiveness. We are near the worst on all three aspects of the site's Competitiveness Index, which scores states based on "the percentage of open seats, incumbents facing primary opposition, and general elections with major party competition."

The story is not much better for U.S. House and U.S. Senate races in Massachusetts. Since 1970, 30 percent of congressional and Senate general elections have been completely unopposed, even by minor parties. This year, only four of the nine U.S. House seats -- currently all held by Democrats -- are contested by a Republican. Outside of the governor's office, Republicans have not had much traction in Massachusetts elections for decades.

Looking just at the Legislature, it would be tempting to chalk up our lack of competitiveness to our status as mostly a one-party state. The problem with this argument is that other essentially single-party states still manage to have competitive elections. The top five most competitive states on the Ballotpedia index include deep-red Nebraska and Oklahoma, which vote reliably Republican for president and have GOP locks on all branches of state government.

A lack of competition within the Democratic ranks is a large and growing reason for our poor showing. Since the 1970s, fewer and fewer Democratic primaries have been contested, according to the secretary of state's election database. In the 1970s, more than half of the seats in the Legislature were contested in some years. But since 2000, these numbers have been bumping along between 14 percent and 23 percent. Put another way: Very few Massachusetts voters have any choice at all on primary day.

The net effect is that many incumbent Democrats get a free pass back into office. There are conservative parts of the state that might vote for a Republican, if the state party could more ably recruit a candidate and run a robust campaign. And there are more liberal parts of the state that might want an even more liberal candidate than their current incumbent. That was the argument that progressive state Sen. Jamie Eldridge made in August, when he suggested that some sitting Democrats should be challenge in primaries, in order to move the party to the left.

Running against incumbents is an uphill climb, but just 11 percent of state Legislature incumbents faced primary challengers this year, making Massachusetts 35th from the top on this metric.

The lack of candidates isn’t the only thing diminishing our democracy.

More and more issues in the state Legislature are worked out behind closed doors. A 2012 analysis by CommonWealth magazine found the Legislature has spent less and less time debating issues over the last few decades, preferring instead to work things out behind closed doors. From 1985 to 2010, the analysis found, the number of roll call votes fell by about 70 percent in the House and 50 percent in the Senate. The amount of time spent in session fell dramatically over the same period.

One explanation for this is that legislative leadership has preferred to work things out behind closed doors, with an eye toward protecting their majority. This, combined with the lack of competition in electing state legislators, means voters have relatively little access to recorded votes or speeches -- the information they would need to hold their representatives accountable on tough issues. And even if voters wanted to apply pressure, their opportunities to do so at the ballot box are few and far between.

Such pressure is rarely visited on Democrats in Congress either. Occasionally, an open seat or a scandal will bring a close election in one or two districts. But for the most part, it's Democrats running either unopposed or winning huge majorities. This is at least partly due to partisan gerrymandering -- another Massachusetts innovation, and one where we have clearly retained some of our expertise. Republicans have also struggled to field quality candidates — or any at all -- in many of the races.

It would be hard to argue that the lack of choices Massachusetts voters have on election day is good for our democracy. Voters can scarcely be blamed for their apathy when their only responsibility in most election cycles is to rubber-stamp the reelection of incumbents, many of which wield little real power.

So yes, we may have invented America, but our democracy could use a refresh.

Adam Friedman of Civera Software assisted with processing the data used in this report.