XPRIZE Build with Gemini · Devpost Category 2 · Entrepreneurship & Job Creation

A $250 lawyer question, answered for $19 —and kept true after the law moves.

Every state writes its own cottage-food law. OvenClear gives a home baker a statute-cited verdict on “can I sell this?” and a print-ready compliant label — then re-issues that label when the law changes. Every decision lands on a public, signed, tamper-evident ledger.

law snapshot ac613546c5e5… verdict 0aa02fa04e65… merkle root fa7758f0f920…
mandated sentence verbatim (I2) sha256 83097ac3d61c… pack GA@2026-07
156 tests green 0 / 28 golden flips 78 / 78 signatures verified tamper caught at seq 39 every number, with its command ↓
01 · The problem

The question that stops a founder before she starts

the ask: “can I sell this?”

Which foods a home kitchen may sell, at which venues, under which license, and the exact sentence that must appear on the label — every state answers differently, and the answers change. A baker weighing her first farmers-market booth guesses, gives up, or pays for a food-law consult that costs more than her first month of profit.

Then one clause in a labeling section moves, and nobody tells her the label she is printing tonight is now wrong.

A consultant answers once. OvenClear answers with the statute quoted and a hash pinning the exact text it relied on — then does what no consultant does: it keeps the answer true, re-issuing the label when the rule beneath it changes.

Food-law consult — one question, answered once$250
Facebook-group folklorefree, wrong
OvenClear — verdict, citations, label, provenance page, and re-issue when the law moves$19
one-time · Law-Watch re-issue is the retention mechanic

02 · The refusal

It says no. That is the product.

verdict 3a128de0eef0…

Most compliance demos are yes-machines. Change one field and OvenClear declines the sale: cheesecake is not a shelf-stable baked good, so it quotes the refrigeration rule back at you instead of taking $19.

identical: state GA · farmers market · same rulepack GA@2026-07 one field changes: product sourdough bread cheesecake
✓ CLEARED · ELIGIBLE GA · sourdough · farmers market
Cleared verdict card from the /verify dashboard: Rosa's Bakes, Marietta GA, sourdough at a farmers market — CLEARED, ELIGIBLE, with the fixture statute quote naming eligible cottage foods including sourdough, citation GA-CF-3.1, and law-snapshot plus verdict hash chips.
Eligible, cited, pinned. The statute is quoted verbatim from its hash-pinned snapshot — a verdict without a pinned snapshot hash cannot exist (invariant I1). open full size ↗
✕ REFUSED · NOT ALLOWED GA · cheesecake · farmers market
Refusal card from the /verify dashboard: Charlie's Cheesecakes, Atlanta GA, cheesecake at a farmers market — REFUSED, NOT ALLOWED, quoting the fixture refrigeration rule, citation GA-CF-1.2, with the note: no label issued, fails closed.
Refused, and it shows the sentence it refused on: “requires time or temperature control for safety, including cheesecakes…” — GA-CF-1.2 (FIXTURE). No label is issued. It fails closed. open full size ↗
“We are not going to sell you a label for this. … Charging you $19 for a label you cannot legally use would be the product failing.”

— the storefront’s actual refusal page, server/pages.ts. Not an error state. It is written like the product’s proudest moment, because it is.

Verdict before payment

The verdict is computed and shown before checkout exists. A prohibited product never reaches a pay button.

Recomputed at checkout

The server re-runs the verdict on its own state at checkout. A hidden-field edit cannot talk it into selling a label the state disallows.

Refund over revenue

If a prohibited order is paid anyway, fulfillment refuses the label and flags a refund rather than keeping the money. The QA gate fails closed after payment too.


03 · The machinery

Question → verdict → label → re-issue, on a signed ledger

law snapshot ac613546c5e5…

The compliance decision is a deterministic table over hash-pinned law snapshots — not a language model. Gemini sits around that core, constrained. Every step appends to a hash-chained ledger with per-agent Ed25519 signatures and daily Merkle roots.

STAGE 1

Intake

Six structured questions, no chat box. “My tangy no-knead boule” hits a deterministic catalog first; Gemini only gets a turn on a miss.

gemini-2.5-flash · enum-locked
STAGE 2

Verdict

The table resolves product, venue, and state against pinned snapshots. Every citation quote is a byte-substring of its snapshot. Unknown category? It refuses rather than guesses.

I1 · pinned or no verdict
STAGE 3

Label + QA gate

The label is composed, never generated. A gate re-reads the finished artifact: every mandated sentence present byte-for-byte, or the label does not ship — paid or not.

I2 · fails closed
STAGE 4

Law-Watch

Snapshots are re-diffed and each delta classified material, cosmetic, or immaterial. Material label-text changes fan out: affected labels re-issue, chained to their previous version.

