Blog ·
What AI found when it read America's local codes
Local rules in 2,844 cities, towns and counties may conflict with the Constitution or federal civil-rights law. Most have never been challenged.
Every city, town and county in the United States runs on a local code: hundreds or thousands of pages of rules about signs, parades, door-to-door sales, towing, fines, zoning and much else. Most of it is unremarkable. But scattered through those codes are rules that may conflict with the Constitution or federal civil-rights law: a sign rule that allows some messages and bans others, a permit officials can refuse for any reason, a fine that grows every day without limit. Often a court struck down a similar rule somewhere else years ago, and the local version is still on the books.
Until recently, finding those rules was slow work, done one place at a time. A civil-rights lawyer usually learned of a problem only after it had hurt someone: a client came in with a citation, or a local paper ran a story about a church denied a permit or a family whose car was towed and sold. Then the lawyer pulled that city’s code and read through it, chapter by chapter, checking the wording against the tests courts apply. A careful read of one code for one kind of problem could take days. No one could do that for thousands of places, or keep doing it as codes changed. So most of these rules were found, if ever, after someone had already been fined, cited or turned away.
AI changes that. A model can read the same text in minutes, apply the same legal tests and do it across thousands of places at once. The reading can be repeated whenever a code changes, so a problem can be caught when a rule is written rather than years later when it is enforced. Instead of waiting for a story to break, it becomes possible to watch for these problems continuously.
Our first use of that kind of reading is checking local codes against the Constitution and federal civil-rights law. This post explains how we did it and what turned up. Then it turns to what can be done about it: how a city can fix a rule on its own, and how residents and civil-rights organizations can press for a fix when it doesn’t.
From every local government to a potential violation
- 38,736local governments in the U.S.: counties, cities, towns and townships
- 4,684whose codes went through an initial screening12% of all
- 3,629where the screening flagged something for a closer review77% of those screened
- 2,844where the closer review found at least one potential violation78% of those reviewed
How we read the codes
We started with the codes of about 4,700 cities, towns and counties, chapter by chapter.
We looked mainly for what lawyers call facial problems. A facial challenge argues that a law is invalid as written, whoever it is applied to. The other kind, an as-applied challenge, argues that a law was used unlawfully against a particular person, and it turns on facts that no code contains. Reading text can find the first kind. It can’t find the second.
We looked in six areas, chosen because problems there often show in the wording and because courts have set clear tests for them:
- Signs & expression: sign rules that treat messages differently by what they say.
- Permits & assembly: permits for parades, protests, solicitation and similar speech, and how much discretion officials have to grant or refuse them.
- Search & seizure: inspections, towing, demolition and other ways a government can enter or take property, and the notice and hearing owed first.
- Excessive fines: fines, fees and forfeitures that may be out of proportion to the offense.
- Fair housing: zoning and housing rules that may exclude people the Fair Housing Act protects.
- Religious land use: zoning that may burden houses of worship or treat them worse than comparable secular uses.
The reading went in two passes:
- An initial screening. A fast model checked every chapter against each of the six areas. It answered a narrow question: does this text touch the area, and could it raise a problem under the test courts apply? It flagged at least one chapter in 3,629 of the places.
- A closer review. Each flagged chapter went to a more capable model that read the whole chapter, sometimes hundreds of pages. It found the specific sections involved, applied the test a court would use, wrote out the government’s strongest defense, noted what it couldn’t tell from the text and suggested a fix. A place can have several chapters flagged, in more than one area, so those 3,629 places produced about 16,600 separate analyses.
What turned up
The closer review found at least one potential violation in 2,844 of the 3,629 places, in 49 states. About half of the 16,600 analyses (8,535) found one, and most found more than one: within those analyses the review marked about 27,500 individual issues as potential violations. About two-thirds of the analyses are facial: the wording alone appears to fail the test courts apply, whatever the practice.
By area, the number of places with at least one potential violation:
- Permits & assembly: 2,091 places. Most often, a permit for a parade, a protest, charitable solicitation or a sign depends on an official’s judgment with no clear standard: a “community benefit” test, a council’s discretionary approval, a requirement that street performers find a nonprofit sponsor. Courts have long struck down permit schemes for speech that leave officials that much room (Forsyth County v. Nationalist Movement).
- Signs & expression: 1,702 places. Most often, sign rules treat signs differently by topic: real-estate signs allowed in residential yards where a resident’s own political sign is not, special exemptions for holiday signs, campaign signs on a different timetable. Since Reed v. Town of Gilbert (2015), courts have treated that kind of rule as presumptively unconstitutional.
- Search & seizure: 1,581 places. Two patterns account for most of it. In roughly 1,000 places the concern is notice before a government tows a car, demolishes a building, removes belongings or sells seized property. In roughly 500, officials may enter and inspect a home or business without a warrant or any chance to object first, sometimes as a condition of a rental or business license. The Supreme Court has required a warrant or a similar check for routine inspections since Camara v. Municipal Court (1967).
- Fair housing: 629 places. Most often, homes for people with disabilities face an extra approval step, spacing rule or household limit that other households don’t, which the Fair Housing Act generally forbids.
- Religious land use: 415 places. Most often, a house of worship needs a special permit, or more parking, in a district where a theater, lodge or private club of similar size is allowed by right. Federal religious land-use law forbids treating religious assemblies worse than comparable secular ones.
- Excessive fines: 333 places. Most often, mandatory daily fines for minor continuing violations, such as overgrown vegetation or a missed paperwork deadline, can grow without a ceiling or a way to ask for a reduction. The Constitution bars fines grossly out of proportion to the offense (United States v. Bajakajian).
Keep in mind what these are. Each analysis is a first read by an AI model, not a legal conclusion, and no attorney has reviewed it. It may be missing context: how the rule is enforced, what another part of the code or state law adds, or whether the text has been amended since. Many flags would fall away once an attorney checks those things, and a place with nothing flagged hasn’t been cleared.
Three examples from mid-sized and large cities show what a flag looks like. Each describes the code text as we read it in March 2026, and each still read the same way when we checked on December 2, 2026. Each is a potential conflict that merits a closer look by the city, its residents or a lawyer, not a finding that the city has violated anyone’s rights.
- Cleveland, Ohio: who may live in a care home. The zoning code allows hospitals and nursing, rest and convalescent homes in residential districts, but not ones “for the care of the insane or developmentally disabled.” The wording closely tracks an ordinance the Supreme Court dealt with in City of Cleburne v. Cleburne Living Center (1985), and the Fair Housing Act has since barred zoning that singles out people with disabilities. The city could answer that the clause covers institutions, not homes, and that state law separately allows small group homes. Read the analysis.
- New Haven, Connecticut: inspectors in the home. The housing code authorizes inspectors “to enter, examine, and survey at all reasonable times all dwellings,” and says the owner or occupant “shall give the enforcing officer free access.” Anyone who violates the code is “subject to citation and fine,” with each day a separate violation. Nothing in the text we read says what happens when a tenant asks for a warrant first. That is the situation in Camara v. Municipal Court (1967), where the Supreme Court held that a resident can’t be punished for refusing a routine housing inspection made without one. The city could answer that it reads the section to require consent or a warrant, and that housing inspections protect tenants. Read the analysis.
- Corpus Christi, Texas: no charity appeals after 6 p.m. The code makes it unlawful “to solicit funds for charitable purposes” between “6:00 p.m. and 9:00 a.m. during standard time.” Asking for charitable donations is protected speech (Village of Schaumburg v. Citizens for a Better Environment, 1980), and federal appeals courts have repeatedly struck down solicitation curfews that begin that early. The city could point to residents’ privacy in the evening and to the daytime hours left open. Read the analysis.
To see what turned up for a particular place, find it with search or the map and open its Local law review section.
What can be done about it
A flagged rule can be fixed in two ways. The city can fix it, or someone else can press the city to.
The city fixes it. This is the best outcome, and the simplest. A city learns that a provision in its code is out of step with the Constitution or federal civil-rights law, its attorney confirms it, and the council amends it. Nobody is fined under a rule that shouldn’t be enforced, and nobody spends years in court.
Most of these rules weren’t written in bad faith. Local codes grow over decades. A sign ordinance drafted in 1985 may have been ordinary then and fall short of a test the Supreme Court set in 2015. A towing or inspection provision may have been copied from a neighboring town’s code and never revisited. Many such rules have never been enforced against anyone who pushed back, so no one has had reason to look. For a city that wants to look now:
- Treat an analysis as a lead. Have your attorney check each flagged provision against current law, how the rule is actually enforced, and any amendments since the version we read. If an analysis is wrong or out of date, tell us and the page will be corrected.
- Fixing early is usually cheapest. A provision amended after an internal review costs drafting time. The same provision defended in court and lost can cost the city its own lawyers and the other side’s.
Someone presses for a fix. When a city doesn’t act, residents and civil-rights organizations can. That usually starts well short of a courtroom:
- Raise it. Bringing an analysis to a council member, the city attorney or a public meeting, and asking for the suggested fix, costs nothing and is often the fastest route.
- Bring in a lawyer if the rule has been used against you. Someone who was fined, cited or denied a permit under a rule is in a different position from someone who only read it. Civil-rights attorneys, legal aid offices and public-interest law groups handle these questions every day.
- Sue, as a last resort. Federal civil-rights law lets a person challenge a city’s own ordinance directly, and, as the next section explains, a city that loses usually pays the challenger’s lawyers. That is what makes a lawsuit possible for people who could never afford one, and it is the practical reason a city should fix a bad rule before it gets that far.
How fee-shifting helps residents hold governments accountable
Normally in American courts each side pays its own lawyers, win or lose. Congress made an exception for civil-rights cases. Under 42 U.S.C. § 1988, a court may order the losing side to pay the “prevailing party’s” reasonable attorney’s fees in cases brought under the main federal civil-rights statute (Section 1983) and the religious land-use law (RLUIPA). The Fair Housing Act has a similar provision.
The idea is that people whose rights have been violated often can’t afford to sue, and the harm, such as a $200 fine or a denied permit, is often too small to pay for a lawyer on its own. Fee-shifting lets lawyers take cases that matter without charging the client up front, because the government pays if they win. It does two things at once: it lets residents and civil-rights attorneys act on a rule like the ones described here, and it gives a city a real reason to fix the rule first.
Three features make this especially relevant to local codes:
- A written rule is the city’s own policy. Under Monell v. Department of Social Services, a local government can be sued under Section 1983 for its own policies, though not merely for an employee’s misconduct. An ordinance on the books is about as clear a policy as there is.
- Cities don’t get qualified immunity. Individual officials can often avoid damages if the law wasn’t clearly established. Under Owen v. City of Independence, the city itself can’t.
- The fee can dwarf the damages. A case over a $200 fine can produce a fee award many times that, because the lawyers’ hours are what the court is paying for.
What it could add up to
How much money is at stake? There is no single answer, but the arithmetic is simple enough to sketch. Courts set a fee by multiplying the hours reasonably spent by a reasonable hourly rate for lawyers in that local market. The table uses round, illustrative assumptions: hourly rates of $300 (a smaller market) and $500 (a large metro area), and hours that rise with how far the case goes. A challenge to a rule’s wording is mostly a legal question, so many end at summary judgment, a ruling on the law without a trial.
| When the rule is fixed | Challenger’s lawyer hours | Fee owed at $300/hour | Fee owed at $500/hour |
|---|---|---|---|
| City amends after its own review, before anyone complains | none | $0 | $0 |
| City amends after a demand letter, before any suit | 10–30 | usually $0 | usually $0 |
| Suit filed, settled early with a court-approved consent decree | 60–120 | $18,000–$36,000 | $30,000–$60,000 |
| City loses at summary judgment | 150–300 | $45,000–$90,000 | $75,000–$150,000 |
| City loses at trial and on appeal | 500–1,000 | $150,000–$300,000 | $250,000–$500,000 |
Real awards fall across that range. Slidell, Louisiana, paid $25,000 after a court struck down its panhandling permit rule in 2017. Springfield, Illinois, was ordered to pay about $334,000 after two trips to the appeals court over its panhandling ban. Oklahoma City was ordered to pay nearly $1 million in 2021 after losing on appeal. These are cases that drew attention, not a typical sample.
Those are only the other side’s fees. The city also pays its own lawyers, often for a similar number of hours, unless an insurance pool covers the defense. A rule defended through summary judgment and lost can cost a city $100,000 to $300,000 all told.
That gives a sense of the scale of what the review found. Take the 2,844 places with at least one potential violation, and suppose each faced a single challenge that ran to summary judgment:
- If a quarter of those places had a rule that lost in court, about 700 cases at $100,000 to $300,000 each comes to roughly $70 million to $210 million.
- If half did, roughly $140 million to $430 million.
- If all did, roughly $280 million to $850 million.
This is an estimate of scale built on those assumptions, not a prediction and not money anyone is owed. Most of these rules will never be challenged, many flags won’t hold up when an attorney looks closely, and some places have more than one rule at issue. The top row of the table is the comparison that matters: amending a rule costs some hours of the city attorney’s and council’s time.
When a city owes fees, and when it doesn’t
The key word in the statute is “prevailing.” Over the past 25 years the Supreme Court has narrowed it, and the changes matter most in exactly the situation these analyses can create: a government that changes its rule after being challenged.
- A voluntary change isn’t a win. In Buckhannon Board & Care Home v. West Virginia (2001), the Court held that if a lawsuit prompts a government to repeal a rule on its own, the person who sued hasn’t “prevailed,” however much the suit caused the change. To collect fees, a plaintiff needs a court-ordered change: a judgment or a court-approved consent decree.
- An early court order isn’t enough either. In Lackey v. Stinnie (2025), drivers won an early order blocking a Virginia law, the legislature then repealed it, and the case ended without a final ruling. The Court held the drivers hadn’t prevailed, so their lawyers could not collect fees.
- A claim for past harm can keep a case alive. In Uzuegbunam v. Preczewski (2021), the Court held that a claim for nominal damages, often one dollar, for a past violation keeps a case going even after the challenged policy is gone. So someone who was actually fined, cited or denied under a rule may be able to carry the case to a final judgment even if the rule is repealed.
- But a nominal win may bring a nominal fee. Under Farrar v. Hobby (1992), a plaintiff who wins only nominal damages is a prevailing party, but the reasonable fee may be small or even zero. Courts look at what the case actually achieved, and may cut a fee for partial success (Hensley v. Eckerhart).
- The fee rule mostly runs one way. A government that wins can recover its fees only if the challenge was frivolous, unreasonable or without foundation (Christiansburg Garment Co. v. EEOC).
- There are deadlines. Section 1983 claims borrow the state’s deadline for personal-injury suits (Owens v. Okure), often two or three years from the harm.
State law can differ. Some states have their own fee statutes, and some still accept the theory federal courts rejected in Buckhannon. California’s highest court, for example, kept it for the state’s private-attorney-general statute (Graham v. DaimlerChrysler Corp., applying Cal. Code Civ. Proc. § 1021.5).
Put together, these decisions create an incentive worth saying plainly: under current federal law, a government that fixes a challenged rule before a court enters judgment will often owe no attorney’s fees for it. Some see that as a loophole that lets governments wear down challengers; others see it as the system working, since the rule gets fixed without a costly judgment. It also means a lawyer working for a fee award can afford only strong cases, and usually needs a client the rule has actually harmed. This is why “potential violation” doesn’t mean “lawsuit.” Most of the concerns on this site would never be worth a lawyer’s time on their own: no one has been harmed, the rule is rarely enforced, or the city would fix it if asked.
Where this leaves us
The point of reviewing local codes at scale isn’t to produce lawsuits. It is to make it easy to find, and fix, rules that may not meet the standards the Constitution and federal law set, ideally before anyone is fined, cited or turned away under them. A city can do that on its own. Where it doesn’t, residents and civil-rights organizations can ask, and fee-shifting is what gives the asking weight.
We think that is worth doing. If the Constitution and the federal civil-rights laws are worth having, then local rules that conform to them matter. These are the rules people run into in their day-to-day lives: when they put up a sign, hold a march, rent a home, open a house of worship or get their car towed.
But reading law at scale is new, and it creates a real challenge for local governments. Rules that would have sat unnoticed for decades can now be found, all at once, by anyone. A small town with a part-time attorney may suddenly face questions about provisions no one on its staff wrote.
It is one case of something larger. The cost and difficulty of using the legal system have long worked as a kind of rate limit on it, and AI is loosening that limit. There are early signs in the courts. A 2026 study of federal court records found that civil cases filed by people without lawyers, excluding prisoners’ cases, averaged about 23,000 a year from 2005 to 2022 and reached about 41,000 in fiscal 2025, while cases filed by lawyers held steady. The authors don’t claim AI caused the rise, and they find the courts aren’t yet visibly strained. Still, institutions built around the assumption that legal work is slow and expensive will have to work out what happens as it becomes fast and cheap. We don’t have complete answers. We do think the place to start is a specific, early warning that a government can act on before anyone is hurt or sued.
Look up your city, town or county, or see what each topic is for.