Maneja Sin Broncas, traffic law in plain Spanish

2026 · Backend, search and evals

Ask Mexico City's traffic rules a question and get the article, the fine in 2026 pesos and whether your car gets towed.

Cloudflare Workers, D1, Vectorize, Workers AI, Claude, TypeScript, PDFKit

TL;DR In October I pointed fundamento, my search engine for Mexican tax law, at Mexico City’s traffic rules. It needed a parser for the city’s PDFs, the words drivers use, fines in 2026 pesos and the article that sends your car to the impound lot. Answering with fundamento’s setup, it got 50.0% of 28 test questions right, and six rounds of changes took it to 96.4%.


Ask it what the fine is for riding a motorcycle without a helmet. This is the answer from the test run behind the live setup.

Circular en moto sin casco protector (o con uno que no cumple lo exigido) infringe el artículo 37, fracción III, inciso d) [RT 37]. Ese inciso lleva la sanción más alta de la fracción: multa de 10, 15 o 20 UMA, es decir $1,173.10, $1,759.65 o $2,346.20 en 2026, y tres puntos a la licencia para conducir [RT 37]. Además, ese mismo inciso d) es causa de remisión de la motocicleta al depósito [RT 67]. Los artículos citados no mencionan arresto para esta infracción.

The fine is the one inciso d) carries, the highest in its fracción. It comes in pesos because the reglamento writes it as 10, 15 or 20 times the UMA, a unit INEGI set at $117.31 a day for 2026. The impound lot, the corralón, comes from article 67, which the question never mentions, and the last sentence is there because the prompt asks for it whenever the articles leave something out.

Maneja Sin Broncas at desktop width. On the left, the question ¿Qué multa hay si voy en moto sin casco? as the page title, a matching frequent question, and the articles found, with article 37 marked Citado en la respuesta and article 38's fine shown as $586.55, $821.17 and $1,173.10. On the right, the Educación vIAl panel answers with inciso d) of article 37, a fine of $1,173.10, $1,759.65 or $2,346.20 in 2026, three license points and the impound lot under article 67, citing Art. 37 and Art. 67.
The same question on the live site, with the answer beside the articles it cites.

Everything that differs between the two sites lives in src/corpus.ts, and one deploy flag builds this one. fundamento is graded against the tax authority’s own criteria, which name the articles behind each answer. Traffic law has no criteria like those, so the test set here is 28 driver questions, each with the articles that answer it and a reference answer checked against the text, and Claude Opus grades every answer against its reference.

A parser for the city’s PDFs

The texts come from the Consejería Jurídica, the city’s legal office, as compiled PDFs of the law in force. Next to the reglamento’s 70 articles, last reformed on June 30, 2026, sit the Ley de Movilidad and its regulations, the Ley de Cultura Cívica and three articles of the city’s Código Fiscal on license, tow-truck and impound fees. The rest of the Código’s 1,142 pages would have drowned the search.

fundamento’s parser expects the federal format, and these PDFs break it in small ways. Fracción and inciso numbers come out separated from their text, so the parser reads where each line sits on the page. Some headings skip the space after the dash, which would have glued article 38 onto article 37. The official PDF even numbers article 8’s fracciones VII to XV one higher than the law does, because a sanction paragraph got numbered by mistake. It all ends up as 1,247 searchable chunks and 136 links between articles.

Rank all five documents together

fundamento ranks the tax laws apart from the tax authority’s rules, because the rules paraphrase the laws and crowd them out. Here the reglamento in a list of its own found the right article in the top five for 82.1% of the questions, and one ranking over all five documents found 89.3%. So the site has one list.

Search here mixes keywords and vectors. Vectors missed three questions whose answer turns on exact wording, the seat belt, Hoy No Circula and the Metrobús lane, and keyword search found all three, so together they put the right article in the top five for all 28. On 28 questions the gain over vector search on its own runs from 0 to 21 points, so this test set can’t fully separate the two.

I also tried Claude Haiku as a reranker, reading the top 30 results and picking the best 10. On the first run each excerpt was cut to 700 characters, and it ranked worse than the search it was reordering. With whole excerpts it put the right article first more often, 75.0% against 71.4%, and lost one question from the top five, a difference 28 questions can’t resolve, so it isn’t live. Reordering keyword results without vectors, it reached 85.7% at top five against the live 100%.