gemini-2.5-pro · materialityI3 · act or log
#53lawwatch_agentdiff_computed — TX 2026-06-03 → 2026-07-01 · 5 deltas✓ signed
#56lawwatch_agentdiff_classified — material / label_text · Section 6. Labeling✓ signed
#60impact_agentimpact_resolved — label_text · 14 affected✓ signed
#61lawwatch_agentrulepack_registered — TX@2026-07✓ signed
#70reissue_agentlabel_reissued✓ signed
#72reissue_agentnotification_sent✓ signed
#77impact_agentmaterial_diff_none_affected — logged (I3)✓ signed

Real rows from the committed 78-row export · chain OK · 78 signatures · lastHash 620879cff8a562bd… · merkleRoot fa7758f0f920…

What Gemini may do

  • Widen recall. gemini-2.5-flash maps “my tangy no-knead boule” onto sourdough bread — constrained to an enum of the catalog itself, then re-checked by the same deterministic normalizer before any rule runs.
  • Classify materiality. gemini-2.5-pro reads each law diff and calls it material, cosmetic, or immaterial — the hard problem in the subscription. Unclassifiable deltas default to material, the conservative direction.

What it may never do

  • Invent a product or move one between categories.
  • Turn a refusal into a sale, or admit a label the byte-verbatim QA gate rejected.
  • Overrule the table. If model and table disagree, the table wins — and the disagreement is recorded on the ledger.
The physical artifact panel: the print-ready Rosa's Bakes label with the mandated sentence outlined, next to a real scannable QR code, with chips showing label sha256, law snapshot hash, pack GA@2026-07, and 'mandated sentence verbatim (I2)'.
What the $19 buys. Mandated sentence byte-verbatim, and a real QR that resolves to a public per-label provenance page. open full size ↗
LABELED HISTORICAL REPLAY — a TX fixture amendment, not a live crawl
scroll to follow the fan-out ↓
Law-watch panel titled 'The law moved. Nobody panicked.' showing the Texas snapshot pair, the before and after mandated sentence with the inserted words 'or a local health department' highlighted, a table classifying five deltas as material, cosmetic, or immaterial, counters for the 14-member fixture cohort, 9 auto-re-issued labels, 5 notified, 1 none-affected, the list of re-issued fixture businesses with new sha256 hashes, and the signed ledger rows beneath.
One replayed amendment, end to end: 5 deltas → 2 material / 1 cosmetic / 2 immaterial → 14 affected → 9 re-issued + 5 notified + 1 none-affected logged. Every re-issued label re-passes the QA gate; every step is a signed row. No human in the loop. open full size ↗
Provenance integrity panel: the daily Merkle root for 78 rows and 78 Ed25519 signatures, the verify command, and a REJECTED badge explaining that injecting one byte into row 39's payload localizes the mutation to seq 39 and rejects the whole export.
A single changed byte cannot hide. The export re-derives clean; then one injected byte is caught and localized to seq 39. open full size ↗
Public label-provenance page for fixture business Kate's Kolaches: FIXTURE banner, current mandated statement, QR code, hash chips, and an issue history showing the original label and the automatic re-issue triggered by the mandated-wording change, each QA-passed and ledgered.
What the QR resolves to. A public provenance page — current label, snapshot hash, and the full issue history including the automatic re-issue. Anyone holding the product can check the label is current. open full size ↗

04 · Run the proof

Every figure here is a command output

verified 2026-08-15 · offline · no API key

No network, no API key, no account — Node ≥ 18.17 and npm. Six numbers, each with the command that prints it, then the exact expected tails.

156
tests across 10 files, all green
npm test
0 / 28
golden verdict flips — a rulepack edit cannot silently change an answer
npm run bench
≈24 µs
verdict p50 (p95 ≈35 µs) — this machine; the shape holds
npm run bench
12 / 12
end-to-end self-test checks, fully offline
npm run self-test
78 / 78
ledger rows re-derived, Ed25519 signatures verified
npm run verify-ledger
seq 39
one injected byte — caught, localized, whole export rejected
npm run verify-ledger
terminal — the whole gate
# clone the repo, then:
npm install
npm run ci   # typecheck → tests → seed:check → self-test → verify-ledger → bench
SELF-TEST: PASS (12/12 checks)
PASS — clean export verifies; mutation localized + rejected at seq 39
golden verdict flips: 0 / 28
CommandWhat you witnessExpected tail
npm run self-testInterview → verdict → label + QA, the cheesecake refusal, then the TX replay fanning out to 9 auto-re-issues + 5 notices — all on the signed ledgerSELF-TEST: PASS (12/12 checks)
npm run verify-ledgerRecomputes the chain, all 78 Ed25519 signatures, and Merkle roots; then one injected byte is caught and localizedrejected at seq 39
npm run benchVerdict latency over the golden set plus the zero-flip regression gategolden verdict flips: 0 / 28
npm run serveThe storefront — landing, free verdict, checkout flow — with no Stripe key and no Gemini keyhttp://localhost:8080
npx tsx src/cli.ts check --state GA --product cheesecake --venue farmers-marketThe refusal, in a terminal, statute-citedNOT ALLOWED

table scrolls sideways →

