What we built, how, and what the state research found
Location and TA in. Bill of materials out. In 50 states.
Morgan asked on 9/11 for a tool that takes an address and a TA type and returns the materials list, to price AWP’s Arizona jobs. It’s live, it has an API, and it knows 50 states’ rules. Below: the short version, then the detail.
The one-minute version
- It works and it’s live. bom-dev.apps.keryk.ai. A web page, an API and a training guide with two films.
- Signs and devices are exact. Cones are about half. The drawing explains 44–64% of the cones on a real job. The rest is site work: driveways, side streets. We show that split on every answer.
- The state layer is our edge. Same job, different state, different count. A 55 mph lane closure: federal says 36 cones, Maryland 80 drums.
- Coverage is breadth, not proof. All 50 states have rules loaded and cross-checked. Only 2 Arizona drawings are checked against real jobs.
- Fix before AWP sees it: typing an address only picks the right state for Arizona and Virginia. Picking the state by hand works.
What we built
Three things, one engine
The web page
Type a location, pick the TA, set zone length. Get signs, devices and three cone numbers. Everything else sits under “Show the working.” Keryk-branded as of today.
The API
POST /estimate is the main call. JSON in, full bill of materials out, with the math and every assumption. Docs at /docs.
The guide
/guide: an operator’s manual built from the engine, so its numbers can’t drift. Two films: “Get a number” (85 s), “Why the state matters” (66 s).
The API, route by route
| Route | What it does |
|---|---|
| POST /estimate | The main call. Needs ta. Takes address or lat/long, jurisdiction, speed, zone length, lane width, days, night, hours, side, counts of intersections and driveways. |
| POST /api/bom/single | Same thing as a form post. Shaped like AFAD’s endpoint, so it drops into that pattern. |
| POST /ranges | One job across a speed band. Shows how counts move with speed. |
| GET /api/catalog | Lists the 18 TAs (which are validated) and 49 jurisdictions. |
| GET /health, /ready | Status checks for Coolify. The only routes open without a login. |
| GET /docs | Interactive API docs. |
Login: every route but the two status checks needs a username and password. Scripts send them with curl -u name:password.
Every answer carries its receipts: which rule set, which sheet, the algebra line by line, where each input came from, and a plain “scope” line: materials estimate, not a traffic control plan.
How it was built
- Engine: plain Python, no outside libraries, no network. 18 templates, one per MUTCD drawing. 49 state and city rule files layered on top.
- Service: FastAPI, same shape as the AFAD checker. Deployed on Coolify. Redeploys are manual; auto-deploy never fires.
- Own repo: keryk-ai/connor-bom-tool, split from the rules repo on 9/15 so the rules backlog stops attaching to it. 14 pull requests.
- Tests: 43 engine tests, a 294-check snapshot across every jurisdiction, and a calibration run that must fail when the math is wrong.
- Method: AI agents drafted; separate AI agents tried to break every draft. Anything unchecked is labelled unchecked.
How it works
Six steps from a pin to a truck list
You can type any input instead of looking it up. What you type wins. Nothing is guessed silently: every default shows up in the assumptions list.
No speed and none typed? It stops and asks. Address fails and no state picked? It stops. It never falls back to federal quietly, because federal is a different rulebook, not a safe default.
Three cone numbers, not one
| Number | What it is | Use it for |
|---|---|---|
| Derived from the standard | Pure math off the drawing. Nothing assumed. | Quoting. And comparing against Morgan’s engine. |
| Likely on site | The math plus an allowance for driveways and side streets. A range. | Planning. The allowance comes from only two real jobs. |
| Load the truck | Top of that range, rounded up to ten. | What goes on the truck. |
The state research
50 states, each checked against its own documents
This is the part Morgan’s engine doesn’t have. His is built on the federal manual. Ours knows where each state departs from it.
Where the numbers came from
- 42 states: from research we already had. Each state has a formulas file from our May–June onboarding research (5/28–6/1), in the TCP rules repo. We copied those rules into a machine format. Transcription, not new research.
- Arizona, Pennsylvania, Virginia, Maricopa, Phoenix: from the live rules engine’s reference files and SME rulings.
- 7 states researched fresh from the web (PR #2, 9/15): Delaware, Mississippi, New York, North Carolina, Rhode Island, South Carolina, West Virginia.
- 4 states need nothing: Montana follows federal exactly. Maine, Arkansas and North Dakota follow federal with a stated caveat.
How it was checked
Every state file went to separate AI checkers whose only job was to prove it wrong. They read the state’s own source and argued against each value.
| Batch | What the checkers found |
|---|---|
| First 31 states (9/14) | 26 of 27 files needed corrections. 12 made-up values in 5 states. 1 fake citation (Massachusetts). Only Alabama passed clean. |
| Full audit (9/15) | 37 state files plus the 9 “federal is fine” states. Every finding put to three checkers. Majority rules; ties re-checked by hand. |
| Audit backlog (9/15) | 52 findings fixed across 15 states. 24 citations corrected. |
| Last 7 states (9/15) | 72 problems, all fixed: 33 misread sources, 13 values that should have followed federal, 11 invented values, 8 fake citations, 6 wrong table numbers. All 7 needed correction. |
The biggest correction: “federal is fine” wasn’t
We first counted 44 of 50 states covered, 9 of them because “the state just follows federal.” The audit checked those 9 against their own documents. Only Montana held. Coverage dropped to 38 before we built it back to 50.
| State | What federal got wrong |
|---|---|
| Hawaii | Worst case. Its own table replaces taper, buffer, sign spacing and cone spacing from 20 to 55 mph. A 20 mph taper is 200 ft, not 80. Needed two new engine features. |
| Iowa | Sign spacing and buffer key to speed, not road type. Bigger buffers at 50+. 28-inch cones at night. |
| Kentucky | Fixed cone spacing (40 / 80 / 20 ft). Drums past 3 days or at night. |
| Mississippi | Its own buffer column and a flat 20 ft taper spacing on flagging jobs. |
| New Hampshire | Full-length lane-shift taper above 50 mph. Drums on divided highways. |
What a state rule file can say
States change the federal drawing in a handful of ways. The engine can express each one:
How long the taper is
Federal formula, the state’s own printed table, a flat length above a speed (MD, VA: 1,000 ft at 60+), or rounding (VA to 10 ft).
How big the safety gap is
Federal table, the state’s own table (OR, MI, TN, TX), a formula (HI), or none (Phoenix).
How far apart signs go
Federal A/B/C with single cells patched (NJ, MD, TX), one distance per speed (FL, PA, VA, WA), or equal to the taper (Phoenix).
How far apart cones go
The biggest driver of count. AZ and VA cap at 40/80 ft. FL uses 25/50. IL uses 20/50.
Cones or drums
Switches by speed, hours, night or road type. 24 jurisdictions change the device at night on a long job.
What we can’t model
Written out as a full sentence in each file, with what it would change. 47 files carry these notes.
Each file also records which MUTCD edition the state runs. NJ, MD, OK, UT and WY still run the 10th, so their table numbers differ, and citations are mapped for each.
One job, every state
Lane closure on a divided highway (TA-33), 55 mph, 2,000 ft zone. Cones or drums from the standard alone.
| State | Count | Line | vs fed | Why it differs |
|---|
20 states land exactly on federal for this job: Alaska, California, Colorado, Idaho, Louisiana, Massachusetts, Minnesota, Mississippi, Missouri, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, Oklahoma, Rhode Island, South Dakota, Utah, Vermont, Wyoming. Equal here doesn’t mean equal everywhere. Many differ at night, on freeways, or on flagging jobs.
What the research taught us
- Spacing matters more than taper. The biggest jumps (IL, MD, NY, FL) come from tighter cone spacing, not longer tapers.
- Zone length drives the count, not speed. At 1,000 ft, going 25 → 65 mph moves the count about 10%. At 45 mph, going 500 → 2,000 ft moves it about 70%.
- Federal counts fall as speed rises. Spacing widens faster than tapers grow. A 1,500 ft TA-21 drops 73 → 50 from 25 to 55 mph. Arizona runs the other way (73 → 69) because ADOT caps spacing.
- Cones don’t double at 45 mph. The taper jumps 1.69×, but total cones rise only 18–32%. A labour model built on “double” overcharges.
- Deferring is a finding. 20 states match federal on this job. That’s an answer, not a gap.
Maryland signs: already decided, needs Morgan’s ratification
Federal posts the advance signs twice on a divided highway: right shoulder and median. On 9/18 we set Maryland to one side only (PR #11), reading nine Maryland sheets. Maryland TA-33 signs drop from 6 to 3. The opposing reading is kept in the file: two high-res renders saw supports on both sides on two sheets. Ask Morgan: ratify or reverse.
What’s real and what isn’t
| Claim | Status |
|---|---|
| Signs and devices match real jobs | checked Exact on both Arizona exports. |
| Arizona TA-33 and TA-30R cone math | checked Against SRP Gilbert and SWG Chandler jobs. |
| Other 16 TAs | not checked Federal drawings with state numbers. |
| All 50 states’ rules | desk-checked Against each state’s documents, not against a real job. |
| “Likely on site” range | thin Fitted to two jobs. Swap them and it moves +38% / −29%. |
| Maryland values | dated From the 2011 manual. Rev 4 (Aug 2026) not yet read. |
Fix before AWP
Two problems, both small
For the conversation
What to ask Morgan
- Maryland signs: ratify one side (our 9/18 call) or reverse?
- Flat-rate equipment? If yes, cone precision stops mattering and the work moves to zone length, days and truck rolls.
- Arizona buffer: 0 ft (the Arizona file, SME) or the federal table (what the deployed rules and both real jobs fit)?
- More Arizona jobs: 10–20 exports from Jesus is the single biggest accuracy gain.
- Comparing with his engine: agree to compare “derived from the standard” only, on six shared benchmark jobs.
- AWP’s own counting: adopt their crew-load convention for signs, or keep ours labelled “drawing only”?
Also on the table: AWP’s manifest (not merged)
Jeremy’s AWP manifest and rate card arrived 9/18. A side branch compares them to our engine:
- AWP prices from a flat lookup: 15 setups × 4 zone lengths. Only cones move with length, +15 per 500 ft. No speed, no state.
- Signs are the big gap: AWP counts 2–7× more. They count what a crew loads; we count what the drawing shows.
- An “AWP crew” profile gets our cone count within 1 of theirs on lane closures and flagging.
- Flagging comes out 20–25 cones under AWP at every length. It’s their highest-volume job.
- We found two bad cells in their sheet (rows 427 and 452).
- Rate card: 90 price lists; the same item varies up to 114× between lists. Picking the right list is the hard problem for checking invoices.
- Margin by line (equipment vs labour) came from a quick read and isn’t in the repo. Verify before quoting it.
Timeline
Twelve days
| Date | What happened |
|---|---|
| Sep 11 | Morgan’s ask. Prototype engine, 18 drawings, calibration on two Arizona jobs, the API. |
| Sep 14 | Live on Coolify. Page cut down to the answer. 31 states added and checked. |
| Sep 15 | Four engine gaps closed. Full audit; coverage corrected to 38, rebuilt to 50. Own repo. |
| Sep 16–17 | Operator’s guide and two training films. |
| Sep 18 | Design pass. Maryland sign ruling. AWP manifest arrives. |
| Sep 21 | AWP manifest comparison and crew profile (side branch). |
| Sep 23 | Films re-shot on the new page. Keryk branding. Login on the whole site. This briefing. |
Words
Plain definitions
- TA
- “Typical application.” A standard MUTCD drawing for one kind of work zone, like a lane closure.
- Taper
- The angled line of cones that moves traffic over.
- Buffer
- The empty gap between the taper and the work. Safety space.
- Spacing
- How far apart cones sit. The biggest single driver of count.
- Overlay
- One state’s changes to the federal drawing, in a file the engine reads.
- Declared fallback
- Federal drawing, state numbers. The honest label on every state result until a state’s own drawing is loaded.
- Export
- A real, finished plan from the planner app. What we check against.
Keryk · BOM Estimator · compiled Sep 23, 2026 from the repo, its tests and the live service