Drivers don’t say depósito vehicular

Drivers say corralón, fotocívicas, alcoholímetro and Hoy No Circula. The reglamento says depósito vehicular, sistemas tecnológicos, aire espirado and programas ambientales. Adding the law’s words to each query lifted keyword search from 71.4% to 85.7% at top five.

Fines in pesos, inciso by inciso

Most fines are three amounts, and the ticketing system picks one by how many sanctions you have pending. The sanction paragraphs come after the rules and say which incisos each amount covers. In article 37 the seat belt, inciso b), costs 5, 7 or 10 UMA and one point on the license. A rule in the prompt says to use only the sanction of the inciso the question is about, and Haiku still slipped once, in run t3, giving another inciso’s 10, 15 or 20 UMA and three points. Every run since has gotten it right.

Two sanction paragraphs from article 37. Breaking incisos a), b), d) or e) costs 5, 7 or 10 times the UMA, shown as $586.55, $821.17 and $1,173.10 behind green, amber and red dots, plus one license point. Inciso c) costs 10, 15 or 20 times the UMA, shown as $1,173.10, $1,759.65 and $2,346.20, plus three points.
Article 37's sanctions on the site, each fine in 2026 pesos from lowest to highest.

The corralón lives in article 67

The helmet question never says corralón, and the answer still knows the motorcycle goes there. Article 67 lists every case that sends a vehicle to the depósito by the fracción or inciso it cites, so answers also read the paragraphs of articles that cite the ones they’re about. Those links are the same citation graph fundamento draws between articles.

The last rule was written for questions like “¿qué pasa si traigo un porta placas que tapa la placa?” Article 67 sends the car away for breaking any fracción of article 45 and shares no word with the question, so a paragraph that covers an article whole, todas las fracciones, now always comes along.

Run What changed Correct
t1 fundamento’s setup, answered by Haiku 50.0%
t2 street words, the chunk after each chosen chunk, a rule for what the articles don’t say 75.0%
t3 the top six articles whole, plus the paragraphs that cite them 82.1%
t4 t3 answered by Sonnet 89.3%
t5 paragraphs citing the two best articles always come 92.9%
t6 paragraphs covering a cited article whole always come 96.4%
t7 t6 answered by Haiku 89.3%

From t5 to t6 the one changed verdict was on a question that rule doesn’t touch, so that step is run-to-run variation, and the porta placas question isn’t among the 28. Sonnet’s edge over Haiku runs from 0 to 17.9 points, too wide to call at 28 questions, and Haiku’s misses are omissions, never wrong facts. The site answers with Sonnet anyway, because its answers are about fines and the corralón.

Twelve tips, each with a source

The site also says what to know if a traffic agent stops you, in 12 tips in the order a stop happens. Each legal claim is tied to the article it rests on, 26 citations in all, and claims no article makes needed an official page. The city’s police say authorized agents wear a green armband with a QR code you can scan to check they may fine you, in a press release from April 2022 repeated in February 2025. Four claims stayed out because no official source backs them, among them a right to film agents and a 90% discount for paying within 10 days that comes from 2022 news. Article 62 says 50% within 30 days.

Two phone screens of the page Si te para un agente de tránsito en la CDMX. The first shows the title, a paragraph on what the agent must do in a stop, citing articles 59, 64, 45 and 67, and a note that the site covers only Mexico City. The second shows tip 2, Solo un agente autorizado te puede multar, on the armband with a QR code that authorized agents wear, followed by Art. 4, 59 and 60 and a source line linking the city police's press release 1100 of April 28, 2022.
The guide at phone width. Each tip lists the articles behind it, and the QR armband, which no article mentions, links the city police's press release.

It covers Mexico City only, and says so, since the State of Mexico and every other state have their own rules. It went live as semáforo and was renamed Maneja Sin Broncas on October 16. Its home page now opens on “conoce el reglamento y maneja sin broncas”, know the rules and drive without trouble.

The one answer still short at t6 is the breathalyzer. It gives the arrest, the six points and the corralón, and leaves out the one-year license suspension a first offense gets, which sits in the Ley de Movilidad. Try it at manejasinbroncas.carlosaguirre.workers.dev.