Captured stdout of npm run self-test: the Georgia interview, verdict, and label QA checks, the cheesecake refusal, the Texas amendment replay with 9 re-issues and 5 notices, the signed ledger tail, and the final line SELF-TEST: PASS (12/12 checks).
The end-to-end offline proof. Real captured stdout of npm run self-test, ending in PASS (12/12). open full size ↗
Captured stdout of npm run verify-ledger: the clean export re-derives with every signature verified, then a deliberately mutated row is rejected and localized to sequence 39.
The tamper demo. The clean export re-derives, then a mutated row is rejected at seq 39. open full size ↗
the full /verify dashboard — scroll ↓ · opens from file://, no server, no fetch
The complete /verify dashboard in one capture: counters sourced from the fixture ledger, the cleared and refused verdict cards, the print-ready label with QR, the Texas law-watch replay with its re-issue fan-out, the Merkle root and tamper badge, and the signed ledger table.
The judge-visible dashboard, rendering the committed pipeline export. Captured 2026-07-05, when the core suite stood at 128 tests — it stands at 156 today; regenerate all 17 captures yourself with npm run evidence. open full size ↗

05 · The three criteria

Read it the way the rubric reads it

merkle root fa7758f0f920…

Three equal criteria, tie-broken in this order. Here is where each one lives in this build — and where it stops.

TIE-BREAK 1

Business Viability

A $19 one-time product with its whole order path built: landing, free statute-cited verdict, Stripe Checkout, webhook fulfillment, print-ready label delivery, public QR provenance — one codebase, no second copy of the decision logic.

The retention mechanic is the Law-Watch re-issue: recurring value is logged autonomous work on the ledger, not a newsletter.

Honest status: nothing has been sold and the service is not deployed. The rail is wired in Stripe test mode; flipping the key is a business milestone, not an engineering one.

Check: server/ — fulfill.ts refuses prohibited orders and flags refunds · npm run serve runs the storefront with no keys

TIE-BREAK 2

AI-Native Operations

The order path runs agent-operated end to end — intake, verdict, label composition, QA gate, delivery, law-watch, re-issue — every decision appended to a hash-chained, Ed25519-signed ledger under five test-enforced invariants.

Gemini makes real decisions inside hard limits: gemini-2.5-flash resolves products enum-locked to the catalog; gemini-2.5-pro classifies law-diff materiality, defaulting to material when unsure. The model proposes, the table decides, disagreements are recorded.

The offline proof runs a deterministic mock mirroring the exact Gemini response schema; the real adapters are wired and key-gated.

Check: npm run self-test → 12/12 · npm run verify-ledger → 78/78 signatures, tamper at seq 39

TIE-BREAK 3

Category Impact

Category 2 is Entrepreneurship & Job Creation, and every buyer of this product is a founder: someone turning a home kitchen into legal income, blocked by a question that costs more to answer than the business earns in its first month.

The impact metric is built to be ledger-sourced — home-food businesses cleared and kept compliant, counted from signed rows, not asserted. Impact includes the refusals: the founder it stops from launching illegally.

A claim about the future, not a result: nobody has used this yet, so no impact is claimed — only made measurable by construction for when they do.

Check: 28 golden verdicts spanning eligible / license-required / prohibited · public per-label provenance pages


06 · Full disclosure

Honest to the byte

pack GA@2026-07

A compliance product earns trust the way it issues labels: by being exact about what is real. This is not a footnote. It is part of the product.

REAL — built & verified

  • The engine: deterministic verdict table, citation grounding, byte-verbatim label QA — 156 green tests behind it.
  • The ledger: append-only hash chain, per-agent Ed25519 signatures, daily Merkle roots, working tamper localization.
  • The storefront code: landing → free verdict → Stripe Checkout (test mode) → webhook fulfillment → label delivery → public provenance.
  • The refusal path, including refund-over-revenue after payment.
  • All 17 screenshots: captures of real offline runs — nothing mocked or hand-drawn.

FIXTURE — synthetic on purpose

  • All rule text. Statute-shaped synthetic data modeled on real cottage-food programs — never verbatim law, and labeled as such on every artifact.
  • The businesses. Rosa's Bakes, Charlie's Cheesecakes, Kate's Kolaches and the rest are seed fixtures, not customers.
  • The Texas change shown throughout is a labeled historical replay through the real pipeline — not a live crawl.

NOT YET — no claims made

  • Not deployed. No public instance exists at time of writing.
  • Nothing sold, nobody using it, no jobs created — and none implied anywhere on this page.
  • Live Gemini calls are key-gated. Offline runs use a deterministic mock mirroring the exact response schema; the real gemini-2.5-flash / -pro adapters are wired.
  • Stripe has never charged a real card. Test mode only.

Coverage, stated exactly

Georgia · deep rulepack
Texas · deep rulepack + replay
California · stub
Florida · stub

Two states deep beats fifty states shallow. Stub verdicts say so out loud — every CA or FL answer carries an honest coverage note instead of a guess.

The law moved.Nobody panicked.

Nine fixture labels re-issued themselves, five fixture bakers were notified, and every step signed itself onto a ledger you can re-derive on your own machine in about a minute.